Author: robux4
Date: 2004-12-22 17:08:43 +0300 (Wed, 22 Dec 2004)
New Revision: 985
Modified:
trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
trunk/DvdMenuXtractor/README.txt
Log:
DMX: automatically generate the mkvmerge command-line for each DVD domain
Modified: trunk/DvdMenuXtractor/DvdMenuXtractor.cpp
===================================================================
--- trunk/DvdMenuXtractor/DvdMenuXtractor.cpp 2004-12-18 22:26:02 UTC (rev 984)
+++ trunk/DvdMenuXtractor/DvdMenuXtractor.cpp 2004-12-22 14:08:43 UTC (rev 985)
@@ -569,6 +569,16 @@
m_txtDemuxLog->AppendText("Processing " + newFilename + "\n");
+ wxString MtxFilename = outputDirectory + newFilename + ".cmd";
+ wxFile MtxCommandFile;
+ MtxCommandFile.Create(MtxFilename, true, wxS_DEFAULT | wxS_IXUSR | wxS_IXGRP | wxS_IXOTH);
+#if !defined(WIN32)
+ wxString ShellString = "#!/bin/sh\n\n";
+ MtxCommandFile.Write(ShellString.c_str(), ShellString.Length());
+#endif
+ wxString MtxCommandString = "mkvmerge -o " + newFilename + ".mkv --command-line-charset UTF-8 ";
+ MtxCommandString += "--default-track 0 --track-name 0:\"video\" --timecodes " + newFilename + "_m2v.tmc " + newFilename + ".m2v";
+
Demuxer * _muxer = new VideoDemuxWriter(outputDirectory + newFilename, _fps);
if (!demuxer.AddDemuxer(VIDEO_STREAM, _muxer))
delete _muxer;
@@ -595,6 +605,11 @@
_muxer = new AC3DemuxWriter(outputDirectory + newFilename+_langName, 0x80 + _ID);
if (!demuxer.AddDemuxer(SUBSTREAM_AC3_LOW + _ID, _muxer))
delete _muxer;
+ else {
+ MtxCommandString += "--track-name 0:\"" + newFilename+_langName + "\" --language 0:";
+ MtxCommandString += wxString::Format("%c%c ", _attr->lang_code >> 8, _attr->lang_code & 0xFF);
+ MtxCommandString += "--timecodes " + newFilename+_langName + "_ac3.tmc " + newFilename+_langName + ".ac3";
+ }
break;
case 2:
@@ -602,6 +617,11 @@
_muxer = new MPADemuxWriter(outputDirectory + newFilename+_langName, 0xC0 + _ID);
if (!demuxer.AddDemuxer(AUDIO_STREAM + _ID, _muxer))
delete _muxer;
+ else {
+ MtxCommandString += "--track-name 0:\"" + newFilename+_langName + "\" --language 0:";
+ MtxCommandString += wxString::Format("%c%c ", _attr->lang_code >> 8, _attr->lang_code & 0xFF);
+ MtxCommandString += "--timecodes " + newFilename+_langName + "_mpa.tmc " + newFilename+_langName + ".mpa";
+ }
break;
case 4:
@@ -609,12 +629,22 @@
_muxer = new LPCMDemuxWriter(outputDirectory + newFilename+_langName, 0xA0 + _ID, 48000, 16, 2);
if (!demuxer.AddDemuxer(SUBSTREAM_PCM_LOW + _ID, _muxer))
delete _muxer;
+ else {
+ MtxCommandString += "--track-name 0:\"" + newFilename+_langName + "\" --language 0:";
+ MtxCommandString += wxString::Format("%c%c ", _attr->lang_code >> 8, _attr->lang_code & 0xFF);
+ MtxCommandString += "--timecodes " + newFilename+_langName + "_wav.tmc " + newFilename+_langName + ".wav";
+ }
break;
case 6:
_muxer = new DTSDemuxWriter(outputDirectory + newFilename+_langName, 0x88 + _ID);
if (!demuxer.AddDemuxer(SUBSTREAM_DTS_LOW + _ID, _muxer))
delete _muxer;
+ else {
+ MtxCommandString += "--track-name 0:\"" + newFilename+_langName + "\" --language 0:";
+ MtxCommandString += wxString::Format("%c%c ", _attr->lang_code >> 8, _attr->lang_code & 0xFF);
+ MtxCommandString += "--timecodes " + newFilename+_langName + "_dts.tmc " + newFilename+_langName + ".dts";
+ }
break;
default:
@@ -642,14 +672,26 @@
_muxer = new SubDemuxWriter(outputDirectory + newFilename+_langName, 0x20 + _IDs.Item(_IDidx), _width, _height, _palette, _attr->lang_code, _attr->lang_extension == 9);
if (!demuxer.AddDemuxer(SUBSTREAM_SUB_LOW + _IDs.Item(_IDidx), _muxer))
delete _muxer;
+ else {
+ MtxCommandString += "--track-name 0:\"" + newFilename+_langName + "\" --language 0:";
+ MtxCommandString += wxString::Format("%c%c ", _attr->lang_code >> 8, _attr->lang_code & 0xFF);
+ MtxCommandString += newFilename+_langName + ".idx";
+ }
}
}
// create a possible button demuxer too
_muxer = new BtnDemuxWriter(outputDirectory + newFilename, _width, _height);
if (!demuxer.AddDemuxer(SUBSTREAM_PCI, _muxer))
delete _muxer;
+ else {
+ MtxCommandString += "--track-name 0:\"" + newFilename + "\" --timecodes " + newFilename + "_btn.tmc " + newFilename + ".btn";
+ }
}
+ MtxCommandString += "--chapters " + newFilename + "_menu.xml";
+ MtxCommandFile.Write(MtxCommandString.c_str(), MtxCommandString.Length());
+ MtxCommandFile.Close();
+
m_gaDemuxProgress->SetValue(0);
m_gaDemuxProgress->SetRange(aVobParser.GetPacketCount() >> 8);
while(aVobParser.ParseNextPacket(*IfoFile))
@@ -1492,7 +1534,7 @@
SetTopWindow(wizard);
}
- wxLogMessage(APPLICATION_NAME + " started.");
+ wxLogMessage("'" + APPLICATION_NAME + "' started.");
// success: wxApp::OnRun() will be called which will enter the main message
// loop and the application will run. If we returned FALSE here, the
Modified: trunk/DvdMenuXtractor/README.txt
===================================================================
--- trunk/DvdMenuXtractor/README.txt 2004-12-18 22:26:02 UTC (rev 984)
+++ trunk/DvdMenuXtractor/README.txt 2004-12-22 14:08:43 UTC (rev 985)
@@ -2,7 +2,6 @@
* The duration of still frames is not handled yet (only lasts as normal frames)
TODO :
-* generate the mkvmerge muxing batch for each output file (OS specific)
* allow skipping DVD parts when extracting (VMG, VTSM, VTS)
* allow selection of stream output (audio & subs languages)
* editor for the chapter names
\ No newline at end of file
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.