View Full Version : MediaInfo(Lib) 0.7 - Reading information about media files
spamalam
7th January 2007, 02:23
spamalam
Where do you think MediaInfo could get an information, what was the source of an AVI file?
Framerate, its not just resolution that defines the TV standard afaik (right?)
so 25fps, cropped video isn't pal anymore? Damn. I know pal in 1967 meant something different to what it is now (strict colour code, etc.), so dvd pal isn't pal either. I've always said PAL/compatible is 25fps, ntsc is 23fps/29fps, its been the simplest most descriptive usage. Obviously res defined the hz of a tv too.
I guess i was assuming it meant what standard the video was, not whether it was fully standard compliant. I'll just use framerate to determine standard rather than calling standard in that case :)
The reasoning is pretty simple. Consider a standalone divx/xvid player hooked up to an pal tv. People get problems with their tv, ntsc rips (fps) often don't play on pal tvs and pal rips (fps) often don't play on ntsc tvs, as well as the preference of people watching and the effect of the framerate if the person is perdantic. I wanted to define whether it was pal sourced or ntsc sourced.
vlada
7th January 2007, 11:54
spamalam
Usually original movie sources are saved on film cells (no resolution) and with 24fps. They are not PAL neither NTSC compliant. If studios create PAL DVDs, they speed up the movie to 25fps, scan the cells and resize picture to 720x576 (original PAL standard says 625 lines, but only 575 of them are visible, this is where 576 comes from). 720 is just because somebody thought it was a good idea (I don't think so).
NTSC DVDs are created with a technique called 3:2 pulldown, which splits frames into fields and then duplicates some of them. The resulting framerate must be 29.97 (30*1000/1001 exactly). It creates nasty interlacing artifacts when watched on a PC, so you'd better convert it back to 24*1000/1001 ~ 23.976fps.
So if you run into 23.976 fps movie, you have both possibilities - speed up to PAL or 3:2 pulldown to NTSC. NTSC DVD resolution is 720x480. It comes from the analogue norm again.
Also according to my knowledge, there are usually no problems with NTSC DVDs on PAL players, but there will be problems with PAL DVDs on NTSC players - Japan an USA usually don't care to much about the rest of the world.
chipzoller
7th January 2007, 16:35
Zenitram, I can't remember if you've answered this before, but I was just curious why mediainfo reports a good amount of info. on single streams in .mp4 container, but when both are muxed into .mkv then opened each stream reported by mediainfo contains significantly less info.?
winnydows
11th January 2007, 23:02
Hello Zenitram.
I use your MediaInfo.dll in my XviD4PSP (http://www.winnydows.com/xvid4psp.html). And want ask - when your dll will pharse AVS ?
crypto
17th January 2007, 07:56
Hi zenitram,
I use your MediaInfo.dll in wmvmuxer. Is there any chance to get MediaInfoLIb recognize VC-1 elementary streams? I can give you details about parsing the sequence header, if needed.
Zenitram
17th January 2007, 10:44
Sorry fore the delay in responding, I just received the reply notification :(
I have one very simple question: I'm writing an application which uses MediaInfo to read information about video files. I'd like to know if it is guaranteed, that container will be on line 2 in the output and video #0 will on line 10? Or do I have to scan the output for the right lines?
Of course more information depend on number of video/audio streams so I have to scan for them.
No, text output is only informative, you can have tags/other info depends on the video file.
If you want exactly a piece of information, you can use the DLL API, or the "custom output" (in beta version in lastest releases) :
MediaInfo --Inform=Video;%Width% video.avi
to have video width on the 1st line for example.
MediaInfo --Help-Inform for more info, you can use file templates if needed, and I will continue to improve this feature.
Just doesn't detect if its PAL or NTSC.
I will work on it again, I may miss something in latest releases.
Where do you think MediaInfo could get an information, what was the source of an AVI file?
There is a flag in MPEG-1/2 Video stream for PAL or NTSC format.
Zenitram, I can't remember if you've answered this before, but I was just curious why mediainfo reports a good amount of info. on single streams in .mp4 container, but when both are muxed into .mkv then opened each stream reported by mediainfo contains significantly less info.?
Because I didn't have the time to connect parsers together (between the container parser and the video parser), this is planned.
when your dll will pharse AVS ?
This is planned, but I need more example of AVS files, could you send me some example you would like I support?
Is there any chance to get MediaInfoLIb recognize VC-1 elementary streams? I can give you details about parsing the sequence header, if needed.
I need :
- example files
- some specifications about the sequence header
And I will support it.
Please contact me directly at zen@mediaarea.net
I have a lot of bug reports to resolve before adding new features, but all you say is not lost.
winnydows
17th January 2007, 18:23
@Zenitram
Use my program for create AVS files:
XviD4PSP 4.049 final (http://winnydows.com/download/xvid4psp/XviD4PSP_4049.exe)
Also one bug in MediaInfoDLL found:
In last version missed delay info in some AVI files.
In this file:
http://www.megaupload.com/?d=5K3Y7ZQD
In version 0.7.3.1 delay info worked correct.
Added
Also last new version (0.7.4.3) complete wrong show delay info for all files (20 min Delay for DVD !!!???).
moadib2k
3rd February 2007, 18:06
While trying to get megui running under vista x64 I found that the problem with megui under vista x64 is mediainfo. It is throwning an access violation exception when the method mediainfo_get is called. I am using 0.7.4.3
Any plans to get it running under a 64 bit platform? We don't need 64 bit, we actually have to have 32 bit to work with AviSynth.
I have been working on getting mediainfo to compile (under xp 32 for now) with no success. I have the lib compiling but the dll cannot find mpeg4ip.lib. I am using all the lib's you included in the zip file but that one is not there.
Any chance you have all the external libs in a vs2005 project somewhere? I have not compiled all the external libs, trying to follow your compiling instructions on sourceforge does not work.
Kurtnoise
3rd February 2007, 20:59
1/ mpeg4ip libs are not used anymore.
2/ Static libs for MSVC are available on SF.
moadib2k
4th February 2007, 20:43
1/ mpeg4ip libs are not used anymore.
2/ Static libs for MSVC are available on SF.
1. It was still in the project from the distribution, I removed it and got past that issue
2. Found those, thanks
Still cant compile though:
I had to add libcmt.lib to the ignore libraries to resolve a conflict with libcmtd.lib.
Now I Have these errors.
Error 1 error LNK2001: unresolved external symbol "protected: virtual void __thiscall MediaInfoLib::File_MpegPs::Read_Buffer_Init(void)" (?Read_Buffer_Init@File_MpegPs@MediaInfoLib@@MAEXXZ) MediaInfo.lib
Error 2 error LNK2001: unresolved external symbol "protected: virtual void __thiscall MediaInfoLib::File_MpegPs::Read_Buffer_Unsynched(void)" (?Read_Buffer_Unsynched@File_MpegPs@MediaInfoLib@@MAEXXZ) MediaInfo.lib
Error 3 error LNK2001: unresolved external symbol "protected: virtual void __thiscall MediaInfoLib::File_MpegPs::Read_Buffer_Continue(void)" (?Read_Buffer_Continue@File_MpegPs@MediaInfoLib@@MAEXXZ) MediaInfo.lib
Error 4 error LNK2001: unresolved external symbol "protected: virtual void __thiscall MediaInfoLib::File_MpegPs::Read_Buffer_Finalize(void)" (?Read_Buffer_Finalize@File_MpegPs@MediaInfoLib@@MAEXXZ) MediaInfo.lib
Error 5 error LNK2001: unresolved external symbol "protected: virtual void __thiscall MediaInfoLib::File_MpegPs::HowTo(enum MediaInfoLib::stream_t)" (?HowTo@File_MpegPs@MediaInfoLib@@MAEXW4stream_t@2@@Z) MediaInfo.lib
Error 6 error LNK2019: unresolved external symbol __invalid_parameter_noinfo referenced in function "public: class std::_String_const_iterator<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > & __thiscall std::_String_const_iterator<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::operator+=(int)" (??Y?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV01@H@Z) ZenLib.lib
Error 7 error LNK2001: unresolved external symbol __invalid_parameter_noinfo ZenLib.lib
Error 8 error LNK2001: unresolved external symbol __invalid_parameter_noinfo ZenLib.lib
Would appreciate any help, thanks
Zenitram
5th February 2007, 10:20
Any plans to get it running under a 64 bit platform?
I never tried to compile x64 version.
I heard than somebody compiled successfully on a x64 linux, so it should not be too difficult to have a stable x64 Windows version.
But : I will need some people to test x64 beta releases. please contact me at zen@mediaarea.net for being a beta-tester!
Now I Have these errors.
Theses errors are curious, File_MpegPs.cpp is not in your project, I don't know why...
I will release a new release soon, with source code, I hope it will be fixed.
moadib2k
5th February 2007, 17:20
I can help test an x64 version. I am running vista ultimate x64 w 4 gigs ram and an e6600 on my test box. It has vs2005 installed c# and c++ and 64 bit compiler.
There are two things that are needed here, a 32 bit version that will run under vista x64 and a 64 bit version. Apps like MeGui are 32 bit so they cannot load a 64 bit dll.
MeGui needs AVISynth which is 32 bit. There is a 64 bit version but until all the necessary filters are ported to 64 bit MeGui cannot run the 64bit version of AVISynth. Practically speaking I am not sure this will happen for a long time.
So the real priority (for MeGui) is getting the 32bit version of MediaInfo running on a 64 bit windows box. Personally, I would also like the 64 bit version of MediaInfo for some other programs.
I was trying to get a good compile so I could debug it and see where its failing at but compiling has been quite a bear. My c++ skills are very very rusty.
moadib2k
5th February 2007, 17:28
Theses errors are curious, File_MpegPs.cpp is not in your project, I don't know why...
I will release a new release soon, with source code, I hope it will be fixed.
Thanks for this, I figured that part out, the define MEDIAINFO_MPEGPS_YES was not in the preprocessor definitions. After adding that definition, those errors went away. Do you see any others missing off the top of your head?
MEDIAINFO_MULTI_NO
MEDIAINFO_VIDEO_NO
MEDIAINFO_AUDIO_NO
MEDIAINFO_IMAGE_NO
MEDIAINFO_TEXT_NO
MEDIAINFO_COMPRESSOR_NO
MEDIAINFO_RIFF_YES
MEDIAINFO_MPEGTS_YES
MEDIAINFO_MPEG_YES
MEDIAINFO_MPEGV_YES
MEDIAINFO_AC3_YES
MEDIAINFO_DTS_YES
MEDIAINFO_MPEGA_YES
MEDIAINFO_MPEG4_YES
MEDIAINFO_MPEGPS_YES
Now I am down to these errors in zenlib:
Error 1 error LNK2019: unresolved external symbol __invalid_parameter_noinfo referenced in function "public: class std::_String_const_iterator<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> > & __thiscall std::_String_const_iterator<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >::operator+=(int)" (??Y?$_String_const_iterator@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV01@H@Z) ZenLib.lib
Error 2 error LNK2001: unresolved external symbol __invalid_parameter_noinfo ZenLib.lib
Error 3 error LNK2001: unresolved external symbol __invalid_parameter_noinfo ZenLib.lib
Zenitram
5th February 2007, 17:36
I have just released a new version (0.7.4.4).
There is the source code, even for MSVC2005 (in Project/MSVC directory).
This is the one I use for the release, so it should work!
Please contact me at zen@mediaarea.net for 64-bit testing, we don't need to flood this forum ;-)
winnydows
5th February 2007, 23:35
@Zenitram
Mega thanks for delay fix.
moadib2k
6th February 2007, 21:02
While trying to get megui running under vista x64 I found that the problem with megui under vista x64 is mediainfo. It is throwning an access violation exception when the method mediainfo_get is called. I am using 0.7.4.3
Well it turns out the problem was not in mediainfo. The problem was in the wrapper that MeGui uses to connect to mediainfo. I have fixed the wrapper and hope to get it to the MeGui team soon.
I have talked with Zenitram about AVS parsing. There are a couple of problems with AVS files.
The file is just text, it would have to be rendered to pull any info out
MediaInfo is cross platform AVS is a VFW renderer
Rendering the stream to get information would break the current methodology used to get video info within MediaInfo
There are so many plugins etc... that it would be practicably infeasible to figure out all the options
figuring out the underlying streams would not be helpful as so much can change by the time they are rendered.
What is needed is some form of avisynth probe to get media information from the avisynth file. I don't think this should go into the MediaInfo dll since it wont be cross platform.
vlada
6th February 2007, 23:18
moadib2k
AviSynth can output some informations like framerate or resolution to a text file. What more information do you need?
moadib2k
7th February 2007, 15:37
moadib2k
AviSynth can output some informations like framerate or resolution to a text file. What more information do you need?
I am assuming we are talking about outside of MediaInfo here. I need the basic information, codec, frame rate, resolution, aspect ratio, audio channels etc... I am looking at some code that is inside of MeGui to see if I can get it that way.
Kurtnoise
7th February 2007, 19:01
I need the basic information, codec, frame rate, resolution, aspect ratio, audio channels etc...
MediaInfo is able to give you all of this...:)
Zenitram
7th February 2007, 19:04
MediaInfo is able to give you all of this...:)
Not from .avs files: As he said, this would be too complex to support all plugins which modify theses parameters.
HeadBangeR77
7th February 2007, 19:38
AR is all wrong with the new media info:
Now I always get 16/9 for my 1:2.35 resized encodes.
Apart from the above everything works like charm - thank you. :)
Zenitram
7th February 2007, 20:11
AR is all wrong with the new media info:
Now I always get 16/9 for my 1:2.35 resized encodes.
Apart from the above everything works like charm - thank you. :)
Please contact me at zen@mediaarea.net and write me which container and codec are used.
HeadBangeR77
7th February 2007, 20:21
Please contact me at zen@mediaarea.net and write me which container and codec are used.
Happens with XviD 1.1.2, Koepi's build (that's what I've checked till now), no matter the resolution (688x288, 720x304, 1024x432). With the previous version I used to get an approximation (1:2.35), now 16/9 all the time.
Conatiners: AVI Open DML 2.0 (VduB 1.7.0, VDubMod, AVI-Mux).
Now, wait a sec, happens with Matroska as well (MKV Toolnix 2.0.0, patch from the 1st of Feb.)! If I revert to the previous version, it lists 1:2.35.
cheers,
HDBR77
SeeMoreDigital
7th February 2007, 20:58
Indeed....
I've just tried it myself and something does seem to have changed.
Here are some MPEG-4 samples (http://82.10.220.174/Uploaded_Files/Doom9_Forum_files/Xvid_2B-VOP_Container_Tests.7z) for you.
They all have a resolution of 720x576 pixels with 64:45 aspect ratio signalling. Effectively giving them a playback aspect ratio of 2.37:1...
Cheers
Zenitram
7th February 2007, 23:26
With the previous version I used to get an approximation (1:2.35), now 16/9 all the time.
I did a stupid writing error in the AspectRatio string algorithm :
"if (AspectRatio >1.70 AspectRatio F1<2.85) AspectRatio_String=_T("16/9");"
(yes, stupid... 2.85 instead of 1.85)
For all codecs and containers, because it is in the core.
You can see the exact value with Menu Debug --> Advanced mode (in Tree or Text view)
So the exact value is always right, but not the string shown (I changed it because it was not enough precise) used in classic views.
Will be OK in next version 0.7.4.5 or next development snapshot.
2.35 will be shown if DAR is between 2.30 and 2.40, I hope this is not a too big aproximation.
Don't hesitate to write me more bugs!
PS : please use the tracker of sourceforge for bugs
http://sourceforge.net/tracker/?group_id=86862&atid=581181
this is easier for me to track the bugs instead of all forums! ;-)
PPS : thanks SeeMoreDigital for examples!
HeadBangeR77
7th February 2007, 23:36
I did a stupid writing error in the AspectRatio string algorithm :
"if (AspectRatio >1.70 AspectRatio F1<2.85) AspectRatio_String=_T("16/9");"
(yes, stupid... 2.85 instead of 1.85)
For all codecs and containers, because it is in the core.
Typos happen. ;)
You can see the exact value with Menu Debug --> Advanced mode (in Tree or Text view)
Thanks for pointing to that; yes, everything seems correct here:
000020AF scalability: 0 (0)
--> Codec: MPEG-4V
--> Codec: MPEG-4V
--> Width: 720
--> Height: 304
--> AspectRatio: 2.368
--> Resolution: 8
--> Chroma: 4:2:0
--> Interlacement: PPF
--> Codec_Settings: BVOP
--> Codec_Settings/BVOP: Yes
--> Codec_Settings/GMC: 0
--> Codec_Settings: QPel
--> Codec_Settings/QPel: Yes
--> Codec_Settings: Custom Matrix
--> Codec_Settings/Matrix: Custom
(...)
Don't hesitate to write me more bugs!
PS : please use the tracker of sourceforge for bugs
http://sourceforge.net/tracker/?group_id=86862&atid=581181
this is easier for me to track the bugs instead of all forums! ...
Will remember next time - thanks for your quick reaction. :)
vlada
19th May 2007, 04:55
Zenitram
I just discovered the new function in MediaInfo, the --Inform parameter. It is exactly what I need for my application. But the parameters are split into different groups (General, Video, Audio etc.) I would need a mixture of these parametrs, how can I do it? Or do I have to run MediaInfo 3-times to get all the parameters?
And by the way there is a small bug in the examples for this function (--Help-Inform). It displays the CL as MediaInfo.exe -Inform=..., bu the correct should be MediaInfo.exe --Inform=... It took me some time before I found out why it isn't working.
Kurtnoise
19th May 2007, 06:52
Use :
StreamKind 0 for General stuff
StreamKind 1 for Video streams
StreamKind 2 for Audio streams
StreamKind 3 for Subtitles streams
StreamKind 4 for Chapters streams
StreamKind 5 for Images streams
Zenitram
19th May 2007, 19:44
Zenitram
I just discovered the new function in MediaInfo, the --Inform parameter. It is exactly what I need for my application. But the parameters are split into different groups (General, Video, Audio etc.) I would need a mixture of these parametrs, how can I do it? Or do I have to run MediaInfo 3-times to get all the parameters?
Directly from the Command line, you currently can have only one group. I am thinking about how to implement multiple groups.
But you can give to MediaInfo a file directly (I forgot to put it in the help), example :
MediaInfo --Inform=file://Example.csv "TEST.EVO"
General : D:\Programmation\MediaInfo\Release\MSVC\CLI\TEST.EVO
Format : MPEG-2PS
Length : 179 MiB for 4mn 49s 472ms
Video #0 : VC-1
Aspect : 1920 x 1080 (1.778)
Audio #0 : AC3+
Infos : , 48 KHz
Text #0 : RLE
Text #1 : RLE
Text #2 : RLE
Take a look in the /plugins/custom directory for examples (how to create Example.csv)
And by the way there is a small bug in the examples for this function (--Help-Inform). It displays the CL as MediaInfo.exe -Inform=..., bu the correct should be MediaInfo.exe --Inform=... It took me some time before I found out why it isn't working.
Oups. Corrected in the CVS, will be OK for the next release.
Note : Kurtnoise, your given values are for the programming interface only, from the command line "names" are used.
JoeBG
15th June 2007, 12:08
Hi,
I want to use the commandline tool to get variables for the stream length or the aspect ratio but I always fail.
For example: I have a AC3 stream and I want to have the lenght of it. Can someone give me a working commandline - many thanks. :)
Zenitram
15th June 2007, 13:24
Hi,
I want to use the commandline tool to get variables for the stream length or the aspect ratio but I always fail.
For example: I have a AC3 stream and I want to have the lenght of it. Can someone give me a working commandline - many thanks. :)
For AC3 :
Command : MediaInfo --Inform=General;%PlayTime% FileName.ac3
Command : MediaInfo --Inform=Audio;%PlayTime% FileName.avi
Result : 1256960 (in milliseconds)
Command : MediaInfo --Inform=Audio;%PlayTime/String% FileName.avi
Result : 20mn 56s
Note : during the verification of the command, I noticed that lenght in the audio part (MediaInfo --Inform=Audio;%PlayTime%) for an AC3 file is lacking. I will correct this.
For AspectRatio :
Command : MediaInfo.exe --Inform=Video;%AspectRatio% FileName.avi
Result : 1.777
Command : MediaInfo.exe --Inform=Video;%AspectRatio/String% FileName.avi
Result : 16/9
Command : MediaInfo --Info-Parameters
Result : list the available parameters (between %)
JoeBG
16th June 2007, 09:17
First of all thanks for your help. :thanks:
Here the results from my test.
I used the following commandline:
mediainfo --Inform=Video;%AspectRatio% C:\files\****\Daten\VTS_01_1.VOB
The result is the same as if I would have used
mediainfo --Inform C:\files\****\Daten\VTS_01_1.VOB
=> mediainfo.exe shows all informations and ignores *Video;%AspectRatio%*
I do have the same result with AC3 streams. mediainfo.exe shows always all informations and not the selected ones. :confused:
Maybe I´m doing it wrong, but I used exactly your commandlines :)
Herewith (http://joeb.movie2digital.com/mediainfo.7z) my versions of mediainfo.exe and mediainfo.dll
foxyshadis
16th June 2007, 10:17
You do have to use the command-line version; the command-line commands don't work with the GUI. (They have the same name, which makes it unnecessarily confusing. I always rename mine mediainfo-cli.exe. Even nicer would be if the GUI recognized cli commands and emulated it, removing the need for two executables...)
JoeBG
16th June 2007, 10:31
You do have to use the command-line version; the command-line commands don't work with the GUI. (They have the same name, which makes it unnecessarily confusing. I always rename mine mediainfo-cli.exe. Even nicer would be if the GUI recognized cli commands and emulated it, removing the need for two executables...)
I do use the commandline version :)
foxyshadis
16th June 2007, 10:56
Weird then, because the commands work on any files I can find. (With the exception of the error Zenitram already found.)
Zenitram
16th June 2007, 11:06
=> mediainfo.exe shows all informations and ignores *Video;%AspectRatio%*
Maybe I´m doing it wrong, but I used exactly your commandlines :)
I tested *your* version of MediaInfo on my files, and it works :)
Maybe a problem with your OS, your localization, I don't know.
I don't know what to do more
I propose you contact me at zen@mediaarea.net for giving me an access to your computer, and I will do more tests.
Weird then, because the commands work on any files I can find. (With the exception of the error Zenitram already found.)
Yes, weird... Sometimes, I hate programming :)
You do have to use the command-line version; the command-line commands don't work with the GUI. (They have the same name, which makes it unnecessarily confusing. I always rename mine mediainfo-cli.exe. Even nicer would be if the GUI recognized cli commands and emulated it, removing the need for two executables...)
I already tested to have different names, GUI users want a short name rather than mediainfo-gui, CLI users too, so impossible to have all people happy :) (and you are the first user I know who use both! :) )
But yes, the GUI version will parse CLI options in the future.
(but I didn't plan my software would become so used and this is my first program, I must work a lot to have a all people happy, with a good programming, and whith the time I have...)
JoeBG
16th June 2007, 16:44
I tested *your* version of MediaInfo on my files, and it works :)
Maybe a problem with your OS, your localization, I don't know.
I used a bat-file in my tests. When I type everything in my cmd-box without using a batchfile everything works for me too. Very strange everything :(
My plan is to use the variable %PlayTime% for further actions in DOS. But I think I cannot use it as %PlayTime% for further calculations isn´t it?
mihakase
9th October 2007, 08:52
The current syntax to get particular parameters using Inform is a little odd in Linux. Bash interprets the semicolon as the end of a command/line and tries to execute whatever comes after it.
Workaround is currently:
MediaInfo --Inform=xxx\;%param% file.ext
Zenitram
9th October 2007, 09:21
The current syntax to get particular parameters using Inform is a little odd in Linux. Bash interprets the semicolon as the end of a command/line and tries to execute whatever comes after it.
Workaround is currently:
MediaInfo --Inform=xxx\;%param% file.ext
the ";" is useful because I use internaly CSV format (semi-colomn, as in Europe...).
I don't plan to change this soon.
You can use a file too:
MediaInfo --Inform=file://SpecFile file.ext
And SpecFile contains "xxx;%param%"
If I add an option for accepting commas too, will it be better?
mihakase
9th October 2007, 09:33
Commas would be nice. I personally don't mind the semicolon but I figured the behaviour was worth noting anyway.
On a side note, I'm looking through mediainfo lib's source; trying to figure out how it gets an FLV's dimensions since I kind of need to implement that in php. It would probably help if I were a bit more competent though... no go as of yet. :)
Zenitram
9th October 2007, 11:18
On a side note, I'm looking through mediainfo lib's source; trying to figure out how it gets an FLV's dimensions since I kind of need to implement that in php. It would probably help if I were a bit more competent though... no go as of yet. :)
In PHP, it will be diffucult to call MediaInfo library (written in C/C++), why don't you use mediainfo command line?
I heard about several user who call mediainfo from PHP without problems.
./mediainfo --Inform=Video;%Width% %Height% for example.
GrofLuigi
9th October 2007, 15:36
On another note, since many programs use MediaInfo dll now, can it be placed in a path directory to avoid multiple copies and for better updating? (On Windows)
Will that affect these programs (I guess only their authors would know)?
GL
Zenitram
9th October 2007, 15:40
On another note, since many programs use MediaInfo dll now, can it be placed in a path directory to avoid multiple copies and for better updating? (On Windows)
Will that affect these programs (I guess only their authors would know)?
GL
How DLL works on Windows:
- Search in the .exe directory
- Search in the path
If you delete yourself the .dll in the porgram directory, the program will search in the path.
this is not a problem from the DLL, but from any third-party programs mainteners.
For MediaInfo (the GUI), the status of MediaInfo.dll is not "stable", so I prefer to not force updating. After, others do what they want.
When MediaInfo.dll is more stable, I may propose to install in a shared directory. Not now. (the version 0.x, not 1.x ;-) )
ficofico
22nd November 2007, 18:37
edit, sorry
vlada
25th November 2007, 22:11
I was using MediaInfo in my PHP-GTK application from command line. No I decided to move a little further and switch to Python. I heard somewhere it should be possible to use a C/C++ dll in Python. Does anyone have any idea (or code sample) how to use the mediainfo.dll in Python?
Thunderbolt8
26th November 2007, 02:30
would it be possible that mediainfo could give the length of both, audio and video stream inside a container file? dont know which of these 2 is meant with the general "length" info of the file.
vlada
27th November 2007, 23:57
I made Python load MediaInfo.dll through ctypes (http://python.net/crew/theller/ctypes/). But when I try to call the function result = lib.MediaInfo_Open("video.avi"), then Python complains there are not enough parameters for the function. What other parameters should be there?
Sorry for probably stupid questions, I'm just a beginner.
foxyshadis
28th November 2007, 03:56
You have to use:
handle=lib.MediaInfo_New();
result=lib.MediaInfo_Open(handle,"video.avi")
MediaInfo_Delete(handle)
now.
vlada
29th November 2007, 15:09
I've already tried this, but it gives me the same error:
http://img518.imageshack.us/img518/4580/pythongb5.png
Any ideas what's wrong?
vlada
2nd December 2007, 22:27
A friend of mine wrote a Python wrapper for the .dll so it is solved. I didn't have the time to dive into the code yet, I just verified it works. If anyone's interested in it, let me know.
Anyway I have another problem. I'm not sure if MediaInfo is supposed to handle elemantary streams, but I think it usually does. I have a h.264 stream demuxed from AVCHD camcorder. MediaInfo 0.7.5.5 reports it as an AC3 audio. A sample can be downloaded here (http://www.sendspace.com/file/cpgtaq) (7 MB).
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.