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. |
29th December 2014, 03:18 | #121 | Link |
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.
|
29th December 2014, 03:44 | #122 | Link |
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; |
29th December 2014, 15:34 | #123 | Link |
gMKVExtractGUI author
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! |
29th December 2014, 19:33 | #124 | Link |
Registered User
Join Date: Jan 2006
Posts: 37
|
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.
|
2nd January 2015, 13:04 | #128 | Link |
gMKVExtractGUI author
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 |
5th February 2015, 00:41 | #130 | Link |
Anime addict
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. |
10th February 2015, 15:47 | #132 | Link | |
Registered User
Join Date: Mar 2004
Posts: 243
|
Quote:
MKVExtractGUI2 works fine with 7.6.0 Perhaps the trouble is in gMKVToolnix.dll? Last edited by alfixdvd; 10th February 2015 at 15:53. |
|
10th February 2015, 17:29 | #133 | Link |
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.
|
10th February 2015, 21:02 | #134 | Link |
gMKVExtractGUI author
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! |
11th February 2015, 07:28 | #135 | Link |
gMKVExtractGUI author
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:
|
11th February 2015, 08:00 | #136 | Link | |
Registered User
Join Date: Nov 2014
Posts: 23
|
Quote:
|
|
11th February 2015, 08:54 | #138 | Link |
Registered User
Join Date: Sep 2009
Posts: 37
|
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.
|
22nd March 2015, 12:59 | #140 | Link |
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 |
Tags |
extractor, gmkvextractgui, matroska, mkv, mkv extract, mkvextract, mkvextractgui |
|
|