Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21896

[RESOLVED] Getting duration info from an mkv file

$
0
0
I need to get the duration of mkv files. I use How to get all Media Info using the MediaInfo library to get the duration info of other video file types, but it will not return the duration of an mkv file.

A newer version of MediaInfo can be found here: http://mediaarea.net/en/MediaInfo/Download/Windows
On that downloads page is a GUI version of MediaInfo that can get the duration of an mkv file, but shelling to a program with a GUI that's going to repeatedly open and close is a sloppy way of getting the required info and I'd rather not get it that way.
With that newer version of MediaInfo comes a dll with a much newer version number, but the newer dll will not work with the example program above. I'm not knowledgeable enough to figure out how or if the newer dll can work with that example.

MediaInfo also has a command line interface which I've tried to use with no success. There is another command line mkv info extractor, mkvinfo, which comes from something called MKVToolNix, which I've also tried with no success. Using mkvinfo as an example (and this info page) I've tried things along the lines of:

Shell "D:\mkvinfo.exe -v --redirect-output D:\testing.txt D:\MyFile.mkv"

That will run the mkvinfo command line program but it will not spit out a testing.txt file.


On to the questions:

First, even though it's not technically a VB6 question, does anyone have any idea how I could get either of these command line programs to correctly spit out the info file I need?
Second, does anyone know of any other way I could acquire the file duration information from an mkv file with VB6?

Viewing all articles
Browse latest Browse all 21896

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>