954,546 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to use MediaInfo library?

Hello,

I'm trying to use MediaInfo library in python via ctypes. I tried this code:

import ctypes
milib = ctypes.cdll.LoadLibrary("mediainfo.dll")
handle = milib.MediaInfo_New()
milib.MediaInfo_Open(handle, "D:\temp\video.avi")


Unfortunately the last line complaints that there are not enough parameters for that function. I based this on a sample Delphi code, which is shipped with the library. There are also samples in many other languages. Unfortunately I don't know anything else then Pascal and PHP. And now I'm trying to learn Python.

I would greatly appreciate if anyone could help me with this.

jech
Newbie Poster
3 posts since Nov 2007
Reputation Points: 10
Solved Threads: 0
 

Hello,

I would greatly appreciate if anyone could help me with this.

Yea i managed to get a bit furthur, not much tho.

import ctypes
	milib = cdll.LoadLibrary("mediainfo.dll")
	handle = milib.MediaInfo_New("C:\testfolder\re-405.avi")
	info = milib.MediaInfo_Open(handle, 0, "PlayTime")
DoXiD
Newbie Poster
1 post since Dec 2007
Reputation Points: 10
Solved Threads: 0
 

I asked my friend if he can help me with it and he wrote a wrapper for the library in Python. You can find it here: http://forum.doom9.org/showthread.php?t=96516&page=11 .

I hope it helps.

jech
Newbie Poster
3 posts since Nov 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You