media info stream type is different on mac and linux

  • isometric13

    isometric13 - 2013-01-28

    Using mediainfo v0.7.61 - i am developing on a mac and deploying to linux.
    On the mac, i have dylib and on linux, i installed using:

    I have a png file that mediainfo gives different reports in each environment (taken from my application logs):

    DEBUG 2013-01-28 10:35:21,361 ( [parseGeneral] - {"videoStreamCount":1,"fileName":"test","fileExtension":"png","fileSizeBytes":15438692,"fileSizeHumanReadable":" 15 MB"}

    DEBUG 2013-01-28 08:28:16,802 ( [parseGeneral] - {"imageStreamCount":1,"fileName":"test","fileExtension":"png","fileSizeBytes":44703,"fileSizeHumanReadable":"44 KB"}

    So in linux env mediainfo sees the stream type as video and on mac it sees it as image. Also the file sizes are very different.

    The image file is a subtitle or caption image so I am wondering if in linux the file header contains information about the video it came from and mediainfo is reporting on that.

    I have not seen this behavior with other image types or video types. I checked my code and am fairly sure that its not my bug. Have you ever seen anything like this? Is it a bug in mediainfo?

    Any help is greatly appreciated!


  • Jerome Martinez

    Jerome Martinez - 2013-01-29

    I think that the directory containing your image does not contain the same files.
    MediaInfo tries to catch streams with 1 frame per file (1.png, 2.png, 3.png...) and considers it as a video stream (it detects a video stream if there is more than 24 consecutive files).
    Can you try with the same files in hte directory?
    Adding an option for disabling this feature is planned but I don't know when I'll be able to implement it (it is on the "low priority" ToDo-list).

    • isometric13

      isometric13 - 2013-01-29

      Wow! Thank you for the insight - never would have figured that out on my own.

      You had it exactly right, on the linux server the image was in a directory with other images and on the mac there was just the single image file.
      I did the test (on the mac) as you suggested and mediainfo detected the videostream.

      As an interesting corollary, the '24 consecutive' is applied as '24 consecutive starting from this one'. So for example in a directory containing 25 images (1-25), images 1 and 2 would be detected as a video streams and 3 thru 25 are detected as image streams.


  • Jerome Martinez

    Jerome Martinez - 2013-01-29

    yes, it is a flaw of the detection method, but currently I found no better way to detect such video streams. I don't like such side effects, but the priority is the customers who want the feature, any suggestion for a better system with less side effects would be appreciated.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks