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

Atak_Snajpera
5th March 2008, 01:03
Zenitram audio is still not detected. I hope you will fix that in future :)

Zenitram
5th March 2008, 08:28
Zenitram audio is still not detected. I hope you will fix that in future :)
I try always to correct bugs ;-)

But... With your example file, I have this:
General #0
ID : 0
Complete name : F:\Programmation\MediaInfoLib_CrashTest\Multiple\MPEG Transport\BluRay\VC-1, LPCM\300.edit.ts
Format : MPEG-1 Transport
Format/Family : MPEG-1
File size : 63.6 MiB

Video #0
ID : 4129 (0x1021)
MenuID : 1 (0x1)
Codec : VC-1
Codec profile : Advanced@3
Width : 1920 pixels
Height : 1080 pixels
Display Aspect ratio : 16/9
Frame rate : 23.976 fps
Chroma : 4:2:0
Interlacement : Progressive

Audio #0
ID : 4133 (0x1025)
MenuID : 1 (0x1)
Codec : AC3
Bit rate mode : CBR
Bit rate : 640 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Rear: L R, LFE
Sampling rate : 48 KHz
Language : English

Audio #1
ID : 4134 (0x1026)
MenuID : 1 (0x1)
Codec : PCM
Codec/Family : PCM
Codec settings : Big / Signed
Codec settings, Endianness : Big
Codec settings, Sign : Signed
Resolution : 24 bits
Language : English

Audio #2
ID : 4135 (0x1027)
MenuID : 1 (0x1)
Codec : TrueHD
Bit rate mode : CBR
Channel(s) : 6 channels
Channel positions : Front: L C R, Rear: L R, LFE
Sampling rate : 48 KHz
Language : English

Audio #3
ID : 4141 (0x102D)
MenuID : 1 (0x1)
Codec : AC3
Bit rate mode : CBR
Bit rate : 448 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Rear: L R, LFE
Sampling rate : 48 KHz
Language : Chinese


--> For me this is OK.
If you speak about the DTS file with wrong extension, I didn't yet take a look on it, but I will (I have a life next to my promgrammer life ;-) )

PS: Shrade, x264 info was in a development snapshot, I don't remember which one, but don't worry, I will work on it today, the next development snapshot will have x264 info.

Zenitram
5th March 2008, 18:29
Zenitram audio is still not detected. I hope you will fix that in future :)
If you speak about your DTS file with wrong extension, it is corrected in version 20080305:
http://sourceforge.net/project/showfiles.php?group_id=86862&package_id=197932
General #0
Complete name : F:\Programmation\MediaInfoLib_CrashTest\Video\MPEG-1&2 Video\False-positive\audio.1.mpa
Format : DTS
File size : 11.0 MiB
PlayTime : 59s 844ms
Bit rate : 1536 Kbps

Audio #0
Codec : DTS
Bit rate : 1536 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Surround: L R, LFE
Sampling rate : 48 KHz
Resolution : 24 bits
No more detailed x264 infos with latest official build :(
I was never able to get any detailed x264 info :-/ No matter what build I tried.
Any chance you could point to one that worked for you?
I tested again with my example files:
- x264 in AVI or raw x264 stream should always work in the latestest official release.
- x264 in MKV was not working, now it is OK in version 20080305
General #0
Complete name : F:\Programmation\MediaInfoLib_CrashTest\Multiple\MKV\AVC\Standard_NTSC_AVC+MP3.mkv
Format : Matroska
File size : 5.30 MiB
PlayTime : 53s 804ms
Bit rate : 827 Kbps
Movie name : Done with AutoMKV 0.95b http://forum.doom9.org/showthread.php?t=134478
Encoded date : UTC 2008-02-13 16:06:07
Writing application : mkvmerge v2.1.0 ('Another Place To Fall') built on Aug 19 2007 13:40:07
Writing library : libebml v0.7.7 + libmatroska v0.8.1

Video #0
Codec : AVC
Codec/Family : AVC
Codec/Info : Advanced Video Codec
Codec profile : High@L4.1
Codec settings, CABAC : Yes
PlayTime : 53s 750ms
Width : 720 pixels
Height : 480 pixels
Display Aspect ratio : 4/3
Frame rate : 23.976 fps
Standard : NTSC
Chroma : 4:2:0
Interlacement : Progressive
Title : Standard_NTSC
Writing library : x264 - core 58 svn-736M
Encoding settings : cabac=1 / ref=3 / deblock=1:-2:-1 / analyse=0x3:0x133 / me=umh / subme=5 / me-prepass=0 / brdo=0 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=0 / threads=6 / nr=0 / decimate=1 / mbaff=0 / bframes=3 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=1 / bime=1 / keyint=250 / keyint_min=25 / scenecut=40(pre) / rc=crf / crf=24.0 / rceq='blurCplx^(1-qComp)' / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / pb_ratio=1.30 / aq=0

Audio #0
Codec : MPEG-1 Audio layer 3
Codec profile : Joint stereo
Bit rate mode : VBR
Channel(s) : 2 channels
Sampling rate : 48 KHz
Resolution : 16 bits
Writing library : Gogo (after 3.0)
Language : English

Chapters #0
Language : English
1 : 00:00:00.000 Chapter 1
- x264 raw stream in .mp4 is not yet parsed (--> no information from the stream, only from the SPS/PPS). Planned.

Don't hesitate to provide me samples which don't work in MediaInfo!

Atak_Snajpera
5th March 2008, 21:51
Thanks!

bond
23rd March 2008, 22:52
sample file
http://www.mediafire.com/?e2jafizmgdwhi Atak_Snajpera. I am looking for a bluray sample and wanted to ask whether this is from bluray or a different source, like hdtv?

:thanks:

Atak_Snajpera
23rd March 2008, 23:23
hi Atak_Snajpera. I am looking for a bluray sample and wanted to ask whether this is from bluray or a different source, like hdtv?
Remuxed from Blu-Ray

vlada
25th March 2008, 19:12
Hi,
it's me again with some comments, bug reports, suggestions a feature requests.

While building my application I now moved towards getting information about DVDs and found some more problems.

1) Video Codec says MPEG-2, while Video Codec/Family displays MPEG-V. I'm using the "Codec/Family" to get video compression. It is the very common codec/format confusion I was talking about here (http://forum.doom9.org/showthread.php?t=134736). The Codec field should rather display the encoder used (HC, QuEnc, CCE, ProCoder etc.) if it is possible to get them. It's just a very small issue, but it would save me some code if this gets fixed in MediaInfo.

Or maybe add a new field called "Compression"? Or rename the "Codec/Family" to "Compression".

2) PAR of DVD (VOB) is displayed incorrectly. For a standard PAL 16:9 DVD the PAR should be 1.422, but MediaInfo returns 0.703 (which is 1/1.422).

3) Is it possible to get language of an audio track inside a VOB?

Thank you for your hard work. Your program helps me a lot.

Zenitram
25th March 2008, 23:32
Hi,
it's me again with some comments, bug reports, suggestions a feature requests.

All comments, bug reports, suggestions are welcome :)

While building my application I now moved towards getting information about DVDs and found some more problems.

1) Video Codec says MPEG-2, while Video Codec/Family displays MPEG-V. I'm using the "Codec/Family" to get video compression. It is the very common codec/format confusion I was talking about here (http://forum.doom9.org/showthread.php?t=134736).

I gave up the crusade against DivX a long time ago...
FYI, I tried to put "MPEG-4V" (for "MPEG-4 Visual") instead of "DivX" in a "Format" field for some earlier version of MediaInfo, and I tried to put "DivX" in a "Encoded library" field . I recieved tens of email from people saying me that their file is DivX, not a stupid and unknown MPEG-4 Visual...
And for the DivX container format, I show "Divx (Hack of AVI)" instead of saying that is an AVI file, because I received emails saying that the file is a ".divx" file, and that this is not AVI...
The only crusade I currently do is saying that DivX 6 does NOT exist, that the 4CC is always "DX50" and that I can not detect DivX 6 because of no specific 4CC... This is hard enough!
So... the "Codec" field is currently the 4CC/2CC/Matroska string included in the container, and self made text for MPEG streams. This is not the encoder name.

The Codec field should rather display the encoder used (HC, QuEnc, CCE, ProCoder etc.) if it is possible to get them. It's just a very small issue, but it would save me some code if this gets fixed in MediaInfo.

Or maybe add a new field called "Compression"? Or rename the "Codec/Family" to "Compression".


The encoder name is the "Encoded_Library" field.
But only when I can detect it (if there is some data in the user_data part (0x000001B2) ). MPEG-2V encoders put often no encoder info, so I can't detect it.
If you are sure that some encoders put the encoder name in the stream, please send me examples.


2) PAR of DVD (VOB) is displayed incorrectly. For a standard PAL 16:9 DVD the PAR should be 1.422, but MediaInfo returns 0.703 (which is 1/1.422).


Oh... I was using the old values included in the MPEG-1 Video spec (pel_aspect_ratio=height/width)
PAR is inverted, compared to usual usage. I will change this.


3) Is it possible to get language of an audio track inside a VOB?


The language is not a part of a .vob (exactly : a MPEG PS file). This piece of info is only in the IFO file. I plan to corelate xxx.vob with xxx.ifo later, to be able to show the language of a MPEG stream, but this is not currently my priority.

vlada
26th March 2008, 15:57
Zenitram
Thanks a lot for your replies. So what about adding a field called "Format" which would show MPEG-1/MPEG-2/MPEG-4 ASP/MPEG-4 AVC/VC-1/DV/MJPEG etc.?

This way you can keep the Codec field as it is now (most people don't know the difference between codec and format anyway) and it will allow me to get format of a video. Because the format is important, anybody can change 4CC of an AVI video within a couple of seconds.

Btw. my opinion is that just because 99% of people are doing something wrong won't make me doing it wrong too. But I agree with you that this is usually very unpractical.

Zenitram
26th March 2008, 16:13
Btw. my opinion is that just because 99% of people are doing something wrong won't make me doing it wrong too. But I agree with you that this is usually very unpractical.
This is why there is a "Codec/Family" field. DivX or XviD or 3ivX are in the "MPEG-4V" family.
If this field is empty, you use the "Codec" field for having the codec.
"Codec/Family" is not OK for you? Some other geeks use this field to be able to know which decoder must be used.

If needed, you can help me to complete this file:
http://mediainfo.svn.sourceforge.net/viewvc/*checkout*/mediainfo/MediaInfoLib/trunk/Source/Ressource/Text/DataBase/Codec.csv
The first column is the 2CC/4CC/Matroska string/my custom string for the "Codec" field".
The 2nd column is for "Codec/String" (a more explicit string)
The 5th column is the "Codec/Family".
If you think there is problems or missings in this file, don't hesitate to fill it, I will integrate it to the next version.

SeeMoreDigital
26th March 2008, 17:23
Would the following be a possible compromise: -

Video #0
Codec : MP4V
Codec/Family : MPEG-4 Part-2 (ASP)
Encoder : Xvid 1.1.2 Final
Play Time : 60s 000ms
Bit rate mode : VBR
Bit rate : 200 Kbps
Pixel Width : 720
Pixel Height : 576
Display Aspect Ratio : 16:9 (1.777:1)
Frame Rate : 25.000 fps
Frame Number : 1500
Frame Structure : Progressive
Field Order : BFF
Bits/(Pixel*Frame) : 0.172

Cheers

Zenitram
26th March 2008, 18:06
Codec : MP4V
When I tried to show "MPEG-4 Visual" to the user for the main identity of the codec, I was spammed of emails saying that it is DivX,or XviD etc... Mainly because the 4CC is "XVID" for Xvid encoded stream, and "DX50" for a DivX encoded stream.
And the "normal" users want to know if it is DivX or Xvid 4CC (I know, this is stupid, but the user needs is important :) ).

Codec/Family : MPEG-4 Part-2 (ASP)
ASP is a profile, not a family. MPEG-4 Visual (Part-2) is the family, ASP a profile, or am I wrong?
So I think this is not good to put the profile in the Family field.
The profile is currently in the "Codec profile" field (with the level). (when available. For example, DivX encoder does not put the profile in the MPEG-4 Visual stream, so I don't show it...)


Play Time : 60s 000ms

000ms is currently not shown, this is not good, I will change it.


Encoder : Xvid 1.1.2 Final

My english is so bad... :)
The problem with "Encoder" is that I can show 2 kinds of names :
- The encoding library (ie XviD)
- The encoding application (ie VirtualDub)
What would be the good translation, without misunderstanding, of theses 2 fields?


Frame Structure : Progressive
Field Order : BFF

I currently only use 1 field for both. The field can be set to PPF/TFF/BFF.
To you want to have 2 fields?
- "Frame Structure" field for "Interlaced"/"Progressive"
- "Field Order" field for the interlacement mode (TFF/BFF)

Note: another guy has just proposed "Scan type" instead of "Frame Structure".


Pixel Width : 720
Pixel Height : 576


This can be better...

Thanks for the pieces of advices, don't hesitate to propose other modifications!

clsid
26th March 2008, 18:59
How about something like this:
Video #0
Format : MPEG-4 Visual
Codec ID : MP4V
Codec : Xvid 1.1.2 Final

Format is self-explanatory.
Codec ID is the FourCC, matroska id, etc.
Codec is the codec that was used for encoding.

Zenitram
26th March 2008, 19:06
Format : MPEG-4 Visual
OK.
Codec ID : MP4V (this is the FourCC, matroska id, etc)
OK
Codec : Xvid 1.1.2 Final
It can't be general: the encoder is not a decoder, if I change, this is for being good, not with a new weird word ;-)
For example, x264 is an encoder, but not a decoder. And Xvid decoder can decode DivX encoded stream.
"Encoder" seems to be better for this one.
(and more: for compatibility, I can't reuse "Codec" for another thing, because some third-party software wait for 4CC in this field... This field will not be shown anymore, but a software using the DLL will have the field...)
Encoding app : VirtualDub 1.7.6
OK

SeeMoreDigital
26th March 2008, 19:07
Hi Zenitram,

I currently only use 1 field for both. The field can be set to PPF/TFF/BFF.
To you want to have 2 fields?
- "Frame Structure" field for "Interlaced"/"Progressive"
- "Field Order" field for the interlacement mode (TFF/BFF)Having two fields is useful when analysing MPEG-2 and MPEG-4 Part-2 sources. With MPEG-4 Part-10 sources I guess just the frame structure is required, which could be listed as: MBAFF or PAFF.

Note: another guy has just proposed "Scan type" instead of "Frame Structure". I took the inspiration from Donald Graft's DGAVCIndex and DGMPGIndex tools ;)

I guess the displayed fields along with the information displayed, changes in relation to the muxer and container.

So here's another suggestion: -

MPEG-4 Part-10 in MP4
General #0
Path/File Name : C:\xxxxxxx
Container : MP4
Muxing Application : YAMB
File size (MB) : 1.23
Run Time (H:M:S:MS) : 00:00:50:800
Total Bit Rate (Kbps) : 203


Video #0
Codec ID : MP4V
Codec Format : MPEG-4 Part-10
Profile@Level : High@L4.1
Encoding Application : AutoMKV
Encoding Compressor : x264
Run Time (H:M:S:MS) : 00:00:50:800
Bit Rate Mode : VBR
Bit Rate (Kbps) : 200
Pixel Width : 720
Pixel Height : 432
Display Aspect Ratio : 2.37:1
Frame Rate (FPS) : 25.000
Total Frames : 1270
Frame Structure : MBAFF
Colourimetry : 4:2:0
Bits/(Pixel*Frame) : 0.026


MPEG-4 Part-2 in MP4
General #0
Path/File Name : C:\xxxxxxx
Container : MP4
Muxing Application : YAMB
File size (MB) : 1.23
Run Time (H:M:S:MS) : 00:00:50:800
Total Bit Rate (Kbps) : 203

Video #0
Codec ID : MP4V
Codec Format : MPEG-4 Part-2
Profile@Level : ASP@L1
Encoding Application : AutoMKV
Encoding Compressor : Xvid 0046
Run Time (H:M:S:MS) : 00:00:50:800
Bit Rate Mode : VBR
Bit Rate (Kbps) : 200
Pixel Width : 720
Pixel Height : 432
Display Aspect Ratio : 2.37:1
Frame Rate (FPS) : 25.000
Total Frames : 1270
Frame Structure : Progressive
Field Order : BFF
Colourimetry : 4:2:0
Bits/(Pixel*Frame) : 0.026


MPEG-4 Part-2 in AVI
General #0
Path/File Name : C:\xxxxxxx
Container : AVI (Audio Video Interleave)
Muxing Application : AVI-Mux GUI
File size (MB) : 1.25
Run Time (H:M:S:MS) : 00:00:50:800
Total Bit Rate (Kbps) : 205


Video #0
Codec ID : MP4V
Codec Format : MPEG-4 Part-2
Profile@Level : ASP@L1
Encoding Application : AutoMKV
Encoding Compressor : Xvid 0046
Run Time (H:M:S:MS) : 00:00:50:800
Bit Rate Mode : VBR
Bit Rate (Kbps) : 200
Pixel Width : 720
Pixel Height : 432
Display Aspect Ratio : 2.37:1
Frame Rate (FPS) : 25.000
Total Frames : 1270
Frame Structure : Progressive
Field Order : BFF
Colourimetry : 4:2:0
Resolution : 24 bit
Bits/(Pixel*Frame) : 0.026



Cheers

Zenitram
26th March 2008, 23:49
Having two fields is useful
when analysing MPEG-2 and MPEG-4 Part-2 sources.
OK, I will do this.


With MPEG-4 Part-10 sources I guess just the frame structure is required, which could list: MBAFF or PAFF.
I don't understand, I don't see theses items in the MPEG-4 part 10 specifications. Exemple of what I have :
- "frame_mbs_only_flag equal to 0 specifies that coded pictures of the coded video sequence may either be coded fields
or coded frames. frame_mbs_only_flag equal to 1 specifies that every coded picture of the coded video sequence is a
coded frame containing only frame macroblocks."
- "bottom_field_flag equal to 1 specifies that the slice is part of a coded bottom field. bottom_field_flag equal to 0
specifies that the picture is a coded top field. When this syntax element is not present for the current slice, it shall be
inferred to be equal to 0."


I took the inspiration from Donald Graft's DGAVCIndex and DGMPGIndex tools ;)


I took a look on the MPEG-4 part 10 specifications, for example, and they speak of "progressive-scan or interlaced-scan form" or "ct_type indicates the scan type".
So I think I will prefer "Scan type".
But: Scan types, BFF/TFF are always difficult for me to understand between 3/2 pulldown, picture drop, progressive scan with 2 interlaced half-pictures, this is hard :), so I may do errors... I am learning :).


I guess the displayed fields along with the information displayed, changes in relation to the muxer and container.

Yes, and this is my problem : most software parse only few kind of formats, I try to parse all kinds of format, and this is very difficult to have "standard" fields compatible with all formats :(.


So here's another suggestion: -

Thank you for your proposal.
I will think about it next week, please come back here next week, to discuss again of it!
I can't change all now, I plan to release an official release Friday, and I don't want to add bugs in this version while trying to change all theses field names.
Next official release will not include modifications from our discussion, but the next one will do.

vlada
27th March 2008, 06:10
I agree with clsid's suggestions. I think the first 2 fields should be Codec ID and Format. But instead of Codec, it might be better to use Encoder or Compressor.

For the interlacement I think there are following things to consider:
1) Frame structure, can be Frame or Field for most formats. For H.264 it can be Frame, PAFF or MBAFF.
2) Field order. For progressive (Frame based video) it doesn't make any sense, for interlaced content it is very important information, although come codecs/encoders don't let you set it (XviD, x264).

Zenitram
27th March 2008, 10:13
I agree with clsid's suggestions. I think the first 2 fields should be Codec ID and Format. But instead of Codec, it might be better to use Encoder or Compressor.
As said before, I can't do this, because you can have an AVI with a "DX50" codec ID, but encoded by XviD.
So I think a synthesis can be :
General:
- "Container" field, ie "Matroska"
- "Muxing library" field, ie "libebml v0.6.2 + libmatroska v0.6.1"
- "Muxing application" field, ie "mkvmerge v0.7.7"
Video:
- "Codec ID" field, ie "DX50" --> "DivX"
- "Format" field, ie "MPEG-4 Visual" (SeeMoreDigital, this name is in the MPEG-4 Part 2 spec, and I think it is more "interessant" for user than saying "MPEG-4 part 2")
- "Format profile" field, ie "Simple Profile"
- "Format settings" field, ie "GMC / Custom matrix"
- "Encoding library" field, ie "XviD 1.1.0"

For the interlacement I think there are following things to consider:
1) Frame structure, can be Frame or Field for most formats. For H.264 it can be Frame, PAFF or MBAFF.
2) Field order. For progressive (Frame based video) it doesn't make any sense, for interlaced content it is very important information, although come codecs/encoders don't let you set it (XviD, x264).
I didn't know there was difference in AVC, I took a look on:
http://forum.doom9.org/showthread.php?t=96598
I will try to implement this for a future release. This is currently not supported.
If I well understood :
- "Scan type" (I prefer this text because the AVC spec speak about this...) can be : Progressive, Interlaced, PAFF, MBAFF.
- "Field order" can be : TFF, BFF, Mixed (I am not sure, but I think I saw some video which can begin with TFF and change sometimes to BFF)

I try to understand multiple formats (MPEG-2 Video, MPEG-4 Visual, AVC, VC-1...) at the same time, interlacement and format settings are awful to understand! :mad:

vlada
27th March 2008, 17:34
- "Scan type" (I prefer this text because the AVC spec speak about this...) can be : Progressive, Interlaced, PAFF, MBAFF.

I probably confused you a little regarding this. PAFF and MBAFF are two different modes MPEG-4 part 10 (AVC,H.264) can use for interlaced video. PAFF is mainly used by AVCHD camcorders and TV broadcasts. It can encode each frame as 2 fields or as a complete frame. MBAFF is used by x264 and other encoders. It decides between fileds and frames per macroblock. So in a single frame can be progressive and interlaced macroblocks. At least this is how I understand it.

Anyway if a video is PAFF or MBAFF, it means it is interlaced (at least partially). I don't think H.264 can be forced to be completely interlaced (each frame saved as 2 fields).


- "Field order" can be : TFF, BFF, Mixed (I am not sure, but I think I saw some video which can begin with TFF and change sometimes to BFF)


I think it is possible to change field order on the go (mixed mode). But you will probably only find this on some recorded TS broadcasts. I think it would be very difficult to correctly play or deinterlace such movie unless it is possible to detect where the order is changed.

SeeMoreDigital
27th March 2008, 19:34
...For progressive (Frame based video) it doesn't make any sense... When displaying progressive images the decoder needs to be instructed whether to build the progressive image from the "bottom up-wards" ie: BFF or from the "top down-wards" ie: TFF.

vlada
27th March 2008, 21:38
Maybe I don't get something. But a progressive frame is stored as a complete picture. There are no fields. The whole frame is decoded and shown as one picture. It doesn't make any sense to to have a field order, because the fields simply don't exists.

Zenitram
28th March 2008, 00:04
Maybe I don't get something. But a progressive frame is stored as a complete picture. There are no fields. The whole frame is decoded and shown as one picture. It doesn't make any sense to to have a field order, because the fields simply don't exists.
From what I have read in the specifications, I think it is possible to have a progressive scan with interlaced fields (the timestamp for the two fields are same, the "progressive" image is constructed from 2 "half-images").
For the output, this is a progressive frame. But internaly this can be 2 fields.

SeeMoreDigital
28th March 2008, 00:17
Perhaps the phrases "Scan Type" (ie: Progressive, Interlaced, PAFF, MBAFF) and "Scan Order" (ie: TFF, BFF, Mixed), would be more appropriate ;)

vlada
28th March 2008, 12:41
Zenitram> Yes, this is possible. In fact it is very easy to create such video. Encode it as interlaced (field based) and then set it's flag as progressive. But the opposite - frame based video with interlace flags - is more common.

Anyway if both fields have equal timestamps, then none of them is first.

Atak_Snajpera
1st April 2008, 12:06
Zenitram
Is there any way to extract version number from dll via Delphi?

Zenitram
1st April 2008, 13:32
Zenitram
Is there any way to extract version number from dll via Delphi?
MediaInfo_Option (0, 'Info_Version', '');
or you can use the "Win32"" methods for reading the version a DLL as for any other DLL (but I don't know what it is in Delphi).
Take a look on the Delphi example provided with the MediaInfo DLL, there is some interesting info in it.

Atak_Snajpera
1st April 2008, 14:44
MediaInfo_Option (0, 'Info_Version', '');

Thanks :)

lexor
1st April 2008, 19:05
As said before, I can't do this, because you can have an AVI with a "DX50" codec ID, but encoded by XviD.

Aren't you trying to reinvent a square wheel then? Those tags have little to nothing to do with the standards, they are just hints for other apps that will use the stream, and these particular hints have a name already, it's FourCC. Just call it that and keep it separate from the actual standard names like MP4V, MPEG-4 Part-10 etc.

You said "Codec : MP4V" caused a storm of emails since people don't know the difference between a codec and an implementation of a codec, well make it:

Codec : MP4V
FourCC: Xvid

that's a complete description that covers all bases, and if anyone else complains after this... ignore.

Zenitram
1st April 2008, 19:11
that's a complete description,
Sorry, but you are wrong too.
A codec is a COder/DECoder.
"MP4V" is not a coder, and not a decoder.
But MP4V is a format... This is what I will try to show the next time. this will come soon.
and if anyone else complains after this... ignore.
Sorry, but my users are the reason I created this software, I don't plan to ignore them.
Users want to have "Divx 5", I can give this to them, and I will do it even if it a non-sense for you doom9 compression addicts. I try to have everybody happy.
Planned presentation is currently :
Format : MPEG-4 Visual
CodecID : DX50
CodecID/String : DivX 5

lexor
1st April 2008, 19:23
Sorry, but you are wrong too.
A codec is a COder/DECoder.
"MP4V" is not a coder, and not a decoder.
But MP4V is a format... This is what I will try to show the next time. this will come soon.

Not exactly I just quoted SMD's post to which you replied with the email thing. Your proposition of merger is arguably even more wrong
"Codec ID" field, ie "DX50" --> "DivX"
DivX, Xvid, x264 are not codecs, they are implementation of CODECs (well the first 2 are, x264 doesn't have its own DEC part, just the CO).


Sorry, but my users are the reason I created this software, I don't plan to ignore them.
Users want to have "Divx 5", I can give this to them, and I will do it even if it a non-sense for you doom9 compression addicts. I try to have everybody happy.
Planned presentation is currently :
Format : MPEG-4 Visual
CodecID : DX50
CodecID/String : DivX 5

I understand the need to cater to users, some of whom may not be tech savvy, but just want some info. However propagating misconceptions like DivX being a codec and different thing from mpeg4asp is not a good thing. As the provider of information you should try to help your users to become more knowledgeable about the info they are getting, and a better naming for tags (like calling DX50 a FourCC) is a good thing and will be appreciated in the long run.

Just my 2cents though.

Zenitram
1st April 2008, 19:35
I understand the need to cater to users, some of whom may not be tech savvy, but just want some info. However propagating misconceptions like DivX being a codec and different thing from mpeg4asp is not a good thing. As the provider of information you should try to help your users to become more knowledgeable about the info they are getting, and a better naming for tags (like calling DX50 a FourCC) is a good thing and will be appreciated in the long run.
This is why I will change, and I will use "Codec ID" (I will not use "Codec" alone!).
FourCC is not possible, because FourCC is only for AVI video, and I have not only AVI video (there is a 2CC for AVI audio, there is a text string for Matroska...), so I need a more generic term, I can't use "FourCC". MediaInfo must have the same "fields", whatever is the format or container.
And DivX is too much known, As I say before I gave up trying to educate everybody, so I can try some changements, but I can't change everybody mind. Note that I already say that "DivX 6" is not a format and that a divx container without DivX subtitles is an AVI ;-)
If you have a better suggestion for "Codec ID", I am interested, but "FourCC" is not possible.

lexor
1st April 2008, 21:01
If you have a better suggestion for "Codec ID", I am interested, but "FourCC" is not possible.

You are right, from that point of view this does seem like splitting hairs. Still how about VendorID? After all, regardless of how poorly old DivX implemented ASP profile, it's still technically an Mpeg4ASP implementation. DIVX, DX50 and Xvid are there to tell the user which tool (a.k.a which vendor's app) was used to make the stream, users/author's attempts to lie notwithstanding (i.e. labeling DivX as Xvid in avi 4cc).

This still however may lead to confusion with people thinking that VendorID is who made the movie, not the encoding/decoding tool. I think "CODEC VendorID" would be a perfect catch em all name... but it's kinda long.

Alternatively check out Foobar2000's properties tab:

Duration : 7:52.880 (20854008 samples)
Sample Rate : 44100 Hz
Channels : 2
Bitrate : 250 kbps
Codec : MP3
Codec Profile : MP3 VBR V2
Encoding : lossy
Tool : LAME3.90
Tag Type : id3v2|id3v1


Tool - short, sweet and to the point.

~bT~
4th April 2008, 02:38
how do I find out the bitrate of my M2TS file pls?
this is all the info i'm getting with mediainforaw.

General #0
Complete name : D:\Temp\HITMAN.BLURAY\BDMV\STREAM\00001.m2ts
Format : BluRay Video
Format/Family : MPEG-2
File size : 4.38 GiB

Video #0
Codec : AVC
Codec/Family : AVC
Codec/Info : MPEG-4 AVC
Codec profile : High@L4.1
Width : 1280 pixels
Height : 720 pixels
Display Aspect ratio : 16/9
Frame rate : 23.976 fps
Chroma : 4:2:0
Interlacement : Progressive

Audio #0
Codec : AC3
Bit rate mode : CBR
Bit rate : 448 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Rear: L R, Subwoofer
Sampling rate : 48 KHz

Zenitram
4th April 2008, 08:04
how do I find out the bitrate of my M2TS file pls?
this is all the info i'm getting with mediainforaw.
Sometimes, MediaInfo fails to detect the timestamp at the end of the file, so it shows nothing.
I plan to have a better .vob/.ts time detection later.

Atak_Snajpera
4th April 2008, 21:00
A little request. Could you make the window a bit wider? 50% or so. Now some stuff is getting word wrapped.

Gui has been updated :)

clsid
4th April 2008, 21:20
Thanks.

mrwilby
5th April 2008, 13:55
I wonder if you might be able to help me with something.

I'm trying to write an app that detects incompatible mpeg4 video for the sigma designs 8634/8635 set top boxes.

I've played with Media Info a bit, and after reading the source code, I can see it can identify the number of raw frames in AVC data. This will save me writing a lot of code!

As far as I can see, MediaInfo_Config :: Details contains the flag that will cause the num_ref_frames data to be emitted, but it doesn't appear to be possible to modify this Details variable via the CLI.

Is there a way that I'm missing, e.g. some kind of verbose mode or is it currently unsupported?

If it's not currently available, any chance you might be willing to add it to the CLI version? The full GUI has a menu to enable this so something similar would be ideal.

I can then parse your output to get the info I need.

Very impressive tool!

Zenitram
5th April 2008, 15:55
I'm trying to write an app that detects incompatible mpeg4 video for the sigma designs 8634/8635 set top boxes.

I've played with Media Info a bit, and after reading the source code, I can see it can identify the number of raw frames in AVC data. This will save me writing a lot of code!
Why the count of frames is important for compatibility?

As far as I can see, MediaInfo_Config :: Details contains the flag that will cause the num_ref_frames data to be emitted, but it doesn't appear to be possible to modify this Details variable via the CLI.

This mode is not for normal output, it is for debuging.
It is not available yet with CLI because I didn't think it was useful.
Note: I plan to remove this feature in the next version for speed improvement and DLL size reduction, but this feature will be available in a "debug" version of the DLL.

But: this is not what you want.
You want it like the info about CABAC for AVC, or GMC for MPEG-4 Visual.
This is very easy to add, I just not already did it because I didn't know this is important for compatibility (and all parameters for compatibility are interessant for MediaInfo).
I just need in which field I can add it (beginning with "Format_Settings_*")
I propose "Format_Settings_RefFrames".
It can be done for the next version (next Friday).
Example of output :
Video #0
Codec : AVC
Codec/Family : AVC
Codec/Info : Advanced Video Codec
Codec profile : High@L4.1
Codec settings, CABAC : Yes
Codec settings, RefFrames : 3 frames

Please add a feature request (I must not forgot it in the release :) ):
http://sourceforge.net/tracker/?group_id=86862&atid=581184

Very impressive tool!
I know :p

mrwilby
5th April 2008, 16:23
Why the count of frames is important for compatibility?

It seems that these Sigma Designs 8634/5 devices (PopCornHour, Tvix 6500) cannot handle high number of reference frames in AVC sources. E.g. the 6500 seems to bail out when the reference frame count is above 7 or 8. Presumably this is RAM related, but I'm not very familiar with these specs so I don't know for sure. I did ask in the Syabas forums for some info about the sigma 8634 limitations as far as AVC is confirmed, so hopefully they will respond and provide more details.

On a related note, I think the number of bframes used in the encode is also relevant, but I don't know if that is actually stored somewhere in the AVC info. I noticed it is available in the 'comments' associated with an x264 encode, but it really needs to be in the AVC headers itself somewhere too. I expect its there, I've just not found it yet :)

This mode is not for normal output, it is for debuging.
It is not available yet with CLI because I didn't think it was useful.
Note: I plan to remove this feature in the next version for speed improvement and DLL size reduction, but this feature will be available in a "debug" version of the DLL.

Yes, it looks very much like debug output, but then I think it's also quite useful to see all of this info if you're really hardcore. Will you distribute a debug version of your DLL on sourceforge? The problem for me is that I don't know how to compile your Borland C++ code so I'm currently reliant on what you publish :)

But: this is not what you want.
You want it like the info about CABAC for AVC, or GMC for MPEG-4 Visual.
This is very easy to add, I just not already did it because I didn't know this is important for compatibility (and all parameters for compatibility are interessant for MediaInfo).
I just need in which field I can add it (beginning with "Format_Settings_*")
I propose "Format_Settings_RefFrames".
It can be done for the next version (next Friday).
Example of output :
Video #0
Codec : AVC
Codec/Family : AVC
Codec/Info : Advanced Video Codec
Codec profile : High@L4.1
Codec settings, CABAC : Yes
Codec settings, RefFrames : 3 frames

Please add a feature request (I must not forgot it in the release :) ):


Thanks, that looks useful in the absence of the debug stuff. I will report a feature request now :)

If I hear more from Syabas about the limitations of this chipset, I'll let you know.

Thanks a lot for your quick reply!

vlada
7th April 2008, 17:50
Hi,

while working on my program, I found another problem regarding VOB (MPEG PS) information.

On one of my DVDs there is a VOB which is reported to be 25 hours long. It is in fact less then 1 hour. If I open the VOB in MPC it detects it's length correctly. Here is what MediaInfo says:


General #0
Complete name : D:\VIDEO_TS\VTS_01_3.VOB
Format : MPEG-2 Program
Format/Family : MPEG-2
File size : 1024 MiB
PlayTime : 25h 38mn
Bit rate : 93.1 Kbps

Video #0
Codec : MPEG-2 Video
Codec/Family : MPEG-V
Codec profile : Main@Main
Codec settings, Matrix : Standard
PlayTime : 25h 38mn
Bit rate mode : CBR
Nominal bit rate : 9800 Kbps
Width : 720 pixels
Height : 576 pixels
Display Aspect ratio : 16/9
Frame rate : 25.000 fps
Standard : PAL
Chroma : 4:2:0
Interlacement : Top Field First

Audio #0
Codec : AC3
PlayTime : 25h 38mn
Bit rate mode : CBR
Bit rate : 448 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Rear: L R, LFE
Sampling rate : 48.0 KHz
Video0 delay : -392ms

Audio #1
Codec : AC3
Codec profile : Dolby Digital
PlayTime : 25h 38mn
Bit rate mode : CBR
Bit rate : 192 Kbps
Channel(s) : 2 channels
Channel positions : L R
Sampling rate : 48.0 KHz
Video0 delay : -328ms

Audio #2
Codec : AC3
PlayTime : 25h 38mn
Bit rate mode : CBR
Bit rate : 384 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Rear: L R, LFE
Sampling rate : 48.0 KHz
Video0 delay : -360ms

Text #0
Codec : RLE
PlayTime : 2s 840ms
Video0 delay : -52mn 29s

Text #1
Codec : RLE
PlayTime : 2s 840ms
Video0 delay : -52mn 29s

Text #2
Codec : RLE
PlayTime : 25h 38mn
Video0 delay : 3s 680ms

Text #3
Codec : RLE
PlayTime : 25h 38mn
Video0 delay : 3s 680ms

Menu #0
Codec : DVD-Video


What could be the problem? Can I somehow help you with diagnostincs? Unfortunately it's a 1GB file, so uploading it would a problem.

Btw. the PAR information for MPEG video is still inverted (1/x) in 0.7.6.2 as I reported before.

:thanks:

Zenitram
7th April 2008, 17:54
while working on my program, I found another problem regarding VOB (MPEG PS) information.

On one of my DVDs there is a VOB which is reported to be 25 hours long. It is in fact less then 1 hour.
I already received a file like that.
I didn't have had the time to work on it, but I will correct it ASAP.

Btw. the PAR information for MPEG video is still inverted (1/x) in 0.7.6.2 as I reported before.
Not good, I was sure to have corrected this bug.

I can't currently propose a development snapshot, or patch it qucikly because I am doing some speed improvement in the current code (this is why I am late on the field names changing too), but I will work on it just after.

vlada
7th April 2008, 18:44
No need to hurry, take your time. Thanks a lot for your great support.

Zenitram
12th April 2008, 21:22
I've played with Media Info a bit, and after reading the source code, I can see it can identify the number of raw frames in AVC data. This will save me writing a lot of code!
The count of Ref Frames for AVC in MPEG-PS or AVI or MKV is now available in new version 0.7.6.3

Note: other things discussed in this topic are unfortunatly not yet implemented, I had to change my priorities. But this is not forgotten.
(vlada: the bug of MPEG playtime should be fixed too, but I am not sure I have handled all cases).

vlada
15th April 2008, 13:02
Hi Zenitram,

unfortunately in the GUI version I still get the same incorrect playtime for the one VOB file.

Unfortunately the .dll version I use in my program now stopped reporting playtime. It retunrs an empty string for MI.Get("Stream_Video", 0, u"Playtime", "Info_Text", "Info_Name") for any input file. Other parameters are identified correctly. Have you changed something in PlayTime reporting behaviour in you DLL?

Thank you.

Zenitram
15th April 2008, 13:07
Hi Zenitram,

unfortunately in the GUI version I still get the same incorrect playtime for the one VOB file.

Unfortunately the .dll version I use in my program now stopped reporting playtime. It retunrs an empty string for MI.Get("Stream_Video", 0, u"Playtime", "Info_Text", "Info_Name") for any input file. Other parameters are identified correctly. Have you changed something in PlayTime reporting behaviour in you DLL?

Thank you.
No, I changed nothing.
This is normal that old "11 hours" files reports nothing now (This was a parsing error, I disabled it, and I didn't yet find why there is no playtime), but if there is something in the GUI, MI.Get(Stream_Video, 0, "Playtime") should return the playtime.
Ah, this is maybe because the specific playtime of a video is often absent (and I report it wrongly before), try MI.Get(Stream_General, 0, "Playtime") instead.
I will work on MPEG-PS/TS playtime later, for a better handling of it (per stream, and more precise), but I currently not have the time for this.

mrwilby
15th April 2008, 19:46
Zenitram, thanks for the ref frames option. I'll check it out.

Any possibility to get the number of bframes in AVC media in there too? ;-)

Many thanks for your efforts!

Zenitram
16th April 2008, 09:21
Any possibility to get the number of bframes in AVC media in there too? ;-)
For saying if Bframes are used or not, I have currently not found the bitstream flags which says this (for example, this is the flag "low_delay" in MPEG-4 Visual).
For saying the count of Bframes: not currently, because I currently only parse the headers (seq_parameter_set, pic_parameter_set, sei), I don't parse every frame for knowing if it is a bframe or not. Maybe later, but... a lot later, this is not the priority (I must add a "slow" option, which will activate MediaInfo for parsing all the file etc...)

Atak_Snajpera
26th April 2008, 17:44
Zenitram
How to get audio bitrate in new version?

MediaInfoA_Get(Handle_, 2, 0, 'Bitrate', 1, 0);

Does not work any more :(

Zenitram
26th April 2008, 17:50
How to get audio bitrate in new version?

MediaInfoA_Get(Handle_, 2, 0, 'Bitrate', 1, 0);

Does not work any more :(

I changed nothing since a long time about the interface...
"BitRate" with uppercased "R".

Atak_Snajpera
26th April 2008, 17:59
Thanks! It is working now :) Weird...old version worked with small 'r'...