Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#741 CLI returns duplicate values

Incorrect_result
pending-works-for-me
None
5
2013-03-04
2013-03-04
Chris Komuves
No

Most of the time, requests for information on media files using the CLI work properly, but sometimes, repeatably on multiple machines (OS X), the video information is repeated several times, which makes it unusable for programatic use. This happens for about 2% of videos tested. I suspect it's because there are multiple instances of video meta-information in included headers. In any case, it should only be returned once. Here's an example of an incorrect output, followed by a correct output for another video file.

bash-3.2$ mediainfo --Inform="General;%FileExtension%|%FileSize%|%Format%|
Video;%Width%|%Height%|%FrameRate%|%Rotation%|%Format%|%BitRate%|%ChromaSubsampling%|
Audio;%Format%|%BitRate%|%Channels%|%SamplingRate%" /bingedata/INCOMING/video/105.wmv
wmv|32664172|Windows Media|320|240|||MPEG-4 Visual|57344||320|240|||MPEG-4 Visual|122880||320|240|11.999||MPEG-4 Visual|327680||WMA|31960|2|44100
bash-3.2$
bash-3.2$ mediainfo --Inform="General;%FileExtension%|%FileSize%|%Format%|
Video;%Width%|%Height%|%FrameRate%|%Rotation%|%Format%|%BitRate%|%ChromaSubsampling%|
Audio;%Format%|%BitRate%|%Channels%|%SamplingRate%" /bingedata/INCOMING/video/110.mpeg
mpeg|6436864|MPEG-PS|320|240|30.000||MPEG Video|208169||MPEG Audio|128000|2|44100

Discussion

  • the video information is repeated several times

    I need a sample file.
    A also need a example of the MediaInfo output because your example is not "video information is repeated several times" (information is different).

    which makes it unusable for programatic use.

    ???
    What is hte problem with handling more than 1 stream? FYI, some files may have 10 video streams, and it is normal.

    I suspect it's because there are multiple instances of video meta-information in included headers

    In your example, I see that each line has different bit rates. So it is not an issue about meta-information, you really have 3 video streams, ecah one having a different bit rate.

    In any case, it should only be returned once.

    If you have 3 videos streams with different bit rate, the expected behavior is NOT "returned once" (which bit rate would I display?)

    Here's an example of an incorrect output,

    The example seems correct (3 different video streams, with different bit rates).

    If you think you don't have 3 different video streams in your file, I need a sample file.
    If you have 3 different video streams in your file, the issue is on your side (you don't support multi-video streams files). In any case, such behavior is usable for programatic use, lot of programmer use MeidiaInfo even if there are 10 video streams and 20 audio stremas in the output, it is the goal of MediaInfo to display the real content of your file.

    BTW, your template is weird, you don't add a separator between each streams, so you can not well catch when you have more than 1 video stream. Is it intentional? if you add e.g. \r at the end of each field, you could have such display:
    wmv|32664172|Windows Media
    320|240|||MPEG-4 Visual|57344||
    320|240|||MPEG-4 Visual|122880||
    320|240|11.999||MPEG-4 Visual|327680||
    WMA|31960|2|44100

    Note: frame rate of 11.999 is a bit weird, and no frame rate for the other video streams is weird too. Maybe there is an issue in the anlaysis, but in any case, you must be prepared to handle files with more (or less) than 1 video stream and with more (or less) than 1 audio stream.

     
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,3 @@
    -
     Most of the time, requests for information on media files using the CLI work properly, but sometimes, repeatably on multiple machines (OS X), the video information is repeated several times, which makes it unusable for programatic use.  This happens for about 2% of videos tested.  I suspect it's because there are multiple instances of video meta-information in included headers.  In any case, it should only be returned once.  Here's an example of an incorrect output, followed by a correct output for another video file.
    
     bash-3.2$ mediainfo --Inform="General;%FileExtension%|%FileSize%|%Format%|
    
    • status: open --> pending-works-for-me
    • assigned_to: Jerome Martinez