Log in

View Full Version : MediaInfo(Lib) 0.7 - Reading information about media files


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 [29] 30 31 32 33 34

Zenitram
3rd June 2015, 17:20
Zenitram, I'm getting this compilation error with MediaInfo 0.7.74 release

Already fixed (https://github.com/MediaArea/MediaInfoLib/commit/522963eed6c0297de9e61b78374179464750c7c0), but not in the latest source release, right.

Zenitram
3rd June 2015, 17:27
How difficult would it be for you to offer 'full parsing' and 'basic parsing' options to your regular version of MediaInfo?

depends of what you are looking for.
1/ just add the option in the GUI: a couple of hours. Fact is that I do not want (at least for free) to update the current GUI because I plan to trash it (yes, I say that for years...) and I am not myself interested in letting people easily complain about "ho this is not exact value if I set full parsing, despite the fact I set full parsing so you should be able to provide the right value, MI is bad", see 2/.
2/ having exact value for lot of things (e.g. you want the exact byte count for MKV): this is not implemented everywhere, I have no idea about what works and whats does not work, I need a complete test of each item, lot of test several days/months. Currently I implement full parsing improvements item per item, when a user really (= he is ready to pay for it) need a feature (and in that case, he know how to activate full parsing for having his feature).

You can already test the current behavior with CLI or DLL (" -- ParseSpeed=0" for fast parsing and " -- ParseSpeed=1" for full parsing). There is absolutely no promise that MeidaInfo will do what you expect it does.

foxyshadis
3rd June 2015, 23:52
That's good to know, and I might start using that in a few specific instances. Also good to hear that mkv parsing is going to be expanded soon.

NikosD
5th June 2015, 16:56
Hello.

No MediaInfo information for this file:

https://www.sendspace.com/file/xp31p6

manolito
5th June 2015, 17:22
The file is broken somehow...

TSDoctor complains about a missing PMT and refuses to repair the file. Remuxing to MKV (MKVToolNix) or remuxing to another m2ts (tsMuxeR) fixes it.


Cheers
manolito

Zenitram
5th June 2015, 22:04
No MediaInfo information for this file:


General
ID : 0 (0x0)
Complete name : C:\Users\Jerome\Downloads\hd_thx_amazing_life_lossless.m2ts
Format : BDAV
Format/Info : Blu-ray Video
File size : 193 MiB
Duration : 44s 830ms
Overall bit rate mode : Variable
Overall bit rate : 36.2 Mbps
Maximum Overall bit rate : 48.0 Mbps

Video
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 2 frames
Codec ID : 27
Duration : 44s 44ms
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive

Audio
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : DTS
Format/Info : Digital Theater Systems
Format profile : MA / Core
Mode : 16
Format settings, Endianness : Big
Muxing mode : Stream extension
Codec ID : 134
Duration : 44s 43ms
Bit rate mode : Variable
Bit rate : Unknown / 1 509 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 24 bits
Compression mode : Lossless / Lossy
Delay relative to video : -7ms

if I deactivate the CRC protection.
--> bug report to the owner of the tool you used for muxing, PAT CRC is good but PMT CRC is wrong.

NikosD
5th June 2015, 22:52
Manolito, Zenitram thank you both for your replies.

73ChargerFan
9th June 2015, 21:22
I use the command line interface to prepare MI reports on my files, using a DOS batch file ( :( )

I'd like to request a feature, to report the current directory name. I use the directory name as the reader friendly primary identifier, not the file name, and merging that information from the DOS batch file is extremely difficult.

Thank you for all your hard work.

Zenitram
9th June 2015, 21:45
I'd like to request a feature, to report the current directory name.

current directory name?
What is the relationship with MediaInfo?
http://www.windows-commandline.com/batch-file-get-current-directory/

If you want the directory name of the file you are analyzing, you can use the full output (" -f") or put %FolderName% in hte "General" section of a template

LoRd_MuldeR
9th June 2015, 22:10
current directory name?
What is the relationship with MediaInfo?
http://www.windows-commandline.com/batch-file-get-current-directory/

Also, if the full path to the file you are analyzing is in variable %i (or %1) of your Batch file, you can simply use %~dpi (or %~dp1) to get only the drive+path part.

73ChargerFan
9th June 2015, 22:38
My goal is a create a CSV to import into Excel, where each line is the folder name (user readable) and the major stats. MediaInfo can do all this except the folder name.

%FolderName% gives the complete path, but I want only the current directory.

Currently I use %~dpi (or %~dp1) but to get it into the same text line I must use a placeholder token in the MediaInfo format string, then do a text substitution by separate program. Problem is special characters in the path mangle and foul up batch file variable substitution and delayed expansion. Basically I've got most of a day into a hack that fails silently 2% of the time. This would be so much easier in Bash...

I know this is a special use case. Thank you for the assistance and suggestions!

Zenitram
10th June 2015, 07:52
%FolderName% gives the complete path, but I want only the current directory.

Please provide an example because I don't understand the difference between %FolderName% and "current directory".

foxyshadis
10th June 2015, 08:22
My goal is a create a CSV to import into Excel, where each line is the folder name (user readable) and the major stats. MediaInfo can do all this except the folder name.

%FolderName% gives the complete path, but I want only the current directory.

Currently I use %~dpi (or %~dp1) but to get it into the same text line I must use a placeholder token in the MediaInfo format string, then do a text substitution by separate program. Problem is special characters in the path mangle and foul up batch file variable substitution and delayed expansion. Basically I've got most of a day into a hack that fails silently 2% of the time. This would be so much easier in Bash...

I know this is a special use case. Thank you for the assistance and suggestions!

Been there, done that, batch files are horrible for this. So much cleaner using sed/awk from unixtools, PowerShell, vbscript, or your favorite installed scripting language to pare the full path down to just last folder\file.

stax76
11th June 2015, 21:07
I wrote a small guide regarding MediaInfo and StaxRip in case somebody is interested:

http://forum.doom9.org/showthread.php?p=1726081#post1726081

73ChargerFan
15th June 2015, 20:53
Please provide an example because I don't understand the difference between %FolderName% and "current directory".

Sorry for the late reply.

Example (1) %FolderName% gives complete path:
"Z:\Media\Kids\Kids 2\DC Batman, Superman\DCAU\Batman Beyond\"

Example (2) Current Directory: "Batman Beyond"
is the show title, and the directory has 50 +/- episodes named by episode number & episode title, but not including the show name.

manolito
15th June 2015, 22:06
@ foxyshadis

I am curious how using sed/awk from unixtools, PowerShell, vbscript or any other scripting language would make it any easier to extract the string "Batman Beyond" from the full path variable compared to using a simple batch file.

Yes, I would need a loop to determine the positions of the "\" characters, but I could write the batch file in 2 minutes. Please give us an example how you would do it with any of the tools you suggested.

I do have a little experience with SED for Windows, it is a pain to learn the syntax, and the result is "Write Only", without comments it is unreadable. And the learning curve for PowerShell or VBScript is also steep for someone who grew up with Turbo Pascal, MASM and DOS Batch language.


Cheers
manolito

LoRd_MuldeR
15th June 2015, 22:52
I am curious how using sed/awk from unixtools, PowerShell, vbscript or any other scripting language would make it any easier to extract the string "Batman Beyond" from the full path variable compared to using a simple batch file.

Should be straight forward to get it with a regular expression.

This gives you the last (rightmost) directory part within a full path, assuming there's a trailing backslash:
\\([^\\]+)\\$

If the path may end with file name, you can use:
\\([^\\]+)\\[^\\]*$

Now please don't ask me how to translate that to proper SED syntax ;)

ndjamena
15th June 2015, 23:18
Powershell:

$TargetPath="Z:\Media\Kids\Kids 2\DC Batman, Superman\DCAU\Batman Beyond\Boo.txt"

[System.IO.Path]::GetFileName([System.IO.Path]::GetDirectoryName($TargetPath))

It's mostly the '\' at the end of his example that's the problem. '/' is also a valid directory separator and "\\"... unless you know exactly where the filename will be sourced from you'd need to add some error correction into the mix.

Of course as far as I'm aware MediaInfo doesn't add the extra slash to the path name so

$TargetPath="Z:\Media\Kids\Kids 2\DC Batman, Superman\DCAU\Batman Beyond"
[System.IO.Path]::GetFileName($TargetPath)

will do.

(Powershell is a PITA, I prefer to use batch when I can get away with it.)

-Edit-

$TargetPath="Z:\Media\Kids\Kids 2\DC Batman, Superman\DCAU\Batman Beyond"
[System.IO.Path]::GetFileName($TargetPath).Trim('`"').TrimEnd("/\")

73ChargerFan
16th June 2015, 03:56
Sorry this is so off topic, I just think it's a good idea. But this will be my last post on this.

Even with the above code, I still have to capture the 1 line output of MediaInfo into a temp file, do a text substitution (which isn't free on Windows), then append that temp file onto the text file, which is another inner loop, and ...

This is what I get from my code, which loads directly into Excel.
First field is the Current Directory, next is file name, then size, file type, classification of video (done manually), video summary, main audio stream info, then finally the directory all the movie directories are in (this last matches the name of the backup hard drive the file is copied to.)


Z:\Kids Movies\Kids 1 Movies
Thu 01/29/2015 21:06:51.52

Bedtime Stories (2008),Bedtime Stories.mkv,18.9 GiB,Matroska,1080p,AVC High@L4.1,DTS-HD / 1509 Kbps 6 Ch ,Kids 1 Movies
Bolt (2008),Bolt.mkv,18.8 GiB,Matroska,1080p,AVC High@L4.1,DTS-HD / 1509 Kbps 6 Ch ,Kids 1 Movies
Cloak & Dagger (1984),Cloak & Dagger.iso,4.19 GiB,DVD ISO,Kids 1 Movies
Coraline (2009),Coraline.mkv,14.4 GiB,Matroska,1080p,VC-1 Advanced@L3,DTS-HD / 1509 Kbps 6 Ch AC3 @ 192 Kbps 2 Ch ,Kids 1 Movies
Doctor Dolittle (1967),Doctor Dolittle.mkv,6.50 GiB,Matroska,720x480,MPEG 2,5381 Kbps,AC3 @ 448 Kbps 4 Ch AC3 @ 192 Kbps 2 Ch ,Kids 1 Movies
How to Train Your Dragon (2010),Dragon.ts,17.3 GiB,MPEG-TS,1080p,AVC High@L4.1,23.4 Mbps,AC3 @ 640 Kbps 6 Ch ,Kids 1 Movies

qyot27
16th June 2015, 06:05
@ foxyshadis

I am curious how using sed/awk from unixtools, PowerShell, vbscript or any other scripting language would make it any easier to extract the string "Batman Beyond" from the full path variable compared to using a simple batch file.

Yes, I would need a loop to determine the positions of the "\" characters, but I could write the batch file in 2 minutes. Please give us an example how you would do it with any of the tools you suggested.

I do have a little experience with SED for Windows, it is a pain to learn the syntax, and the result is "Write Only", without comments it is unreadable. And the learning curve for PowerShell or VBScript is also steep for someone who grew up with Turbo Pascal, MASM and DOS Batch language.


Cheers
manolito
(g)awk is more suitable for this than sed, really.

Given "Z:\Media\Kids\Kids 2\DC Batman, Superman\DCAU\Batman Beyond\", it would only take:
awk -F'\\' '{print $(NF-1)}'
Which prints the second-to-last column (Batman Beyond), determined from the \ character delimiter.

ndjamena
16th June 2015, 08:40
Since most people would store batman beyond as ".\Batman Beyond\Season XX\" I should think this is more of a fringe feature request in any case.

You'd need access to each layer to get the most out of it.

Zenitram
16th June 2015, 09:40
Example (1) %FolderName% gives complete path:
"Z:\Media\Kids\Kids 2\DC Batman, Superman\DCAU\Batman Beyond\"

Example (2) Current Directory: "Batman Beyond"
is the show title, and the directory has 50 +/- episodes named by episode number & episode title, but not including the show name.

understood.
This is a very specific request, only for very users (Episodes can be in a sub-dir and so on), I don't want to add another field in the release of MediaInfo for such specific request.

You have to use an external tool (calling MediaInfo library and you manage the Path yourself in your favorite programming language, or something from the command line)

73ChargerFan
16th June 2015, 17:55
Thanks for the help anyway.

Keiyakusha
21st June 2015, 21:20
Zenitram
Hi. Currently for audio files with tags that have multiple occurances of the same tag, mediainfo displays them like so:
Composer : FirstTagValueHere / SecondTagValueHere
... which i think is good. However in case of MKV tags, for each tag name it displays only the last one. Can it be improved to show all the tags? Or at least make it show only the first one instead, which makes a bit more sense.

<?xml version="1.0"?>
<!-- <!DOCTYPE Tags SYSTEM "matroskatags.dtd"> -->
<Tags>
<Tag>
<Simple>
<Name>TITLE</Name>
<String>FirstTagValueHere</String>
<TagLanguage>und</TagLanguage>
<DefaultLanguage>1</DefaultLanguage>
</Simple>
<Simple>
<Name>TITLE</Name>
<String>SecondTagValueHere</String> <-- only this is displayed
<TagLanguage>und</TagLanguage>
<DefaultLanguage>1</DefaultLanguage>
</Simple>
</Tag>
</Tags>

Zenitram
23rd June 2015, 09:59
However in case of MKV tags, for each tag name it displays only the last one.

Not expected. Please provide a sample file + the intended behavior.

Keiyakusha
23rd June 2015, 12:35
Not expected. Please provide a sample file + the intended behavior.

Here is a sample file. (https://dl.dropboxusercontent.com/u/110558786/Report/mkv-tags-test.mka)

Current output with the latest stable mediainfo release. Note that the ALBUM tag is not shown at all, I just noticed this.

...
Overall bit rate : 986 Kbps
Track name : 池田綾子 「プリズム (backtracks)」
Encoded date : UTC 2015-06-23 11:17:58
Writing application : mkvmerge v8.0.0 ('Til The Day That I Die') 64bit
Writing library : libebml v1.3.1 + libmatroska v1.4.2
TITLE : Prism (backtracks)
ARTIST : Ikeda Ayako
COMPOSER : Ikeda Ayako
DATE_RECORDED : 2007-08-29
PART_NUMBER : 4
PUBLISHER : Sony Music Records
TOTAL_PARTS : 5
_STATISTICS_TAGS : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
...

I expect output to be consistent with other files that have tags and to look like the example below.

...
Overall bit rate : 986 Kbps
Track name : 池田綾子 「プリズム (backtracks)」
Encoded date : UTC 2015-06-23 11:17:58
Writing application : mkvmerge v8.0.0 ('Til The Day That I Die') 64bit
Writing library : libebml v1.3.1 + libmatroska v1.4.2
ALBUM : プリズム/空の欠片 / Prism/Sora no Keppen
TITLE : プリズム (backtracks) / Prism (backtracks)
ARTIST : 池田綾子 / Ikeda Ayako
COMPOSER : 池田綾子 / Ikeda Ayako
DATE_RECORDED : 2007-08-29
PART_NUMBER : 4
PUBLISHER : Sony Music Records
TOTAL_PARTS : 5
_STATISTICS_TAGS : BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
...

Edit: here is how would the same track look in case of a normal FLAC file (https://dl.dropboxusercontent.com/u/110558786/Report/mkv-tags-test.flac). Note that MKV case seem to be having confusion with "PART" tags too, while FLAC is correct.

Overall bit rate : 840 Kbps
Album : プリズム/空の欠片 / Prism/Sora no Keppen
Album/Performer : 池田綾子 / Ikeda Ayako
Part : 1
Part/Total : 2
Track name : プリズム (backtracks) / Prism (backtracks)
Track name/Position : 4
Track name/Total : 5
Performer : 池田綾子 / Ikeda Ayako
Composer : 池田綾子 / Ikeda Ayako
Producer : Sony Music Records
Recorded date : 2007-08-29

Kurtnoise
26th June 2015, 14:33
About your ALBUM Tag...it's not available coz it's flagged as TITLE :

http://i.imgur.com/WNBbz82.png

maybe an issue w/ your xml file tags...

Keiyakusha
26th June 2015, 15:38
About your ALBUM Tag...it's not available coz it's flagged as TITLE :

http://i.imgur.com/WNBbz82.png

maybe an issue w/ your xml file tags...

I believe it is correct. What makes it different from track or other Titles is TargetTypeValue.
Accordingly to Matroska specs, 50 means "ALBUM / OPERA / CONCERT" and 30 means "TRACK / SONG"

Kurtnoise
27th June 2015, 06:31
but did you try what I said ?

MI doesnt rely on TargetTypeValues...

Aleksoid1978
29th June 2015, 08:57
https://yadi.sk/i/wqewWfIphYJoT
MediaInfo don't see any streams in this file. MPC-BE open correct and detect 1 video + 6 audio + 5 subtitles.

SeeMoreDigital
29th June 2015, 09:09
https://yadi.sk/i/wqewWfIphYJoT
MediaInfo don't see any streams in this file. MPC-BE open correct and detect 1 video + 6 audio + 5 subtitles.The .m2ts stream does not contain any PAT/PID data...

Zenitram
29th June 2015, 09:35
https://yadi.sk/i/wqewWfIphYJoT
MediaInfo don't see any streams in this file. MPC-BE open correct and detect 1 video + 6 audio + 5 subtitles.

MPC-BE ignores CRC errors, I do not.
PMT is buggy (CRC is wrong), so ignored (and the PMT is important for the list of streams)

Aleksoid1978
30th June 2015, 02:45
MPC-BE ignores CRC errors, I do not.
PMT is buggy (CRC is wrong), so ignored (and the PMT is important for the list of streams)

But - we can detect streams without any PMT data. MPC-BE can do this.

Also - this file open ffmpeg/LAVSource.

Zenitram
30th June 2015, 07:47
But - we can detect streams without any PMT data. MPC-BE can do this.

Yes, we can.
Current policy of MediaInfo:
- if there is PAT/PMT content, consider the file as a valid TS file, expecting valid PAT/PMT. Invalid CRC means transmission errors, waiting for the next one. the PAT is valid, so it is normal to wait for a valid PMT
-if there is no PAT/PMT, autodect of PES with content.

Your file has a problem: it has a valid PAT, and PMT with invalid CRC, you need to fix the muxer, not the analyzer.
If you want to have an option (which will not be activated by default because your file is buggy, not the analyzer) for bypassing CRC checks and/or forcing the autotdetect of PES even, please add a feature request (https://sourceforge.net/p/mediainfo/feature-requests/)) but I prefer to warn: due to the fact your file is buggy, I am not willing to implement this feature for free (but I may accpet a patch).

this file open ffmpeg/LAVSource.

Each developper has his own policy for buggy files. Mine is to not ignore a CRC fail, at least by default.

NikosD
20th August 2015, 00:21
Hello.

Latest MediaInfo v0.7.76 x86 crashes on AthlonXP (32 bit - non SSE2 CPU) using WinXP.

"External exception C000001D"

manolito
20th August 2015, 00:36
The trouble with non-SSE2 CPUs started with version 0.7.71, and upon my requests Zenitram corrected this up to version 0.7.74.
http://forum.doom9.org/showthread.php?p=1699337#post1699337

Starting with 0.7.75 the issue came back again, and I am getting a little tired of nagging Zenitram for every new version. Looks like I will stick with 0.7.74 for a while... ;)


Cheers
manolito

clsid
20th August 2015, 23:50
It is an easy fix for him. The MSVC2013 project files for ZenLib and Zlib need to be set to SSE. I have checked and the rest is ok.

LoRd_MuldeR
26th August 2015, 20:14
The trouble with non-SSE2 CPUs started with version 0.7.71, and upon my requests Zenitram corrected this up to version 0.7.74.
http://forum.doom9.org/showthread.php?p=1699337#post1699337

Starting with 0.7.75 the issue came back again, and I am getting a little tired of nagging Zenitram for every new version. Looks like I will stick with 0.7.74 for a while... ;)

Try this ;)

MediaInfo v0.7.76 static build:
http://sourceforge.net/projects/muldersoft/files/MediaInfo%20%28CLI%2BGUI%29/MediaInfo-CLI.2015-08-25.zip/download

manolito
27th August 2015, 09:00
Thanks a lot, works well... :thanks:

But I also need the DLL...


Cheers
manolito

stax76
2nd September 2015, 22:08
It seems there was a change which broke a feature of my app and I don't know how to get the old behavior, the code I was using is:

MediaInfo_Option(mi.Handle, "Complete", "1")
Return Marshal.PtrToStringUni(MediaInfo_Inform(mi.Handle, 0))

Same version back this was getting parameter names with underscore but now it gets friendly names without underscore, I need to know all parameter names.

NikosD
2nd September 2015, 22:10
Thanks a lot, works well... :thanks:

But I also need the DLL...


Cheers
manolito

New 0.7.77 is working fine with SSE.

Kurtnoise
3rd September 2015, 10:36
It seems there was a change which broke a feature of my app and I don't know how to get the old behavior, the code I was using is:

MediaInfo_Option(mi.Handle, "Complete", "1")
Return Marshal.PtrToStringUni(MediaInfo_Inform(mi.Handle, 0))

Same version back this was getting parameter names with underscore but now it gets friendly names without underscore, I need to know all parameter names.
Nothing has changed regarding this part...

Could we have an example of what you had before/after ?

stax76
3rd September 2015, 10:55
My MediaInfo GUI feature isn't working as before, now I get this:

File size : 47948706
File size : 45.7 MiB
File size : 46 MiB
File size : 46 MiB
File size : 45.7 MiB
File size : 45.73 MiB

I don't know exactly what it was before but think something like this:

File_size/String1 : 45.7 MiB
File_size/String2 : 46 MiB
File_size/String3 : 46 MiB
File_size/String4 : 45.7 MiB
File_size/String5 : 45.73 MiB

manolito
3rd September 2015, 12:52
New 0.7.77 is working fine with SSE.

Confirmed, thanks Nikos for the info. And thanks to Zenitram of course... :thanks:


Cheers
manolito

manolito
20th September 2015, 18:20
No Detection of duration and frame rate for VFR MKV files

There are some VFR files (created by HandBrake) where the current MediaInfo versions cannot detect the frame rate (not even framerate_original) and the duration.

A sample file is here:
http://www3.zippyshare.com/v/VURfwwA3/file.html

The last MediaInfo version which handles these files correctly is version 0.7.58.


Cheers
manolito

SeeMoreDigital
20th September 2015, 20:37
There are some VFR files (created by HandBrake) where the current MediaInfo versions cannot detect the frame rate (not even framerate_original) and the duration.What makes you think that these VFR encoded files actually contain 'the original frame rate' meta-data?

Why anybody thinks generating VFR encodes is a good idea is beyond me!

Zenitram
20th September 2015, 20:43
There are some VFR files (created by HandBrake) where the current MediaInfo versions cannot detect the frame rate (not even framerate_original) and the duration.

A sample file is here:
http://www3.zippyshare.com/v/VURfwwA3/file.html

The last MediaInfo version which handles these files correctly is version 0.7.58.

It is VFR, so versions before 0.7.58 were actually bug (wrong information).
I understand that the current behavior (no information) is the right one, because it is VFR.

Duration is provided at the container ("general" part) level because this is the only one available, same: it is a fix of a previous bad behavior, so the current behavior (no information at the stream level) is the right one, because such information is not known.

There are some ideas (feature requests, not bug. A bug is when a piece of information is wrong, and you did not demonstrate that a piece of information is wrong) for getting duration with probing of the end of the file, and add an option for scanning the whole file (slow!) in order to get min/avg/max framerate, but there is currently no ETA (but this is planned for maximum next year, thanks to some global funding about Matroska (http://www.preforma-project.eu/mediaconch.html))

Zenitram
20th September 2015, 20:47
What makes you think that these VFR encoded files actually contain 'the original frame rate' meta-data?

Hint: they do not (AVC frmea rate info is set to "no fixed frame rate").

Why anybody thinks generating VFR encodes is a good idea is beyond me!

Beside the case of concatanation of 2 stream with different frame rate, we have variable bitrate, so why not variable frame rate if global quality is improved with it?

manolito
20th September 2015, 21:22
It is VFR, so versions before 0.7.58 were actually bug (wrong information).
I understand that the current behavior (no information) is the right one, because it is VFR.

I disagree. The current versions of MediaInfo just say: VFR, nothing else. No frame rate, no duration.

MediaInfo 0.7.58 says: VFR, correct duration, correct frame rate. This just works.


Another indication that the frame rate and the duration in fact can be retrieved from the source file (without parsing the whole file) is that I only have to repack the MKV to MP4 using ffmpeg (-acodec copy -vcodec copy), and voilą, even the current MediaInfo suddenly detects the frame rate and the duration.


Cheers
manolito

Zenitram
20th September 2015, 21:51
I disagree. The current versions of MediaInfo just say: VFR, nothing else. No frame rate, no duration.

So no bug (no incorrect result, an empty field means "unknown", that's all).
Again, this is the goal (fix of some bugs with the previous algorithm, which was not good for all files, only sometimes right).

MediaInfo 0.7.58 says: VFR, correct duration, correct frame rate. This just works.

It works for this file, not for all files. And it is impossible with the old algorithm to do the difference between your correct behavior and incorrect behavior with some other files, so the only solution for not having wrong results is to disable this algorithm.

Another indication that the frame rate and the duration in fact can be retrieved from the source file (without parsing the whole file) is that I only have to repack the MKV to MP4 using ffmpeg (-acodec copy -vcodec copy), and voilą, even the current MediaInfo suddenly detects the frame rate and the duration.

Good, you just learned that MP4 has frame duration of all frames in the MP4 header. this is not the case of of MKV (it is in hte frame header of each frame).
Hint: you repacked your MKV, so FFmpeg has read the whole file, it is aware of the duration of each frame for each stream, before writing the MP4 header.

Note: if you think you can get average frame rate and duration of all streams for sure, without any error with all files I have (that means that e.g. video stream duration and audio stream duration may be different) without parsing the whole file, I am interested in a patch and/or hint about how to get it.