this document describes howto build a real video DVD with lve-tools as now DVD-writer devices are established on the marked, we would be able to build our own video DVDs ! But usefull software for linux to do this is very rare at the moment. Therfore i have created some tools helping for a "simple" DVD production. (simple means: DVD without menues, subtitles and extra features, but multiple chapters and titles). Sure it lacks of any comfort, but if you're familar in using this tools you will know the high grade of flexibility ... this document mainly describes the use of the command line tool lvemkdvd to build a video DVD. Infos about the NEW! klvemkdvd program - a KDE GUI replacement for lvemkdvd - can be obtained by the correspondend Readme -> klick link beside klvemkdvd screenshot, or unpack klvemkdvd package to get the README file. 1. Requirements --------------- to get lve-authoring tools work correctly, you need some additional free software packages: - dvdauthor-0.6.x -> http://dvdauthor.sourceforge.net/ "./configure; make install" will build and install the tools (only dvdauthor program is necessarily). - transcode-0.6.x -> http://zebra.fh-weingarten.de/~transcode/ package is optional: "./configure; make" will build all, but only program "tcmplex" is needed, if using lvemkdvd with option "-x" install this on your system reachable via bin path. - dvd+rw-tools-5.x.x.x -> http://fy.chalmers.se/~appro/linux/DVD+RW/ is not needed for lve stuff to work, but for writing DVDs... as of the first releases should burn only DVD+R(W) medias, the newer 5.x releases should burn also DVD-R(W) disks. (please read all infos on its homepage). "make" will build programs (growisofs, dvd+rw-format). - mjpegtools-1.6.1 -> http://mjpeg.sourceforge.net this package is optional and contains the multiplexer "mplex" used by lvemkdvd, if option "-y" is specified. install mplex reachable through bin path. NO MORE NEEDED (but only for older lvemkdvd releases): - dvdrtools-0.1.4 -> https://savannah.nongnu.org/files/?group=dvdrtools "./configure; make" will build all. for lve-tools only "./video/ifogen", "./video/tocgen" and "./mkisofs/mkisofs" are needed -> install these programs on your system reachable by binary path. please check also, to have no other (older) mkisofs somewhere on your system. 2. lve tools helpful around DVD authoring ----------------------------------------- In addition to the video editor programs lve and lvedump, there are some further programs ("lvedemux", "lvemkdvd", ...) to help in producing DVD-images. 2.1 lvedemux ------------ splits mpeg into pair of files, one for video stream and one for audio stream (both selectable). Main intention of this program is to prepare mpeg files from (X)VCDs and (X)SVCDs for using with the simple authoring programm "lvemkdvd". usage: lvedmux [options] options are: -o writes output file pair to directoy (must exist!) -s write video portion to stdout for piping -> helps to process video while demuxing. -v specifies the video stream, where value 0x00 video will not be stripped 0xE0, video stream 1 will be stripped 0xE1, 0xE2, ... for video streams 2, 3, ... -a 0x00 audio will not be stripped for MPEG1 layer II audio: 0xC0 audio stream 1 will be stripped 0xC1, 0xC2, ... for audio streams 2, 3, ... for A52-audio (AC3/DTS): 0x80 ... 0x87 (for AC3 1-8) 0x88 ... 0x8F (for DTS 1-8) for PCM-audio: 0xA0 ... 0xAF output file names are the same as input, but extension of video stream filename will be ".m2v" and of audio stream filename will be ".mpa". without any options lvedemux will strip video stream 0xE0 and audio stream 0xC0 to actual directory. 2.2 lverequant (NEW) ------------------- shrinking MPEG2 video by requantization in "compressed domain" like (DVDShrink it does). can produce video streams reduced up to 50% of original size in high speed. lverequant float between 1.0 and 99.0, wheras 2.0 for example will reduce to 50% of original size at the moment greater values than 2.0 will have no reasonable effect (means stronger shrinking) should be the name of a elementray mpeg video stream is the name of the resulting and shrinked elementary video stream. alternativ a "-" can be used for and/or instead of names to read/write from/to stdin/stdout. To shrink PS mpeg-streams (containing multiplexed video and audio, eg a .vob file) directlly, you can use "lverequant" on a FIFO together with lvedemux as follows. for example you want to shrink the PS stream ps01.mpg you have to type: lvedemux -s ps01.mpg | lverequant 2.0 - ps01-shrinked.m2v this will split audio and video streams. the video portion floats through the stdout piped over lverquant into ps01-shrinked.m2v After this, multiplexing of resulting video and audio streams must be done in a additional step ... 2.3.1 lvemkdvd [dvdauthor release] ---------------------------------- produces DVD video filestruktur ready to burn as video-dvd image... It reads one or more file pairs (mpeg1/2 video stream and audio stream) and generates video-DVD conform .VOB / .IFO files, where each file-pair is represented by one chapter. "lvemkdvd" itselfs calls the programs "dvdauthor" from dvdauthor- package and the "tcmplex" program from the transcode-package in following special manner: For each input file tcmplex will be invoked to multiplex the stream pair while writing to a pipe (/tmp/mux) where on the other end of the pipe a "dvdauthor" process consums the data to build .VOB /.IFO files. After the last multiplex run, dvdauthor adapts the files in a second pass and finally dvdauthor will be started again to build VIDEO_TS.xxx files. Each "lvemkdvd"-session produces a new title-set (with one or more chapters). Therefore "lvemkdvd" can be called several times using the same output directory (title set number will be automatically increased in every run) NOTE: multiple title-sets can be used to store video-material with different frame sizes (e.g, 720x576, 704x576, 352x288) on the same DVD. alternativley lvemkdvd can use lvedump (in muxing mode, option -m) instead of tcmplex to build DVD video images directley from lve's edit-list files. then there is NO MORE need to build separately A/V streams (.m2v / .mpa), e.g with lvedump in "elementary stream mode" (option -e). to get this proper done, you must compile lvedump with a patched (!) "ffmpeg" -> for more infos, see documentation of lvedump in Readme file. usage: lvemkdvd [options] [ ...] options are: -p to enable "edit-list" mode, allows processing of lve's edit-lists as input files and invokes therefore lvedump instead of tcmplex. -P same as -p, but displays only total estimated size, that the final titleset would have, and exit. -m "" to bypass additional parameters to tcmplex (e.g. "-D 500") or lvedump (while using option "-p") -i "" to bypass additional parameters to dvdauthor. -o directory to write VIDEO_TS subfolder with DVD video file structure (.VOB/.IFO files). if directory (including VIDEO_TS/AUDIO_TS subfolders) doesn't exist it will be created -x forces the use of tcmplex instead of lvemux -> helpful, if vobs created by lvemux won't play on consumer player. -y forces the use of mplex from (mpegtools) instead of lvemux -> helpful, if vobs created by lvemux/tcmplex won't play on consumer player. -f "" on the fly requantisizing while building DVD filesystem. -> will shrink video stream by factor "". doesn't work together with tcmplex (option "-x"). the list of input files will be specified by [ ...] where are the basename of the mpeg file-pair with assumption video file has extension ".m2v" and audio file has extension ".mpa". Or in "edit-list" mode (option "-p") the list of input-files can be simple edit-list files with assumption file extension (if omitted) is ".prj". NOTE: please check the proper installation of dvdauthor, tcmplex and lvedump they must be available in your binaries path. 2.3.2 klvemkdvd - KDE GUI replacement for lvemkdvd -------------------------------------------------- for more info please look the README deliverd with the klvemkdvd package ... 3. Using lvemkdvd ----------------- 3.1 Step by step description ---------------------------- [Step 1] To start a new "DVD project" you need one or more movie files in mpeg format, doesn't matter mpeg1 or mpeg2, also different sizes (720x576, 720x480, 352x288, ...). Most consumer DVD players will play this. But never mix PAL and NTSC on one DVD... audio data in MPEG1 Layer II format must have 48KHz sampling rate and bitrate between 128 and 392 Kbps. AC3 audio streams can be used also. (multiple sound tracks are not possible...) The movies have to be present on disk in demuxed format as a file pair named .m2v and .mpa To get such a pair, there are some possibilities depending on your source material and your purposes -> here some examples: - load your file(s) with "lve" (video editor), build your scenes and save this as edit-list -> you may use "lvedump" to process this list dumping a valid file pair (like described above), but this isn't not neccessarily if you planned to use lvemkdvd in "edit-list" mode -> please look README for description of "lvedump". - in difference to the above method you can process your edit-list also with "transcode" to reencode your movies as new (unmuxed) file pair. - if your videos have no proper VOBU format or aren't demuxed yet, split the files(s) with "lvedemux" and check the audio stream about the requirements above (if necessary, trancode the audio stream to the right format, e.g. using "transcode" or similar tools). A closer description of lvedemux can be found in section 2. [Step 2] now you have to build one or more title sets from your movie file-pair(s) first you should check for enough freespace on the destination disk (4.3GB) for a complete filled video DVD). - use "lvemkdvd -o " to build the first title from some (one or all) of your file pairs (prepared in STEP 1). all file pairs per title should have the same frame size (e.g. 704x576). Alternativly you can process edit-list files directley using additional option "-p" (lvemkdvd -p -o After "lvemkdvd" finished, you should find following files in VIDEO_TS folder: VIDEO_TS.IFO VIDEO_TS.BUP VTS_01_0.IFO VTS_01_0.BUP VTS_01_.VOB where is a ascending number beginning with 1 at list a file with n=1 should be there. please have attention the sum of your file pairs size doesn't exceeds 4.3GB. The .VOB file(s) contains now all your movies (one behind the other) as chapters. - if you have some more input files over, e.g. because they have another frame size (like 352x288) you can add a further title to your VIDEO_TS folder using: "lvemkdvd [-p] -o " After this "lvemkdvd" run, you should find following additional files in your VIDEO_TS folder: VTS_02_0.IFO VTS_02_0.BUP VTS_02_.VOB (with same like above) please have attention to the 4.3GB space limit ! You can produce further titles if enough space is left and you have some unprocessed file pairs. lvemkdvd will increase the titleset no by 1 for every run on the same output directotry ... some closer description of "lvemkdvd" an be found in section 2. of this document. [STEP 3] burning your video file structure /VIDEO_TS to DVD+R(W) / DVD-R(W): please invoke: "growisofs -Z /dev/cdrom -dvd-video -udf " (you may have another device file for your dvd-writer as "/dev/cdrom") before burning with growisofs some preparations of the dvd discs may be done (like formatting or blanking of RW media) for detailed information about dvd+rw-tools look at it's homepage. NOTE: "growisfs" itselfs calls "mkisofs". please check, that you have installed the right mkisofs program from the dvdrtools-package or from cdrtools-2.0 (or newer release). Some distributions like SuSE 8.2 (and i think 8.1 too) includes already the right mkisofs release. so there is no update needed. 3.2. detailed example --------------------- we would like to store some content from following movies to DVD: - VTS_05_1.VOB trailer ripped from any DVD (mpeg2 video [720x576], 48 KHz AC3 audio) - camera.mpg some shots captured from video-camera (mpeg1 video [704x576], 44.1 KHz 128 bsp mpeg1 LII-audio) - avseq01.mpg movie ripped from SVCD (480x576, 48 KHz 224 bps mpeg1 LII-audio) [STEP 1] - we will collect all authoring input files in folder /video/input - only need some scenes from trailer => load VTS_05_1.VOB in lve-editor cut out needed scenes, save it to the edit-list "trailer.prj". NOTE: ther is no need to invoke "lvedump" here, because we will using lvemkdvd in "edit-list" mode to create our trailer title. - need to produce 3 stories each one only with important scenes from camera.mpg => doing the job with lve, saving edit-lists story01.prj, story02.prj and story03.prj => for each ".prj"-file lvedump -s 48000 -e -i storyNN -av /video/input/storyNN will produce pairs /video/input/storyNN.m2v storyNN.mpa with reencoded, resampled audio (mpeg1 LII, 48 KHz, 224 bps) - need full SVCD movie => lvedemux -o /video/dvd/input avseq01.mpg will produce pair /video/input/avseq01.m2v avseq01.mpa (audio is in proper format) [STEP 2] - check size of all input files to get first impression => du -H -s /video/input prints 3.25 GB -> ok, will fit to DVD. - create 1st. title from edit-list(!) of the trailer-movie => cd /video/input; lvemkdvd -p -o /video/dvd trailer - create 2nd. title from 3 story file pairs => cd /video/input; lvemkdvd -o /video/dvd story01 story02 story03 - create 3th. title from SVCD movie => cd /video/input; lvemkdvd -o /video/dvd avseq01 - now /video/dvd/VIDEO_TS folder could have following structure: VIDEO_TS.IFO VIDEO_TS.BUP VTS_01_0.IFO title-set 1 VTS_01_1.BUP VTS_01_1.VOB with scenes from trailer movie as 1 chapter VTS_02_0.IFO title-set 2 VTS_02_0.BUP VTS_02_1.VOB with 3 cutted stories VTS_02_2.VOB each as a own chapter VTS_03_0.IFO title-set 3 VTS_03_0.BUP VTS_03_1.VOB with SVCD movie as 1 chapter - final size check => du -H -s /video/dvd prints 3.26 GB -> ok will fit to DVD [STEP 3] - burn DVD-R on the fly (mkisofs will be invoked by growisofs while piping output directley to burner). growisofs -Z /dev/cdrw -dvd-video -udf /video/dvd [FINAL] - enjoy 1st. home made DVD in your consumer player.