Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > New and alternative a/v containers

Reply
 
Thread Tools Search this Thread Display Modes
Old 29th December 2014, 03:18   #121  |  Link
dade49
Registered User
 
Join Date: Jan 2006
Posts: 37
Batching

I've been looking for an easy way to read MKV metadata in my own C# app. Most of the libraries are compiled in C++ (libebml, libmatroska) and aren't easily usable for me. While the source code for mkvtoolnix is available, I cannot compile it in Visual Studio and am a Windows developer. I started trying to parse mkvinfo's output and was looking for a C# library to use. Your gMKVToolnix.dll gives me exactly what I need and I can now parse all my mkv's and read the metadata I need. Thank you very much for your hard work, as it has saved me lots of time doing it myself.
dade49 is offline   Reply With Quote
Old 29th December 2014, 03:44   #122  |  Link
dade49
Registered User
 
Join Date: Jan 2006
Posts: 37
For those interested, create a new C# console app (or another C# app), add a reference to the DLL and then use the following:
Code:
using gMKVToolnix;

gMKVInfo mkvInfo = new gMKVInfo(gMKVHelper.GetMKVToolnixPathViaRegistry());
List<gMKVSegment> mkvSegments = mkvInfo.GetMKVSegments(@"C:\Path\file.mkv");
gMKVSegmentInfo mkvHeader = (gMKVSegmentInfo)mkvSegments[0];
string app = mkvHeader.WritingApplication;
string mux = mkvHeader.MuxingApplication;
string length = mkvHeader.Duration;
string date = mkvHeader.Date;
Thanks again!
dade49 is offline   Reply With Quote
Old 29th December 2014, 15:34   #123  |  Link
gpower2
gMKVExtractGUI author
 
gpower2's Avatar
 
Join Date: Aug 2003
Location: Greece / Thessaloniki
Posts: 251
That's exactly why I separated the GUI from the Core element of the application, though I didn't expect to see it get used so soon by another fellow developer!
Thanks for your support and if you need anything, don't hesitate to ask!
gpower2 is offline   Reply With Quote
Old 29th December 2014, 19:33   #124  |  Link
dade49
Registered User
 
Join Date: Jan 2006
Posts: 37
Quote:
Originally Posted by gpower2 View Post
That's exactly why I separated the GUI from the Core element of the application, though I didn't expect to see it get used so soon by another fellow developer!
My usage is pretty simple. I have hundreds of MKV's, all compiled by me over the past several years. I needed an easy way to determine which ones I've compressed with Handbrake and which ones I merged with mkvmerge. I was comparing file size, but that's not accurate enough depending on the length of each file. I've been looking for an easy way to parse WritingApplication from each file. While invoking mkvinfo hundreds of times via your app isn't the most efficient method, it does seem to be the easiest. Your app is the first I've seen written in C#. Again; thank you. If I can contribute down the road, please let me know. I may be able to help with the requests for batching. I think people don't want to specify options for each file, IE: extract all PGS subtitles from all MKV's in this folder.
dade49 is offline   Reply With Quote
Old 1st January 2015, 01:47   #125  |  Link
dade49
Registered User
 
Join Date: Jan 2006
Posts: 37
Quote:
Originally Posted by gpower2 View Post
Thanks for your support and if you need anything, don't hesitate to ask!
Any chance you would consider adding the CodecPrivate property from a Video track? I'm interested in parsing the h.264 profile details if they are defined. Thanks
dade49 is offline   Reply With Quote
Old 1st January 2015, 03:48   #126  |  Link
gpower2
gMKVExtractGUI author
 
gpower2's Avatar
 
Join Date: Aug 2003
Location: Greece / Thessaloniki
Posts: 251
That would be a Media Info thingy, which I don't use.
gMkvExtractGUI is based solely and exclusively on MKVToolnix tools. So unfortunately I can't help you with that...
gpower2 is offline   Reply With Quote
Old 1st January 2015, 09:34   #127  |  Link
dade49
Registered User
 
Join Date: Jan 2006
Posts: 37
Well, mkvinfo (from MKVToolnix) shows this data for me:
Code:
CodecPrivate, length 96 (h.264 profile: High @L4.1)
This is a nice to have. If you're not interested I understand.
dade49 is offline   Reply With Quote
Old 2nd January 2015, 13:04   #128  |  Link
gpower2
gMKVExtractGUI author
 
gpower2's Avatar
 
Join Date: Aug 2003
Location: Greece / Thessaloniki
Posts: 251
You're right, I forgot about that property, since I switched to using mkvmerge's output for track information and not mkvinfo's.
I added the property to gMKVTrack class, parsed it from mkvinfo's output, and merged it with mkvmerge's information.

To make all this more developer friendly, I moved the post processing from the main form, to gMKVHelper class in the new public static function GetMergedMkvSegmentList, so now you just need to call this function and the returned list will contain the merged information from both mkvmerge and mkvinfo.

You can get the source from SourceForge, since I won't be releasing a new version at this time.

P.S.
I noticed you use only the mkvinfo's output, which is not always correct, as stated here: http://forum.doom9.org/showthread.ph...04#post1669904
I suggest you use the new function from gMKVHelper, and make a little loop to take the gMKVSegmentInfo segment, or use LINQ if you don't have .NET framework version limitations
gpower2 is offline   Reply With Quote
Old 14th January 2015, 16:55   #129  |  Link
dade49
Registered User
 
Join Date: Jan 2006
Posts: 37
Quote:
Originally Posted by gpower2 View Post
I suggest you use the new function from gMKVHelper, and make a little loop to take the gMKVSegmentInfo segment
I just got back to looking at this. I was able to pull the source and compile. Using this new method solves everything. Thanks for your support. I am a fan.
dade49 is offline   Reply With Quote
Old 5th February 2015, 00:41   #130  |  Link
Overdrive80
Anime addict
 
Overdrive80's Avatar
 
Join Date: Feb 2009
Location: Spain
Posts: 673
Hi power2, using last version of gmkvextractgui and mkvmerge I get "55 (-400)_track2_spa_DELAY 16ms" if extract audio from matroska file with delay know (-400). IMHO, the filename should be "55 (-400)_spa_DELAY -400ms". Is one problem known?

Thanks.

EDIT: After test, mkvmerge trim frames of audio. Ignore my msg.
__________________
Intel i7-6700K + Noctua NH-D15 + Z170A XPower G. Titanium + Kingston HyperX Savage DDR4 2x8GB + Radeon RX580 8GB DDR5 + ADATA SX8200 Pro 1 TB + Antec EDG750 80 Plus Gold Mod + Corsair 780T Graphite

Last edited by Overdrive80; 5th February 2015 at 01:08.
Overdrive80 is offline   Reply With Quote
Old 10th February 2015, 01:28   #131  |  Link
wanezhiling
Registered User
 
Join Date: Apr 2011
Posts: 1,184
I got an error with the file.

wanezhiling is offline   Reply With Quote
Old 10th February 2015, 15:47   #132  |  Link
alfixdvd
Registered User
 
Join Date: Mar 2004
Posts: 243
Quote:
Originally Posted by wanezhiling View Post
I got an error with the file.

I updated to Mkvtoolnix 7.6.0 and I get the same error with a mkv file when I tray to open a mkv file to extract a subtitle.

MKVExtractGUI2 works fine with 7.6.0

Perhaps the trouble is in gMKVToolnix.dll?

Last edited by alfixdvd; 10th February 2015 at 15:53.
alfixdvd is offline   Reply With Quote
Old 10th February 2015, 17:29   #133  |  Link
dade49
Registered User
 
Join Date: Jan 2006
Posts: 37
mkvtoolnix 7.6.0

As others have reported, it appears that the new version of mkvtoolnix 7.6.0 breaks the current version of gMKVExtractGUI 1.6.0.0. If you revert to mkvtooknix 7.5.0, this utility still works. You can still download the previous version of mkvtooknix in 64 bit or 32 bit while we wait for a fix from gpower2.
dade49 is offline   Reply With Quote
Old 10th February 2015, 21:02   #134  |  Link
gpower2
gMKVExtractGUI author
 
gpower2's Avatar
 
Join Date: Aug 2003
Location: Greece / Thessaloniki
Posts: 251
I haven't downloaded mkvtoolix 7.6 in order to test gmkvextractgui, however, after quickly browsing the changelog, it appears that Mosu changed the exit code, so it naturally breaks gmkvextractgui.

A quick fix will be released tomorrow!

Thanks for your feedback everyone!
gpower2 is offline   Reply With Quote
Old 11th February 2015, 07:28   #135  |  Link
gpower2
gMKVExtractGUI author
 
gpower2's Avatar
 
Join Date: Aug 2003
Location: Greece / Thessaloniki
Posts: 251
gMKVExtractGUI 1.6.1 is out in the wild!

Mostly a bug fix release, now fully compatible with MkvToolnix 7.6.

Changelog:
  • Changed Log Form to refresh the log text when Activated and not when Shown (thanks kongfl888!)
  • Fix adding Jobs to the Job Manager after loading jobs from XML (thanks kongfl888)
  • Added CodecPrivate property to gMKVTrack class (thanks dade49)
  • Removed PostProcessing of segment lists to gMKVHelper class
  • Changed ExitCode check, in order to avoid error messages when only warnings are present in the output
  • Remove UTF-8 parameter from mkvinfo
gpower2 is offline   Reply With Quote
Old 11th February 2015, 08:00   #136  |  Link
Nebudchanezzer
Registered User
 
Join Date: Nov 2014
Posts: 23
Quote:
Originally Posted by gpower2 View Post
gMKVExtractGUI 1.6.1 is out in the wild!

Mostly a bug fix release, now fully compatible with MkvToolnix 7.6.

Changelog:
  • Changed Log Form to refresh the log text when Activated and not when Shown (thanks kongfl888!)
  • Fix adding Jobs to the Job Manager after loading jobs from XML (thanks kongfl888)
  • Added CodecPrivate property to gMKVTrack class (thanks dade49)
  • Removed PostProcessing of segment lists to gMKVHelper class
  • Changed ExitCode check, in order to avoid error messages when only warnings are present in the output
  • Remove UTF-8 parameter from mkvinfo
Seems to be something wrong with the download, only get a "READ.ME"....
Nebudchanezzer is offline   Reply With Quote
Old 11th February 2015, 08:33   #137  |  Link
gpower2
gMKVExtractGUI author
 
gpower2's Avatar
 
Join Date: Aug 2003
Location: Greece / Thessaloniki
Posts: 251
That's just SourceForge being stubborn...
Latest file is once again the correct one, thanks for the feedback!
gpower2 is offline   Reply With Quote
Old 11th February 2015, 08:54   #138  |  Link
bin_ch
Registered User
 
Join Date: Sep 2009
Posts: 37
Quote:
Originally Posted by gpower2 View Post
These messages are the result of explicitly setting the output charset to utf-8 while executing mkvinfo and mkvmerge.
It shouldn't matter to anyone, but I use them because of some localization problems the first versions had. Better safe than sorry, right?
Now that the corresponding code is commented out in the latest version, so it doesn't really matter, but just FYI, the code was triggering warnings because you mis-spelled UTF-8 as UFT-8, otherwise it should be fine.
bin_ch is offline   Reply With Quote
Old 11th February 2015, 11:28   #139  |  Link
gpower2
gMKVExtractGUI author
 
gpower2's Avatar
 
Join Date: Aug 2003
Location: Greece / Thessaloniki
Posts: 251
Thanks bin_ch, I will check it out!

I believe new version is working, right?
gpower2 is offline   Reply With Quote
Old 22nd March 2015, 12:59   #140  |  Link
STaRGaZeR
4:2:0 hater
 
Join Date: Apr 2008
Posts: 1,302
Hi gpower2,

just found an annoying bug which should be easy to fix. If you minimize the main window and then close the program via right click - close on the taskbar, the following gets written in the settings ini file:

Initial Window Position X:-32000
Initial Window Position Y:-32000

When you open the program again, the main window is out of the monitor and cannot be accessed. Solution is to remove those lines from the ini, causing the program to reappear again at (0, 0).

The rest is working nicely, I'm using this extensively now
__________________
Specs, GTX970 - PLS 1440p@96Hz
Quote:
Originally Posted by Manao View Post
That way, you have xxxx[p|i]yyy, where xxxx is the vertical resolution, yyy is the temporal resolution, and 'i' says the image has been irremediably destroyed.
STaRGaZeR is offline   Reply With Quote
Reply

Tags
extractor, gmkvextractgui, matroska, mkv, mkv extract, mkvextract, mkvextractgui

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:31.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.