XML output makes different files on different OS

Help
WaD
2013-05-26
2013-06-09
  • WaD
    WaD
    2013-05-26

    I recently found out that builds for different OS will produce different output for XML files (at least, probably more).

    My setup consists of OpenSuse 12.1, Windows 7, and MediaInfo 0.7.62 installed on both. I was originally using .52 on Suse, but updated it just to see if it was a versioning issue. It was not.

    For instance, on OpenSuse 12.1, I generate a file and I'll see some of these tags: Width, Height, File_size, Display_aspect_ratio.

    Now I do the same thing on Windows 7, and I'll get these tags instead (same tags, just the new names): Width_String, Height_String, FileSize_String, DisplayAspectRatio_String.

    Not all the tags have _String after them either. Format_info is the same on both output. Nor can I assume that each word is delimited by an underscore. I have FrameRate_Mode_String on Windows, but Frame_rate_mode on OpenSuse.

    In general I'm fine with changing tag names, so long as they remain consistent within a version. But in this case, it's really breaking things for me. I have some automation tools to parse the XML output which were written against the Linux build, but entirely break when I throw a Windows-generated XML at it.

    So my question is can this be remedied at all? Are the Windows and Linux (and other?) builds using different resource files to make these tags? Can they be merged to have a consistent tagging scheme across versions?

    Thanks!

     
  • Code is same, I think it is only different default configuration.
    I Am out of office this week, I'll check next week, in the meanwhile you can use theses options:
    -f --Lang=raw
    They will force output of all Mediainfo fields (not only the human readable ones) + use of internal field names.
    Because the behavior you are describing is a mix of only human readable Mediainfo fields + English translation, not suitable for automation.

     
    Last edit: Jerome Martinez 2013-05-27
  • WaD
    WaD
    2013-06-09

    Hi Jerome,

    Any update on the differences? Other than --Lang=raw, is there another setting I can use to force output to be the same? The raw does work, but I'd rather know how the differences get generated so I can work on a resolution from my end (since the code behind is the same).

    Thanks!

     
  • Other than --Lang=raw, is there another setting I can use to force output to be the same?

    Use " -f --Lang=raw" everywhere, you will have the same output everywhere.
    Then you select the field you are intersted in.

    Any update on the differences?

    It is due to theses options, not same everywhere. The workaroud is to use theses options everywhere ;-), so such issue is currently not a priority for me (the main developper) with free support.

    Because the behavior you are describing is a mix of only human readable Mediainfo fields + English translation, not suitable for automation.

    with " -f", you have all raw values too, suitable for automation. Then you select the fields not having "_String" in their names. I am not aware of difficulties with the XML output (lot of people already this XML output for automation).

     
  • BTW, you can remove most of the human readable strings with this command line:
    mediainfo -f -Lang=raw --ReadByHuman=0 --Output=XML YourFileName

    (theses options are hidden, lot of documentation is lacking, I know :( )