From [[http://www.linuxjournal.com/article/6953]]. ====== How a DVD Works (Quick Version) ====== A DVD is comprised of one or more video title sets (VTSes), which contain video information in the form of MPEG-2 video streams. Each disc can have up to 99 VTSes, and each title set can be subdivided further into as many as 99 chapters, allowing DVD players to jump to a certain point within the video stream. Within each VTS, a DVD can have up to eight different audio tracks and 32 subtitle tracks that the viewer can switch between at will. A menu system can be included within a title set, allowing the viewer to select between the different subtitle and audio tracks. An optional top-level menu, known as the video manager menu (VMGM), is used to navigate between the different title sets. One VTS may contain a feature film and another may contain a documentary on the film, and the VMGM allows viewers to select which one they want to watch. The DVD format doesn't eliminate the differences between the two competing broadcasting formats, NTSC (primarily used in America) and PAL (the standard in Europe and Japan). I live in Britain, so the frame information and resolution details used in this article are for a PAL system, but I point out the differences you need to be aware of when they appear and offer appropriate settings for an NTSC disc. The DVD specification includes advanced features, such as the concept of region coding, the possibility of viewing different angles of a video stream and simple computations using built-in registers provided by a DVD player. I don't know much about these features, and they aren't discussed in this article. The dvdauthor mailing list is a good source for further information. ====== DVD Creation on Linux ====== From [[http://marc.waeckerlin.org/linux/dvd.php.en]]. Last Change: 10/26/2004 ===== Get Videos from a Camcoder to the Computer ===== I know four possibilities to get videos from a digital video DV camera to the computer's hard disk: dvgrab, kino, Main Actor and cinelerra. I prefer dvgrab, because it is a simple and easy command line tool with no overhead. I bought a big 250GB hard disk and stored all my videos there: * Plug the camera to the computer using a IEEE1394 FireWire i.Link cable * Insert tape and rewind * Switch your camera on in the player/VCR mode * Start recording with the command:dvgrab --format dv2 --opendml --autosplit --timestamp prefix * The video sequences are in the current directory ===== Edit and Cut Videos ===== There are at least four possibilities to cut and edit videos: avidemux2, kino, Main Actor and cinelerra. I prefer avidemu2 for TV recordings, because it is simple, but has no fancy features. For cuts and simple effects, kino is perfect. More elaborated effects can be created with Main Actor and cinelerra, but Main Actor is more intuitive in handling and seems to crash less often. The biggest problem with Main Actor is that the edit file format is binary and proprietary, and it cannot handle files larger than 2GB. For this, save several smaller videos and collate them using kino. Main Actor, kino and avidemux2 (Save as DVD PS) can export videos directly in DVD format. I don't know whether cinelerra can do this. ===== Create Video Sequences with PovRay ===== [[http://povray.org/|PovRay]] is a program that reads 3D scene descriptions to generate images. This is very useful to create DVD title images or intro sequences. A short example: * First we create a file demo.pov: #include "colors.inc" #include "golds.inc" #include "stones.inc" background {Black} camera {location -5*z look_at 0 right 720/576*x} light_source {<-10,10,-10> White} union { text {ttf "timrom.ttf" "PovRay" 1, 0 texture {T_Gold_3B} translate <-1.5,0,-1.5> } box {-1, 1 texture {T_Stone8}} rotate clock*360 } * Next we render the scene with 99 images in DVD PAL quality:\\ ''povray +W720 +H576 +Q9 +QR +A0.3 +Idemo.pov +Odemo +KFF99'' * If we want, we can create a GIF animation for a preview, but the size of the images should be reduced, e.g. by a factor of four (+W180 +H144 +KC):\\ ''convert -delay 4 -loop 0 demo??.png demo.gif'' * Now images can be converted to an MPEG 2 video file:\\ ''png2yuv -j demo%02d.png -f 25 -I p -L 0 -b 1 | mpeg2enc -f 8 -o demo.m2v'' * The only thing missing now is the music, that could be mixed in e.g. from an mp2 file, with:\\ ''tcmplex -m d -i demo.m2v -p music.mpa -o demo.mpg'' * The Result is a four seconds video sequence, that can be viewed with mplayer. ===== Create a Dia Show ===== To be written ===== Author a Video DVD ===== To be written ===== Burn a Video DVD ===== To be written - Add the movie to the image\\ ''dvdauthor -o img dvd-Moviename.mpg'' - After adding all movies, generate the title:\\ ''dvdauthor -o img -T'' - Now burn the image:\\ ''growisofs -speed=1 -dvd-compat -Z /dev/dvdrecorder -dvd-video -udf img'' - Cleanup:\\ ''rm -r img dvd-Moviename.mpg'' ===== Record DVDs from TV ===== Videos can be recorded from TV with my tool from http://marc.wäckerlin.ch/videorecorder.php. The movies can be prepared with avidemux2, cut out the commercials and find the start and end of the movie. With the buttons A and B you can mark the start and end of a region that you can delete with key Del. For saving, you must choose Save as DVD PS. If there is any problem, you may have to remultiplex the movie with dvb-mplex -t DVD -o dvd-movie.mpg movie.mpg. That lasts a long time, but does not reduce quality. You have to do it anyway if you want to burn a video without the use of avidemux2. Bevor you can burn a movie, you must master a DVD image, given a prepared movie named dvd-movie.mpg: * Create a DVD image from a movie (you can repeat this step for several movies):\\ ''dvdauthor -o img dvd-movie.mpg'' * Add a title:\\ ''dvdauthor -o img -T'' * And finally burn the DVD:\\ ''growisofs -dvd-compat -Z /dev/dvdrecorder -dvd-video img'' * Now you can clean up:\\ ''rm -r img'' ===== Copy a Video DVD ===== All you need to copy video DVDs is the program lxdvdrip. Other tools are required by lxdvdrip as described in the documentation. Not all of them are described here, e.g. streamdvd from http://www.badabum.de/streamdvd.html. If lxdvdrip does not automatically choose the right main movie track for copy, you can use lsdvd to list the tracks and choose the longest track by calling lxdvdrip with option -t and the track number. ===== The Copy Protection Problem ===== Unfortunately, commercial DVD videos are limited by a copy protection named CSS. This is the reason, why in the standard installation of a Linux distribution, it is not possible to watch DVD movies. To be able to watch DVDs regardless of copy protection, you need a hacker tool named DeCSS. This may be illegal in some countries, therefore distributors do not deliver the necessary libraries. The easiest way of installation on a SuSE Linux is to use apt4rpm available on http://apt4rpm.sf.net. Simply install as user root on a command line the necessary RPM packages for your distribution using ''**rpm -ivh packages**'', then edit file ''/etc/apt/sources.list'' so that ''suser-rbos'' is in the list of sources. Now after calling ''**apt update**'', you can simply call ''**apt install MPlayer-suite**'' to install MPlayer and all necessary packages including DeCSS with one single command. The same way you can install most of the tools for video processing. If you need a nice GUI for apt, type ''apt install synaptic''. ===== Toolset ===== Please refer to paragraf The Copy Protection Problem top read what's the easiest way to install software on a RPM based Linux Distribution (such as SuSE or RedHat). === Video Player === * mplayer: http://mplayerhq.hu\\ An universal video player, especially useful to play MPEG and DVDs. * xine: http://xine.sf.net\\ Another universal video player, also useful to play MPEG and DVDs. === Copy from Digital Video DV Camera, Cut and Edit Videos === * dvgrab: http://kino.schirmacher.de\\ Get your own home videos over a IEEE1394 FireWire i.Link connection from your digital DV camcorder to your computer. * kino: http://kino.schirmacher.de\\ A great GUI that can not only get videos from a camcorder to the computer, as dvgrab does, but it can also send them back to the camera, cut videos, add effects and convert to other formats, such as DVD video format. * Main Actor: http://mainconcept.de/downloads.shtml\\ Ein kommerzielles Programm zum schneiden und bearbeiten von Videos. Die alte Version war mit SuSE Linux 8.2 gratis dabei. Leider ist die alte Version auf der Homepage nicht mehr verfügbar und für die neue Version 5 gibt es nur eine Vorabversion (dafür gratis).##A commercial software for cutting and editing videos. The old release was in SuSE 8.2 included for free. Unfortunately, the old version is no more available on their homepage and the new release 5 is only downloadable as a preview. * cinelerra: http://heroines.sf.netcinelerra: http://heroines.sf.net\\ A free software for cutting and editing videos. * avidemux2: http://avidemux.sf.net\\ A small program for cutting videos, especially good for cutting commercials out of TV movies. === Convert and Encode Video Streams === * transcode: http://www.theorie.physik.uni-goettingen.de/~ostreich/transcode\\ The Swiss-Army Knife for video transcoding and limited also for video processing. It converts any video format to any other video format. * mjpeg-tools: http://mjpeg.sf.net\\ Video format conversion tools. === Author a Video DVD === * dvdauthor: http://dvdauthor.sf.net\\ Create your own video DVD (including menus and so on). * dvdauthor: http://qdvdauthor.sf.net\\ A nice GUI for dvdauthor. === Burn DVDs === * growisofs: http://www.fsf.org/dvdrtools\\ Burn a (video) DVD. === Record from TV === * videorecorder: http://marc.waeckerlin.org/linux/videorecorder.php\\ BTTV and PVR Videorecorder === Copy commercial DVDs === * lsdvd: http://sourceforge.net/projects/acidrip\\ List the contents of a video DVD. * lxdvdrip: http://openfacts.berlios.de/index-en.phtml?title=lxdvdrip\\ Copy video DVDs on the command line. * acidrip: http://untrepid.com/acidrip\\ GUI to copy video DVDs.