Menu

#884 Wrong Bitrate returned if more than 23 files exist in same folder with similar naming convention

Usability
open-accepted
5
2022-09-14
2014-12-14
tempik
No

When there is more continuous filenames in one folder, MediaInfo from v0.7.69 returns wrong bitrates for parsed file and also file parsing is much slower (about 2 secs for one MTS file)
Problem is that e.g. files 00323.MTS up to 00345.MTS shows correct bitrate for parsed file but if there exists 00346.MTS, parsing file 00323.MTS will return sum of all files. Parsing 00324.MTS is ok until you will add 00347.MTS to the folder. It seems if there exist more than 23 files in a row in same folder, MediaInfo will return sum of all, not for parsed file only.
Check 7Z or ZIP file with example of the bug:
https://copy.com/RCmRfMtaSGlQnFz9
Tested Win x86/64 versions and all from v0.7.69 are affected.
In case you have 700 files from camcorder in one folder, asking for some MediaInfo properties will return wrong values and also it took about 1.5-2secs for parsing every file what is very slow.
Thanks for looking into it.

Discussion

  • tempik

    tempik - 2014-12-15

    Ok, seems it is not bug but new feature. So the question is how to disable it for speed things up and for correct results...still didn't found the way how to disable it (detection of sequence of files). THX for help!!!
    From release notes on v0.7.69:

    +Sequences of files: optimization of the detection of sequences with 200k+ files
    +Sequences of files: File_IgnoreSequenceFilesCount option for speeding up the detection of sequences (con: no detection of the latest file in the sequence)
    +Sequences of files: File_IgnoreSequenceFileSize option for speeding up the detection of sequences (con: no detection of total size of the sequence)
    +Sequences of files: detection when there is additional characters after the numbers (e.g. "filename[000001].png")
    +MPEG-TS: detecting sequences of files
    +ADTS: detecting sequences of files
    +MediaInfoList: removing files detected as part of a sequence

     

    Last edit: tempik 2014-12-15
  • Jerome Martinez

    Jerome Martinez - 2014-12-15

    For the moment, there is no GUI option for disabling the feature of parsing a sequence of files.
    with CLI: --File_TestContinuousFileNames=0

    I understand it is annoying, but for the moment my sponsors need it so it is active by default and when I have some free time (or when the request is sponsored so with an higher priority), I'll add an option in the GUI too.

     
    • tempik

      tempik - 2014-12-15

      Thanks for info Jerome.
      So similar I can use for DLL and its API to change FileTestContinuousFileNames=false. Am I right?

      void MediaInfo_Config_MediaInfo::File_TestContinuousFileNames_Set (bool NewValue)

      I expect it will disable whole detection mechanism of possible existing sequences so parsing will be much faster? I am trying to use DLL to read only specific properties like codec, bitrate,etc. and get responses as fast as possible.
      Is there any other property which should be set for disabling any other unnecessary detection mechanism so response will be in ms and not secs as now (for some cases)?
      Also is it intentional to sum also video/audio/overall bitrates and not only filesize etc?
      Many thanks for support and work on MediaInfo and also for little bit OT.

       

      Last edit: tempik 2014-12-15
      • Jerome Martinez

        Jerome Martinez - 2014-12-15

        So similar I can use for DLL and its API to change FileTestContinuousFileNames=false. Am I right?

        MediaInfo::Option("FileTestContinuousFileNames", "0")

        I expect it will disable whole detection mechanism of possible existing sequences so parsing will be much faster?

        Yes.

        Is there any other property which should be set for disabling any other unnecessary detection mechanism so response will be in ms and not secs as now (for some cases)?

        Try also MediaInfo::Option("ParseSpeed", "0"), maybe it fits your needs (some items like GOP size will be missing).
        There is definitely some optimizations to do, but this is not the highest priority of my sponsors for the moment, so on the ToDo-list.

        Also is it intentional to sum also video/audio/overall bitrates and not only filesize etc?

        Yes: my sponsors use sequences of files, so the stream is the concatenation of several files on disk.

        Many thanks for support and work on MediaInfo and also for little bit OT.

        No problem.

         
        • tempik

          tempik - 2014-12-16

          Thanks for "ParseSpeed" tip! Much appreciated.

           
  • Jerome Martinez

    Jerome Martinez - 2014-12-15
    • status: open --> open-accepted
    • assigned_to: Jerome Martinez
    • Group: Incorrect_result --> Usability
     
  • hurda77

    hurda77 - 2020-03-06

    Is there any way to set that CLI-option with the MediaInfo-program?
    I'm recording episodes from TV-shows to files named like "seriesname.E001.ts" etc. and MediaInfo lumps them all together into a sequence of files, which doesn't make sense in this context.

     
    • Jerome Martinez

      Jerome Martinez - 2020-03-06

      MediaInfo --File_TestContinuousFileNames=0 YourfileName.mkv

       
      • hurda77

        hurda77 - 2020-04-21

        That works with the CLI-version, not with the GUI-version in Windows.

         
        • Jerome Martinez

          Jerome Martinez - 2020-04-21

          It is planned to add the option to the GUI but no date for it.

           
  • Mark Floyd

    Mark Floyd - 2022-09-13

    We are having a similar issue. We are attempting to pull several parameters, one of which is the runtime (duration) data. This is breaking our automated process flow. Does anyone know how to modify the MediaInfo.dll to correct this?

     
    • Jerome Martinez

      Jerome Martinez - 2022-09-13

      No need to "correct" this by modifying anything, just use the option indicated above (" --File_TestContinuousFileNames=0") if you use automation (so CLI, we guess).

       
  • Mark Floyd

    Mark Floyd - 2022-09-13

    I am using an encode platform (Zenium/Imagine Communications) that is calling the MediaInfo.dll to calculate the duration of my media source. It is returning the incorrect runtime and is instead giving me the runtime of the file it recognizes as the last in a sequence "CompleteName_Last". The Command Line fix does not appear to be recognized by the MediaInfo component in my platform so I was curious if it could be turned off in the DLL.

     
    • Jerome Martinez

      Jerome Martinez - 2022-09-14

      I was curious if it could be turned off in the DLL.

      For the DLL, your vendor need to add the option MediaInfo::Option("File_TestContinuousFileNames", "0"), you should ask to do it if it is what you need.

      I was curious if it could be turned off in the DLL.

      We currently don't have any "default settings" secret file for changing the default settings when called from a third party, so you need to look for the FileTestContinuousFileNames=true; line in MediaInfoLib code, change "true" to "false", and recompile.

       

Log in to post a comment.