Hi,
I just have made a small modification to the DVBcut output window.
The chapter marks are now also put into a comma separated list and print out
as simple XML file for dvdauthor.
First I just wanted to put out the <vob file=.... chapters=...> line alone
(that's enough for me, because normally I write several movies on one DVD),
but then I thought it might be useful for total beginners to have a basic
simple XML-file to start with.
And just in case someone wants to code an file output dialog... or put it to
the project file... ;-)
A diff file to dvdcut.cpp of Revision 16 is attached ... apply it with
"patch -Np1 < xmlchapters.diff" from within your dvdcut main directory.
ciao
Ralph
--- svn/src/dvbcut.cpp 2006-09-24 22:56:49.000000000 +0200
+++ mydvbcut/src/dvbcut.cpp 2007-01-26 13:59:31.000000000 +0100
@@ -406,26 +406,56 @@
mux.reset();
- prgwin.printheading("Saved %d pictures (%02d:%02d:%02d.%03d)\n",savedpic,
+ prgwin.printheading("Saved %d pictures (%02d:%02d:%02d.%03d)",savedpic,
int(savedtime/(3600*90000)),
int(savedtime/(60*90000))%60,
int(savedtime/90000)%60,
int(savedtime/90)%1000 );
+ std::string chapterstring;
if (!chapterlist.empty()) {
- prgwin.printheading("Chapterlist:");
+ int nchar=0;
+ char chapter[12];
+ prgwin.printheading("\nChapterlist:");
pts_t lastch=-1;
for(std::list<pts_t>::const_iterator it=chapterlist.begin();
it!=chapterlist.end();++it)
if (*it != lastch) {
lastch=*it;
- prgwin.print("%02d:%02d:%02d.%03d",
+ // formatting the chapter string
+ if(nchar>0) {
+ nchar++;
+ chapterstring+=",";
+ }
+ nchar+=sprintf(chapter,"%02d:%02d:%02d.%03d",
int(lastch/(3600*90000)),
int(lastch/(60*90000))%60,
int(lastch/90000)%60,
int(lastch/90)%1000 );
+ // normal output as before
+ prgwin.print(chapter);
+ // append chapter marks to a comma separated list for dvdauthor xml-file
+ chapterstring+=chapter;
}
}
+ // simple dvdauthor xml file with chapter marks
+ std::string filename,destname;
+ if(expfilen.rfind("/")<expfilen.length())
+ filename=expfilen.substr(expfilen.rfind("/")+1);
+ else
+ filename=expfilen;
+ destname=filename.substr(0,filename.rfind("."));
+ prgwin.printheading("\nSimple XML-file for dvdauthor with chapter marks:");
+ prgwin.print("<dvdauthor dest=\"%s\">",destname.c_str());
+ prgwin.print(" <vmgm />");
+ prgwin.print(" <titleset>");
+ prgwin.print(" <titles>");
+ prgwin.print(" <pgc>");
+ prgwin.print(" <vob file=\"%s\" chapters=\"%s\" />",filename.c_str(),chapterstring.c_str());
+ prgwin.print(" </pgc>");
+ prgwin.print(" </titles>");
+ prgwin.print(" </titleset>");
+ prgwin.print("</dvdauthor>");
prgwin.finish();
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
DVBCUT-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dvbcut-user