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
22nd October 2009, 18:20
I didn't notice that because the file was playing fine in many different players I've tried.

This is because players don't rely of this kind of information.
This is only an "hint" for players.


And/or add a warning maybe ? Saying that the file is somehow broken.
Might be very usefull.

Integrity information for user is possible, but this is not the current goal of MediaInfo, and I have already a lot of things to handle (and some are paid)
This is possible, implementation may be done later if I find a sponsor (--> $) for this. Currently, I implement in priority what can be called a bug or quick feature requests (as Joint Stereo request).

Nice, thanks :)

You're welcome.

Keiyakusha
25th October 2009, 02:52
Hi!
Lets say I have an mkv file with h264 stream in it. This stream has coded frame size 848x480, there is no SAR information on stream level. On container level display dimensions are 853x480. Mediainfo shows DAR -> 16x9; Original DAR -> 16x9. As I understand Original DAR is a stream level information so shouldn't it print something like "unspecified" instead? Otherwise this can be a bit of misleading...

EDIT: Ah, one more thing. Why mediainfo always shows "Resolution: 24 bits" for h264 streams produced by x264? I believe x264 can do only YV12, which is no way 24 bit...

EDIT2: Also how about printing Container level and Stream level FPS info about h264 video in MKV (and maybe other containers) in cases when FPS is constant? (not sure how things works with non-constant fps, I'm not doing such files)

Zenitram
25th October 2009, 16:33
Lets say I have an mkv file with h264 stream in it. This stream has coded frame size 848x480, there is no SAR information on stream level. On container level display dimensions are 853x480. Mediainfo shows DAR -> 16x9; Original DAR -> 16x9. As I understand Original DAR is a stream level information so shouldn't it print something like "unspecified" instead? Otherwise this can be a bit of misleading...

There is always a default value for SAR (1.000). Try to demux your file, the raw stream is displayed even if there is no SAR explicitly defined... So an Original DAR of 16x9 is normal (848 divided by 480 and SAR=1.000).

EDIT: Ah, one more thing. Why mediainfo always shows "Resolution: 24 bits" for h264 streams produced by x264? I believe x264 can do only YV12, which is no way 24 bit...

24 bit is the resolution of the output video when decompressed and displayed by the monitor. But exact, this is not a resolution of the encoded stream, and I should display only details from the encoded stream.
There is already a discussion about colorspace here:
http://sourceforge.net/projects/mediainfo/forums/forum/297610/topic/3413408
I will add a "Color space" field in all cases (currently, it is displayed only if this is not YUV 4:2:0 for AVC), like this:
- Color space = YUV 4:2:0
- Color space = YUV 4:4:4
- Color space = RGB
- Color space = RGBA
- ...

For "resolution" field, I hesitate: I currently put "24 bits" for RGB for example, this seems right, this is 8 bit per color component (R, G, B...)
But this is not right for YUV stuff.
Which value should I put in this field from your point of view? 'bit depth'? I have no precise idea about this, because 'bit depth' should be maybe by YUV component (8 or 10 bit), but in this case I should maybe change the RGB handling and put "8 bit" too.

So... how would you handle the "Resolution" field with for example normal AVC, "High 10" AVC profile, RGB codecs, RGBA codecs?


EDIT2: Also how about printing Container level and Stream level FPS info about h264 video in MKV (and maybe other containers) in cases when FPS is constant? (not sure how things works with non-constant fps, I'm not doing such files)

This is already the case:
General
Format : Matroska
(...)
Video
Format : AVC
Codec ID : V_MPEG4/ISO/AVC
Frame rate : 25.000 fps
Original frame rate : 12.500 fps
(...)

If you have a sample not displaying original FPS, please provide it.

Keiyakusha
25th October 2009, 17:38
There is always a default value for SAR (1.000). Try to demux your file, the raw stream is displayed even if there is no SAR explicitly defined... So an Original DAR of 16x9 is normal (848 divided by 480 and SAR=1.000).
Here I'm rely on Info, reported by great indexers from Donald Graft. If I don't set SAR during encoding, I see "unspecified" in information dialog. But If i will set SAR 1:1, I will see exactly 1:1 SAR reported.

Anyway it will be good to have SAR value separated from frame size, because 848x480 SAR 1:1 and 848x480 SAR 160:159 is two different things. I think only in second case Original DAR 16:9 should be reported by mediainfo.

If you have a sample not displaying original FPS, please provide it.
Sorry, It looks like some tools (or some versions of these tools) for muxing just overrides stream level info. Or something like that. I need to check this again...
If the file muxed with latest mkvtoolnix I difinitely can see Frame rate and original frame rate.

So... how would you handle the "Resolution" field with for example normal AVC, "High 10" AVC profile, RGB codecs, RGBA codecs?
Thanks for explanation but I'm afraid I can't answer to this question.

Zenitram
25th October 2009, 17:59
Here I'm rely on Info, reported by great indexers from Donald Graft. If I don't set SAR during encoding, I see "unspecified" in information dialog. But If i will set SAR 1:1, I will see exactly 1:1 SAR reported.

Its behaviour is wanted, mine is wanted too.
My goal with this field is to display how a decoder would handle a "non-value". And all decoders I know handle non-value as 1.000 SAR, so I don't see any reason to display "unspecified" for my goal. This is a conscious decision.

Anyway it will be good to have SAR value separated from frame size, because 848x480 SAR 1:1 and 848x480 SAR 160:159 is two different things. I think only in second case Original DAR 16:9 should be reported by mediainfo.


SAR is saved, but not displayed by default. Toggle Debug --> Advanced mode and you will see precise SAR and DAR values.
But for the "normal" view, I display "16:9" for DAR between 1.700 and 1.850 (so a DAR of 848/480=1.767 is displayed as 16:9. If you want the precise value, you need to create your own custom view(if you create your own custom view you can display 1.767 instead of a rounded to known value)

Sorry, It looks like some tools (or some versions of these tools) for muxing just overrides stream level info. Or something like that. I need to check this again...

I already saw some tools removing SAR/DAR from raw stream during the muxing.

SeeMoreDigital
25th October 2009, 18:47
Thankfully the issue about where aspect ratio signalling should be placed, ie: within the stream (stream level signalling) or within the container (container level signalling), has been made a lot easier now that Mosu's MKVmergeGUI no longer removes the aspect ratio signalling from the stream by default :)

qyot27
25th October 2009, 20:56
EDIT2: Also how about printing Container level and Stream level FPS info about h264 video in MKV (and maybe other containers) in cases when FPS is constant? (not sure how things works with non-constant fps, I'm not doing such files)
This reminds me, on MP4 files the %FrameRate_Mode/String% option works and displays either Constant or Variable. MKV and FLV files, on the other hand, don't display this field - MKV certainly can be VFR, and I thought FLV could too. Are there plans to add support for those, or is it something that can only be easily done with MP4?

Zenitram
25th October 2009, 21:47
This reminds me, on MP4 files the %FrameRate_Mode/String% option works and displays either Constant or Variable. MKV and FLV files, on the other hand, don't display this field - MKV certainly can be VFR, and I thought FLV could too. Are there plans to add support for those, or is it something that can only be easily done with MP4?

MP4 has an index, with duration of each frame in this index, I can quickly (whithout parsing the wohole file) know if this is VBR or CBR.

MKV has no index, and has a FrameRate field defined as "Number of frames per second. Informational only" --> I am not sure this field would not be filled with average FPS if the film is VFR. I don't have such a kind of file, I can not see what is the implementation of muxers. I need to parse the whole file to be sure (this would be an option later, not currently implemented). So I prefer not to indicate CFR/VFR value.

FLV has no index, and has an optional only framerate metatag, not precise too (what is the content of this value if this is a VFR file? I have no official info about it). So I prefer not to indicate CFR/VFR value (for FLV, I have a better detection implementation, I parse the 30 first frames, if theses frames are VFR, I display "VFR" because I am sure this is VFR, but having the first 30 frames in CFR does not mean all file is CFR, so I don't display it)

DrNein
26th October 2009, 03:29
For XP, I have six instances of MediaInfo.dll to support the following and wonder if it is okay just to have one instance in System32 (so far it seems fine)?

MediaInfo
MediaCoder\tools
megui
Movie Catalog
MPC
Yamb

Zenitram
26th October 2009, 08:33
For XP, I have six instances of MediaInfo.dll to support the following and wonder if it is okay just to have one instance in System32 (so far it seems fine)?

Currently the API has not changed for a while, so no problem from my point of view. But each software has its own rules, I have no power on other software.

kypec
28th October 2009, 13:35
Hi Zenitram,

could you please add to supported file extensions (which get associated with MediaInfo upon installation) also .264 besides .h264?
I ask for this because 264 is the default extension used by x264 encoder when desired output should be raw H264 stream.

Thank you very much.

Zenitram
28th October 2009, 13:41
could you please add to supported file extensions (which get associated with MediaInfo upon installation) also .264 besides .h264?.

Done. For next version (Friday)

kypec
28th October 2009, 13:49
Wow :eek: Feature implemented 6 minutes after request was made, that's what I call a support! :p

b66pak
28th October 2009, 19:33
hi, can you add support for apple subtitles (sbtl) in .mp4, .m4v and .mov? here is a sample:

http://www.megaupload.com/?d=3Y3T1YQH


General
Complete name : sample.mov
Format : MPEG-4
Format profile : QuickTime
Codec ID : qt
File size : 13.2 MiB
Duration : 3mn 40s
Overall bit rate : 502 Kbps
Encoded date : UTC 2009-09-01 19:02:14
Tagged date : UTC 2009-09-01 19:02:16
com.apple.quicktime.player.movie : (Binary)

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Baseline@L3.0
Format settings, CABAC : No
Format settings, ReFrames : 5 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 3mn 40s
Bit rate mode : Variable
Bit rate : 300 Kbps
Maximum bit rate : 751 Kbps
Width : 480 pixels
Height : 368 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 25.000 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.068
Stream size : 7.87 MiB (60%)
Writing library : x264 core 58 svn-735
Encoding settings : cabac=0 / ref=5 / deblock=1:-2:-1 / analyse=0x1:0x111 / me=umh / subme=7 / brdo=0 / mixed_ref=1 / me_range=12 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / chroma_qp_offset=0 / threads=3 / nr=0 / decimate=0 / mbaff=0 / bframes=0 / keyint=250 / keyint_min=25 / scenecut=40(pre) / rc=2pass / bitrate=300 / ratetol=1.0 / rceq='blurCplx^(1-qComp)' / qcomp=0.60 / qpmin=16 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40
Encoded date : UTC 2009-08-31 17:58:23
Tagged date : UTC 2009-09-01 19:02:16

Audio #1
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : No
Codec ID : 40
Duration : 3mn 40s
Bit rate mode : Variable
Bit rate : 96.0 Kbps
Maximum bit rate : 103 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 48.0 KHz
Resolution : 16 bits
Stream size : 2.56 MiB (19%)
Encoded date : UTC 2009-08-31 17:58:24
Tagged date : UTC 2009-09-01 19:02:16

Audio #2
ID : 3
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : No
Codec ID : 40
Duration : 3mn 40s
Bit rate mode : Variable
Bit rate : 98.1 Kbps
Maximum bit rate : 102 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 48.0 KHz
Resolution : 16 bits
Stream size : 2.57 MiB (20%)
Encoded date : UTC 2009-08-31 17:58:24
Tagged date : UTC 2009-09-01 19:02:16

Text #1
ID : 8
Format : Timed text
Codec ID : tx3g
Duration : 2mn 0s
Bit rate mode : Variable
Bit rate : 71 bps
Stream size : 1.05 KiB (0%)
Encoded date : UTC 2009-08-31 17:58:24
Tagged date : UTC 2009-09-01 19:02:16

Text #2
ID : 9
Format : Timed text
Codec ID : tx3g
Duration : 2mn 0s
Bit rate mode : Variable
Bit rate : 71 bps
Stream size : 1.05 KiB (0%)
Encoded date : UTC 2009-08-31 17:58:24
Tagged date : UTC 2009-09-01 19:02:16

Text #3
ID : 10
Format : Timed text
Codec ID : tx3g
Duration : 2mn 0s
Bit rate mode : Variable
Bit rate : 63 bps
Stream size : 944 Bytes (0%)
Encoded date : UTC 2009-08-31 17:58:24
Tagged date : UTC 2009-09-01 19:02:16

Text #4
ID : 11
Format : Timed text
Codec ID : tx3g
Duration : 2mn 0s
Bit rate mode : Variable
Bit rate : 63 bps
Stream size : 944 Bytes (0%)
Encoded date : UTC 2009-08-31 17:58:24
Tagged date : UTC 2009-09-01 19:02:16

Text #5
ID : 12
Format : Apple text
Codec ID : text
Duration : 3mn 40s
Bit rate mode : Variable
Bit rate : 10 bps
Stream size : 262 Bytes (0%)
Encoded date : UTC 2009-09-01 19:00:46
Tagged date : UTC 2009-09-01 19:02:16

Text #6
ID : 13
Format : Apple text
Codec ID : text
Duration : 3mn 40s
Bit rate mode : Variable
Bit rate : 10 bps
Stream size : 262 Bytes (0%)
Encoded date : UTC 2009-09-01 19:01:03
Tagged date : UTC 2009-09-01 19:02:16



notice that track ID 4 to 7 are missing...the difference between a "tx3g" subtitle track and an "apple" subtitle track is "text" in first one and "sbtl" in second one in "moov\trak\mdia\hdls\componet subtype" atom...
_

Zenitram
28th October 2009, 22:54
hi, can you add support for apple subtitles (sbtl) in .mp4, .m4v and .mov?

(...)

notice that track ID 4 to 7 are missing...the difference between a "tx3g" subtitle track and an "apple" subtitle track is "text" in first one and "sbtl" in second one in "moov\trak\mdia\hdls\componet subtype" atom...

I added detection of "sbtl" subtype.
Note: subtype is for defining the kind of stream (Video, Audio, Text...), but what I saw is "tx3g" format in both cases ("text" or "sbtl" subtype). What I understood is that "text" in stsd is for "Apple Text" (the last 2 text tracks). In the case of "sbtl" subtype, I fill the "Muxing Mode" field with "sbtl", so you can detect if this is tx3g with "text" subtype (no Muxing mode info, this is the "default" muxing mode), tx3g with "sbtl" subtype (Muxing Mode info, this is not the "default" muxing mode), and text (Apple Text?) in "text" subtype.
Too much identifiers in MPEG-4!!! :(

Note about languages: I added language support for this kind of index ("old" Apple method, was implemented but deactivated because I had no file for it, now I have a file :) )

Note about text streams: VLC displays only 9 text streams, 1 less than me; Text #9 (Track #12) is not handled, this is the same format definition as Text #10 (Track #13), if you have an idea of the reason...

Below the output from the next version of MediaInfo:

General
Complete name : D:\Download\sample.mov
Format : MPEG-4
Format profile : QuickTime
Codec ID : qt
File size : 13.2 MiB
Duration : 3mn 40s
Overall bit rate : 502 Kbps
Encoded date : UTC 2009-09-01 19:02:14
Tagged date : UTC 2009-09-01 19:02:16
com.apple.quicktime.player.movie : (Binary)

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Baseline@L3.0
Format settings, CABAC : No
Format settings, ReFrames : 5 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 3mn 40s
Bit rate mode : Variable
Bit rate : 300 Kbps
Maximum bit rate : 751 Kbps
Width : 480 pixels
Height : 368 pixels
Display aspect ratio : 4:3
Frame rate mode : Constant
Frame rate : 25.000 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.068
Stream size : 7.87 MiB (60%)
Writing library : x264 core 58 svn-735
Encoding settings : (...)
Language : English
Encoded date : UTC 2009-08-31 17:58:23
Tagged date : UTC 2009-09-01 19:02:16

Audio #1
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : No
Codec ID : 40
Duration : 3mn 40s
Bit rate mode : Variable
Bit rate : 96.0 Kbps
Maximum bit rate : 103 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 48.0 KHz
Resolution : 16 bits
Stream size : 2.56 MiB (19%)
Language : English
Encoded date : UTC 2009-08-31 17:58:24
Tagged date : UTC 2009-09-01 19:02:16

Audio #2
ID : 3
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Format settings, SBR : No
Codec ID : 40
Duration : 3mn 40s
Bit rate mode : Variable
Bit rate : 98.1 Kbps
Maximum bit rate : 102 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 48.0 KHz
Resolution : 16 bits
Stream size : 2.57 MiB (20%)
Language : Spanish
Encoded date : UTC 2009-08-31 17:58:24
Tagged date : UTC 2009-09-01 19:02:16

Text #1
ID : 4
Format : Timed text
Muxing mode : sbtl
Codec ID : tx3g
Duration : 2mn 0s
Bit rate mode : Variable
Bit rate : 71 bps
Stream size : 1.05 KiB (0%)
Language : English
Encoded date : UTC 2009-08-31 17:58:24
Tagged date : UTC 2009-09-01 19:02:16

Text #2
ID : 5
Format : Timed text
Muxing mode : sbtl
Codec ID : tx3g
Duration : 2mn 0s
Bit rate mode : Variable
Bit rate : 71 bps
Stream size : 1.05 KiB (0%)
Language : Spanish
Encoded date : UTC 2009-08-31 17:58:24
Tagged date : UTC 2009-09-01 19:02:16

Text #3
ID : 6
Format : Timed text
Muxing mode : sbtl
Codec ID : tx3g
Duration : 2mn 0s
Bit rate mode : Variable
Bit rate : 63 bps
Stream size : 944 Bytes (0%)
Language : French
Encoded date : UTC 2009-08-31 17:58:24
Tagged date : UTC 2009-09-01 19:02:16

Text #4
ID : 7
Format : Timed text
Muxing mode : sbtl
Codec ID : tx3g
Duration : 2mn 0s
Bit rate mode : Variable
Bit rate : 63 bps
Stream size : 944 Bytes (0%)
Language : German
Encoded date : UTC 2009-08-31 17:58:24
Tagged date : UTC 2009-09-01 19:02:16

Text #5
ID : 8
Format : Timed text
Codec ID : tx3g
Duration : 2mn 0s
Bit rate mode : Variable
Bit rate : 71 bps
Stream size : 1.05 KiB (0%)
Language : English
Encoded date : UTC 2009-08-31 17:58:24
Tagged date : UTC 2009-09-01 19:02:16

Text #6
ID : 9
Format : Timed text
Codec ID : tx3g
Duration : 2mn 0s
Bit rate mode : Variable
Bit rate : 71 bps
Stream size : 1.05 KiB (0%)
Language : Spanish
Encoded date : UTC 2009-08-31 17:58:24
Tagged date : UTC 2009-09-01 19:02:16

Text #7
ID : 10
Format : Timed text
Codec ID : tx3g
Duration : 2mn 0s
Bit rate mode : Variable
Bit rate : 63 bps
Stream size : 944 Bytes (0%)
Language : French
Encoded date : UTC 2009-08-31 17:58:24
Tagged date : UTC 2009-09-01 19:02:16

Text #8
ID : 11
Format : Timed text
Codec ID : tx3g
Duration : 2mn 0s
Bit rate mode : Variable
Bit rate : 63 bps
Stream size : 944 Bytes (0%)
Language : German
Encoded date : UTC 2009-08-31 17:58:24
Tagged date : UTC 2009-09-01 19:02:16

Text #9
ID : 12
Format : Apple text
Codec ID : text
Duration : 3mn 40s
Bit rate mode : Variable
Bit rate : 10 bps
Stream size : 262 Bytes (0%)
Language : English
Encoded date : UTC 2009-09-01 19:00:46
Tagged date : UTC 2009-09-01 19:02:16

Text #10
ID : 13
Format : Apple text
Codec ID : text
Duration : 3mn 40s
Bit rate mode : Variable
Bit rate : 10 bps
Stream size : 262 Bytes (0%)
Language : Spanish
Encoded date : UTC 2009-09-01 19:01:03
Tagged date : UTC 2009-09-01 19:02:16

Zenitram
29th October 2009, 10:04
Brazil2,

I'm getting strange results with a MTS file recorded with a Panasonic TZ7:

(...)

And also MPC-HC, TsMuxer and MP4Box are all saying that the file is 50 FPS.
Example from MPC-HC:
Video: MPEG4 Video (H264) 1280x720 50.00fps [Video]
Audio: Dolby AC3 48000Hz stereo 192Kbps [Audio]

Theses tools are actually wrong.
After the release of the version with the patch for your file, I had feedback with fps problem.
I investigated a bit more, and I see my error now: raw stream (AVC) indication and timestamp are at 50 fps, container (PES level) timestamp is at 25 fps (crazy, but real)

Someone else sent me Panasonic SZ3 and HMC150 (like the TZ7, but from USA) records with the same problem (and the NTSC flag is present too, but this normal for them, so I iamgine Panasonic didn't remove the flag for Europe)

So I display both values:
Frame rate : 25.000 fps
Original frame rate : 50.000 fps
(yes, SeeMoreDigital will not like it, I still use "original" word, I know :-D )

You can test the latest development snapshot (at least version 200910229):
http://sourceforge.net/projects/mediainfo/files/zzz_Development%20snapshots/

SeeMoreDigital
29th October 2009, 19:22
So I display both values:
Frame rate : 25.000 fps
Original frame rate : 50.000 fps
(yes, SeeMoreDigital will not like it, I still use "original" word, I know :-D ) LOL.... You're right I don't.

Given that these "AVC-Lite" compatible cameras are generating AVC video streams with "repeat frames", I'd much prefer something like: -Encoded Frame Rate : 25.000 fps
Flagged Frame Rate : 50.000 fpsCheers

b66pak
29th October 2009, 20:38
Note about text streams: VLC displays only 9 text streams, 1 less than me; Text #9 (Track #12) is not handled, this is the same format definition as Text #10 (Track #13), if you have an idea of the reason...

the last two text tracks are chapter tracks...the english one (text #9) contains chapters in english and is assigned to the english audio track...the spanish one (text #10) contains chapters in spanish and is assigned to the spanish audio track...play the file with Apple QuickTime and when you change the audio track the chapter language is changed accordingly...

Text #9
ID : 12
Format : Apple text
Codec ID : text
Duration : 3mn 40s
Bit rate mode : Variable
Bit rate : 10 bps
Stream size : 262 Bytes (0%)
Language : English
Encoded date : UTC 2009-09-01 19:00:46
Tagged date : UTC 2009-09-01 19:02:16

Text #10
ID : 13
Format : Apple text
Codec ID : text
Duration : 3mn 40s
Bit rate mode : Variable
Bit rate : 10 bps
Stream size : 262 Bytes (0%)
Language : Spanish
Encoded date : UTC 2009-09-01 19:01:03
Tagged date : UTC 2009-09-01 19:02:16
_

Toddler Naruto
1st November 2009, 12:07
Thanks alot for releasing & maintaining MediaInfo, I think it's a very awesome tool :)!

Zenitram
1st November 2009, 12:13
Thanks alot for releasing & maintaining MediaInfo, I think it's a very awesome tool :)!

Spread the word ;-)

Keiyakusha
9th November 2009, 17:28
Hi. Mediainfo shows that wavpack stream has 2 channels when actually its 5.1
Sample (http://www.mediafire.com/file/z2ybzvbhzzt/sample.mkv)

vlada
9th November 2009, 21:03
Hi,

I have a problem with ffmpeg and I'm wondering if MediaInfo can help me. I always thought that for ffmpeg the first stream is video and next streams are audio. Now I have a MP4 file, which according to ffmpeg has stream #0 audio and stream #1 video. Can MediaInfo help me to detect such video files? How is the order of streams that ffmpeg uses defined?

Zenitram
9th November 2009, 21:14
I always thought that for ffmpeg the first stream is video and next streams are audio.

First stream can be video, audio, text, timecode... There are no order policy in specifications, in MP4 or AVI or any format I know.

Now I have a MP4 file, which according to ffmpeg has stream #0 audio and stream #1 video. Can MediaInfo help me to detect such video files? How is the order of streams that ffmpeg uses defined?

MediaInfo does not provide the order (why would it useful?), but provides the ID of a stream (in all views except "Easy View").
And usualy, first stream has ID 1, second stream has ID 2 and so on... I have many samples with Video ID = 2 and Audio ID = 1...

vlada
9th November 2009, 21:46
Thank you for the quick reply. I checked the ID of audio stream and it was "1". So I thought the video stream will be 0 and didn't check it. Now I double checked and the IDs are exactly as you said. So I can use ID-1 as stream number for ffmpeg, that's perfect! Sorry for such a stupid question, I should have checked the IDs better.

Zenitram
10th November 2009, 11:49
Mediainfo shows that wavpack stream has 2 channels when actually its 5.1

Thanks for the sample, corrected, will be available in the next official release.

martinfrombern
13th November 2009, 03:16
how to get writing library information (e.g. encoder and version of it) in CLI version?
Tried things like --Inform=Video;%Writing_Library% and similar, but no success

Zenitram
13th November 2009, 09:01
how to get writing library information (e.g. encoder and version of it) in CLI version?
Tried things like --Inform=Video;%Writing_Library% and similar, but no success

MediaInfo --Help for some help.
MediaInfo --Info-Parameters for the list of parameters

-->
Encoded_Application : Software. Identifies the name of the software package used to create the file, such as Microsoft WaveEdit.
Encoded_Application/Url : Software. Identifies the name of the software package used to create the file, such as Microsoft WaveEdit.
Encoded_Library : Software used to create the file
Encoded_Library/String : Software used to create the file
Encoded_Library/Name : Info from the software
Encoded_Library/Version : Version of software
Encoded_Library/Date : Release date of software
Encoded_Library_Settings : Parameters used by the software

MediaInfo --Inform=Video;%Encoded_Library% or others depends of what is the precise field you want.

For having the "Inform" fields directly displayed, so you can see which field is interessant:
MediaInfo --Language=raw -f

vlada
14th November 2009, 22:54
Thank you for the quick reply. I checked the ID of audio stream and it was "1". So I thought the video stream will be 0 and didn't check it. Now I double checked and the IDs are exactly as you said. So I can use ID-1 as stream number for ffmpeg, that's perfect! Sorry for such a stupid question, I should have checked the IDs better.

I thought it can't be that easy. :confused: Now I have a sample video with IDs 101 and 102 and ffmpeg refers the streams as 0 and 1. Another example is a DVD-Video I have. This is what MediaInfo tells me about the file:

Video
ID : 224 (0xE0)
Format : MPEG Video
Format version : Version 2

Audio #1
ID : 128 (0x80)
Format : AC-3
Format/Info : Audio Coding 3

Audio #2
ID : 129 (0x81)
Format : AC-3
Format/Info : Audio Coding 3

Audio #3
ID : 130 (0x82)
Format : AC-3
Format/Info : Audio Coding 3

Audio #4
ID : 131 (0x83)
Format : AC-3
Format/Info : Audio Coding 3

Text #1
ID : 32 (0x20)
Format : RLE
Format/Info : Run-length encoding

Text #2
ID : 33 (0x21)
Format : RLE
Format/Info : Run-length encoding


And now how ffmpeg sees the file:
http://a.imagehost.org/0795/ffmpeg.png

I know this is more an ffmpeg issue, but maybe you know how to get the stream numbers that ffmpeg uses....

Zenitram
14th November 2009, 23:49
I thought it can't be that easy. :confused: Now I have a sample video with IDs 101 and 102 and ffmpeg refers the streams as 0 and 1.

Your image is not available.
So I don't understand the problem.
MediaInfo provides the ID of each stream, in the order of theses IDs, I have no idea about how FFMpeg works.

Kurtnoise
15th November 2009, 10:47
I think that vlada is confused by tracks numbers and tracks IDs...Here is a typical FFmpeg output from VOB file :

Duration: 00:06:37.28, start: 0.208056, bitrate: 7435 kb/s
Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x576 [PAR 64:45 DAR 16:9]
, 9800 kb/s, 25 tbr, 90k tbn, 50 tbc
Stream #0.1[0x85]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
Stream #0.2[0x84]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
Stream #0.3[0x83]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
Stream #0.4[0x82]: Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
Stream #0.5[0x81]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
Stream #0.6[0x80]: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
Stream #0.7[0x2f]: Subtitle: dvdsub
Stream #0.8[0x31]: Subtitle: dvdsub
Stream #0.9[0x30]: Subtitle: dvdsub
Stream #0.10[0x2e]: Subtitle: dvdsub
Stream #0.11[0x2d]: Subtitle: dvdsub
Stream #0.12[0x2c]: Subtitle: dvdsub
Stream #0.13[0x2a]: Subtitle: dvdsub
Stream #0.14[0x29]: Subtitle: dvdsub
Stream #0.15[0x28]: Subtitle: dvdsub
Stream #0.16[0x25]: Subtitle: dvdsub
Stream #0.17[0x27]: Subtitle: dvdsub
Stream #0.18[0x26]: Subtitle: dvdsub
Stream #0.19[0x24]: Subtitle: dvdsub


In blue you have tracks IDs and in red tracks numbers...check out the FFmpeg documentation why you have 0.xx

About default's MediaInfo output : you have the track ID [ex: 0x80 (hexa) = 129 (integer)] & the track number corresponding [#1], etc...

vlada
15th November 2009, 13:15
Zenitram> I fixed the image, but Kurtnoise already perfectly explained, what I meant.

Kurtnoise> How do I get the track number from MediaInfo? I can only see StreamKindID and StreamKindPos. This helps me to identify order of tracks of certain type (usually audio tracks) but I still don't know, which track is first (audio or video). In the VOB (DVD-Video) example I posted the video track has ID higher the all audio tracks but still ffmpeg sees it as first track (#0.0). I tried to search the ffmpeg documentation but I couldn't find anything that would help me to understand it.

Zenitram
15th November 2009, 13:19
Kurtnoise> How do I get the track number from MediaInfo? I can only see StreamKindID and StreamKindPos.

?
As you can see in the MediaInfo output, there is an ID field too. ID is the number in brackets in FFMpeg (in blue in Kurtnoise example).

vlada
15th November 2009, 14:23
?
As you can see in the MediaInfo output, there is an ID field too. ID is the number in brackets in FFMpeg (in blue in Kurtnoise example).

I know this. But to demux or transcode certain audio track using ffmpeg, I have to use -map switch (http://howto-pages.org/ffmpeg/#map). This switch accepts the red number. So I'm wondering if there is any possibility to get this number from MediaInfo.

Zenitram
15th November 2009, 14:27
This switch accepts the red number. So I'm wondering if there is any possibility to get this number from MediaInfo.

The red number seems to be the order of appearence.
There is no such field in MediaInfo.
I don't plan to integrate such a field myself, this is possible, but I don't want to spend time on it, not my priority.

vlada
15th November 2009, 14:58
Zenitram> OK, understand. I will code a workaround for this, it shouldn't be that difficult.

Btw. some time ago we talked about IFO parsing. Has this moved a little higher on your to-do list? Basically all I need to know is correct movie length, audio/subtitle languages and chapters. Do you plan to support it?

Thanks for all your work and perfect support!

Zenitram
15th November 2009, 15:00
Btw. some time ago we talked about IFO parsing. Has this moved a little higher on your to-do list? Basically all I need to know is correct movie length, audio/subtitle languages and chapters. Do you plan to support it?

No, I currently have more "professional" and paid feature requests, I focus on it (I try to live from MediaInfo), so IFO, not very professional ;-), is even lower in my to-do list.

LoRd_MuldeR
15th November 2009, 23:08
I understand why you focus on paid feature requests, sure. But how is IFO parsing not professional? IFO files are part of the official Video DVD specs, as used on millions of DVD discs.

Zenitram
15th November 2009, 23:21
But how is IFO parsing not professional? IFO files are part of the official Video DVD specs, as used on millions of DVD releases.

IFO is created by professionals, but the usage of MediaInfo for IFO (or Blu-ray) is not very professional, I know a bit where is used MediaInfo for theses formats ;-).
Professionals using my software are currently interested more in digital preservation --> DV, MPEG-TS (Satellitte), and now MXF , I currently focus on them, but I try to not forget my base, and I will try to have a good parser for all formats... But days are only 24 hour long and bug tracker is not empty :(.

And unfortunatly, even if MediaInfo si open-source software, nobody is currently helping me, I hope to be able next year to pay someone in order to fix all issues like your IFO problem.
(if you like formats, if you like C++, don't hesitate to contact me :-D )

LoRd_MuldeR
15th November 2009, 23:35
Sorry, but I don't have time to work on yet another project. I already work on several personal/hobby projects in addition to my "real life" job ;)

zn
16th November 2009, 04:35
Resolution : 16 bits

This is irrelevant description for MP3, MP2, OGG and AAC audio, because they use float values inside.
(decoders mpg123, faad, oggdec supports float or 16/24/32 int output)

Zenitram
17th November 2009, 10:11
This is irrelevant description for MP3, MP2, OGG and AAC audio, because they use float values inside.
(decoders mpg123, faad, oggdec supports float or 16/24/32 int output)

OK.
I removed "Resolution" field for MPEG Audio, Vorbis (OGG is not an audio format ;-) ), ADTS, ADIF and MPEG-4 AudioSpecificConfig (the last 3 are the different forms of AAC I have), they actually were "forced" in my code, this was not a good idea.

Keiyakusha
17th November 2009, 17:22
Ohh, I always forget to ask... mediainfo shows for mkv files something like this:
Container profile=Unknown@4.1
what this means? 4.1 looks like AVC level, there should be something like "High" instead of unknown then? :confused:

Also does some infotip configuring planned?

MrC
17th November 2009, 17:23
Hi Zenitram,

first of all I would like to thank you for your hard and great work on MediaInfo. I have been using it since ages in AVStoDVD and I must say it is a very reliable and useful tool.

I have a reading issue to report: this 5.1 DTS file (http://avstodvd.googlepages.com/dtspiano.dts) (4 MB) should have a bitrate of 1536 kbps and that bitrate was correctly read by MediaInfo until release 0.7.10. Latest releases read 1509 kbps, actually saying that that file is not DVD compliant, while it should be.

Thanks in advance for your reply

;)

Bye

Zenitram
17th November 2009, 17:35
mediainfo shows for mkv files something like this:
Container profile=Unknown@4.1
what this means?

This is something I didn't yet understand.
Matroska trace example:
(...)
0000115A CodecPrivate (41 bytes)
0000115A Header (3 bytes)
0000115A Name: 23A2 (9122)
0000115C Size: 26 (38)
0000115D Specific (38 bytes)
0000115D Header (0 bytes)
0000115D Profile: 1 (1)
0000115E Compatible profile: 64 (100)
0000115F Reserved: 0 (0)
00001160 Level: 29 (41)
00001161 Reserved: 3F (63)
00001161 Size of NALU length minus 1: 3 (3)
00001162 Reserved: 7 (7)
00001162 seq_parameter_set count: 1 (1)
00001163 seq_parameter_set (25 bytes)
00001163 Size: 17 (23)
00001165 nal_ref_idc: 3 (3)
00001165 nal_unit_type: 7 (7)
00001166 profile_idc: 64 (100)
(...)

The same thing in a MP4:
(...)
00000643 AVC decode (33 bytes)
00000643 Header (8 bytes)
00000643 Size: 21 (33)
00000647 Name: avcC
0000064B Version: 1 (1)
0000064C Specific (24 bytes)
0000064C Header (0 bytes)
0000064C Profile: 4D (77)
0000064D Compatible profile: 40 (64)
0000064E Level: C (12)
0000064F Reserved: 3F (63)
0000064F Size of NALU length minus 1: 3 (3)
00000650 Reserved: 7 (7)
00000650 seq_parameter_set count: 1 (1)
00000651 seq_parameter_set (12 bytes)
00000651 Size: A (10)
00000653 nal_ref_idc: 1 (1)
00000653 nal_unit_type: 7 (7)
00000654 profile_idc: 4D (77)
(...)

I see this in some MKV and in some FLV.
Theses files are reported to be NOT playable on some HW players, so users want to see if the "Profile" field is the same as in the seq_parameter_set. if they are different, I display "Container profile" (this value is not used by any player I know), and 1 is un unknown profile from specs.

I am interested if you have any explaination about this...

Zenitram
17th November 2009, 17:47
this 5.1 DTS file (http://avstodvd.googlepages.com/dtspiano.dts) (4 MB) should have a bitrate of 1536 kbps

No, see DTS specifications:
Due to the limitations of the transmission medium the actual bit rate may be slightly different from the targeted bit rate,
as listed in table 5.8 for the two types of applications

Table 5.8: Targeted and actual bit-rate for the CD and DVD-Video applications
Targeted Bit Rate --> Actual Bit Rate on DVD-Video Discs
768 --> 754.50 (DVD-Video Discs)
1 411,2 --> 1 234,8 (DTS CDs)
1536 --> 1509.75 (DVD-Video Discs)


MediaInfo tries to display the real bitrate on the medium, so from v0.7.15 I correct bitrates to mach with actual bitrate and not targeted bitrate.

MrC
19th November 2009, 12:23
Thanks for the crystal clear explanation, Zenitram.

May I ask you another question? When reading chapters position in matroska containers, the visualization is quite different from other media parameters:

Menu
00:00:00.000 : :Chapter 1
00:02:11.200 : :Chapter 2
00:05:10.240 : :Chapter 3
00:09:09.240 : :Chapter 4
00:13:44.040 : :Chapter 5
00:16:07.120 : :Chapter 6
00:21:51.480 : :Chapter 7
00:24:50.360 : :Chapter 8
00:31:43.480 : :Chapter 9
00:39:12.400 : :Chapter 10
00:41:17.520 : :Chapter 11
00:46:40.360 : :Chapter 12
00:52:08.720 : :Chapter 13
00:58:27.840 : :Chapter 14
01:02:42.600 : :Chapter 15
01:06:37.440 : :Chapter 16
01:11:50.200 : :Chapter 17
01:15:31.080 : :Chapter 18
01:20:52.400 : :Chapter 19
01:23:23.880 : :Chapter 20

It is quite difficult to read infos formatted in that way using mediainfo.dll reading function (MediaInfo_Get), because MediaInfo_Info_Text or MediaInfo_Info_Name are not univocal, like i.e. FrameRate or ScanType.

Is there any workaround I can use to automate chapters reading thru mediainfo.dll?

Thanks in advance

;)

Bye

Zenitram
19th November 2009, 12:39
It is quite difficult to read infos formatted in that way using mediainfo.dll reading function (MediaInfo_Get)

Yes.
I unfortunalely didn't find a good way to display chapters like the other fields.

Is there any workaround I can use to automate chapters reading thru mediainfo.dll?

Pseudo code:
int Chapters_Pos_Begin=MediaInfo_Get("Chapters_Pos_Begin"); //You must transform the string in int
int Chapters_Pos_End=MediaInfo_Get("Chapters_Pos_End");//You must transform the string in int
for (int Pos=Chapters_Pos_Begin; Pos<Chapters_Pos_End; Pos++)
{
string Time=MediaInfo_Get(Pos, Info_Name);
string Text=MediaInfo_Get(Pos);
}

MrC
20th November 2009, 14:18
That's just what I was looking for

Thanks!

;)

Bye

Zenitram
2nd December 2009, 18:19
Shark007 and SeeMoreDigital:
For your consideration; This 7.1 TrueHD audio (http://www.mediafire.com/download.php?jjytugeo5tm) sample is detected as only having 6 channels. Current FFDshow (rev3094) releases detect all 8 channels.
If MediaInfo could identify the properties of the "core" and "HD" parts separately, yes this would be very useful.

I am working on this issue! I tried to make a understable display about Core and HD parts, next version would have for this audio stream:
Audio
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : AC-3
Format/Info : Audio Coding 3
Format profile : TrueHD / Core
Muxing mode : Stream extension
Duration : 12s 10ms
Bit rate mode : Variable / Constant
Bit rate : Variable / 640 Kbps
Channel(s) : 8 channels / 6 channels
Channel positions : Front: L C R, Surround: L R, rs: L R, LFE / Front: L C R, Surround: L R, LFE
Sampling rate : 96.0 KHz / 48.0 KHz

I hope you like it!

Edit: I inverted TrueHD and Core data for compatibility with third-party software which uses "text to integer" values and want the highest result.

Shark007
6th December 2009, 01:58
Very nice solution Zenitram. good work.