≡ Menu

mencoder command

DeVeDe is a program or front-end to command line utilities to create video DVDs and CDs (VCD, sVCD or CVD), suitables for home players, from any number of video files, in any of the formats supported by Mplayer. The big advantage over other utilities is that it only needs Mplayer, Mencoder, DVDAuthor, VCDImager and MKisofs (well, and Python 2.4, PyGTK and PyGlade), so its dependencies are really small.

Install DeVeDe

Use apt-get command to install DeVeDe:
$ sudo apt-get install devede

To create dvds just type devede at command prompt:
$ devede &

You can also start devede by visiting Applications > Sound & Video > Devede

Linux Create AVI file to DVD format ( Create video DVDs )

Just choose the DVD / VCD type and follow on screen instructions.

Create DVD from command line

Following tools get installed with devede:

  1. mencoder : MPlayer’s Movie Encoder) is a simple movie encoder
  2. ffmpeg : FFmpeg video converter
  3. dvdauthor : assembles multiple mpeg program streams into a suitable DVD filesystem

So if you are a pro command line user, type the following commands to convert file1.avi fille2.avi to DVD format (if you are not comfortable with command line use devede GUI software and just skip following commands) :

$ cat file1.avi file2.avi > ccmovie.avi
Now run movie encoder to create out.avi from ccmovie.avi (option -ovc and -oac sets no encoding, just streamcopy)
$ mencoder -o out.avi -noidx -oac copy -ovc copy ccmovie.avi
Output:

MEncoder 2:1.0~rc1-0ubuntu13 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz (Family: 6, Model: 15, Stepping: 11)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
success: format: 0  data: 0x0 - 0x385ceda
AVI file format detected.
VIDEO:  [MP42]  544x400  24bpp  29.970 fps  485.6 kbps (59.3 kbyte/s)
[V] filefmt:3  fourcc:0x3234504D  size:544x400  fps:29.97  ftime:=0.0334
videocodec: framecopy (544x400 24bpp fourcc=3234504d)
audiocodec: framecopy (format=55 chans=2 rate=44100 bits=0 B/s=16743 sample-0)
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing index...99f (100%)  0.00fps Trem:   0min  55mb  A-V:0.013 [474:133]
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Video stream:  474.111 kbit/s  (59263 B/s)  size: 45083566 bytes  760.727 secs  22799 frames
Audio stream:  133.948 kbit/s  (16743 B/s)  size: 12736975 bytes  760.712 secs

Next run FFmpeg video converter to set aspect ratio, ntsc dvd television standard etc:
$ ffmpeg -i out.avi -y -target ntsc-dvd -sameq -aspect 16:9 out.mpg
Output:

FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-libvorbis --enable-libtheora --enable-libogg --enable-libgsm --enable-dc1394 --disable-debug --enable-shared --prefix=/usr
  libavutil version: 1d.49.3.0
  libavcodec version: 1d.51.38.0
  libavformat version: 1d.51.10.0
  built on Jun  3 2007 20:59:25, gcc: 4.1.3 20070528 (prerelease) (Ubuntu 4.1.2-9ubuntu2)
Input #0, avi, from 'out.avi':
  Duration: 00:12:40.7, start: 0.000000, bitrate: 621 kb/s
  Stream #0.0: Video: msmpeg4v2, yuv420p, 544x400, 29.97 fps(r)
  Stream #0.1: Audio: mp3, 44100 Hz, stereo, 32 kb/s
Output #0, dvd, to 'out.mpg':
  Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 6000 kb/s, 29.97 fps(c)
  Stream #0.1: Audio: ac3, 48000 Hz, stereo, 448 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
frame=22798 q=0.0 Lsize=  312758kB time=760.7 bitrate=3368.3kbits/s 

At a high level, a DVD is a collection of menus and titles. Conceptually, a menu contains buttons which can be assigned actions and provides a list of choices to the end user, while a title contains the main content of the DVD. However, in reality many of the features available in menus (including buttons, pausing, and looping) are also available in titles. Use dvdauthor assembles multiple mpeg program streams into a suitable DVD filesystem. You should see DVD filesytem in dvd directory:
$ dvdauthor --title -o dvd -f out.mpg
Output:

DVDAuthor::dvdauthor, version 0.6.14.
Build options: gnugetopt magick iconv freetype
Send bugs to <dvdauthor-users@lists.sourceforge.net>
INFO: dvdauthor creating VTS
STAT: Picking VTS 01
STAT: Processing out.mpg...
STAT: VOBU 1888 at 304MB, 1 PGCS
INFO: Video pts = 0.500 .. 761.193
INFO: Audio[0] pts = 0.500 .. 761.204
STAT: VOBU 1900 at 305MB, 1 PGCS
INFO: Generating VTS with the following video attributes:
INFO: MPEG version: mpeg2
INFO: TV standard: ntsc
INFO: Aspect ratio: 16:9
INFO: Resolution: 720x480
INFO: Audio ch 0 format: ac3/2ch, 48khz drc
STAT: fixed 1900 VOBUS

Creates the table of contents file instead of a titleset:
$ dvdauthor -o dvd -T
Output:

DVDAuthor::dvdauthor, version 0.6.14.
Build options: gnugetopt magick iconv freetype
Send bugs to <dvdauthor-users@lists.sourceforge.net>
INFO: dvdauthor creating table of contents
INFO: Scanning dvd/VIDEO_TS/VTS_01_0.IFO

Create dvd.iso:
$ mkisofs -dvd-video -o dvd.iso dvd/
Output:

Setting input-charset to 'UTF-8' from locale.
  3.20% done, estimate finish Fri Nov  9 16:49:50 2007
  6.38% done, estimate finish Fri Nov  9 16:49:50 2007
  9.57% done, estimate finish Fri Nov  9 16:49:50 2007
 12.76% done, estimate finish Fri Nov  9 16:49:50 2007
 15.95% done, estimate finish Fri Nov  9 16:49:50 2007
 19.13% done, estimate finish Fri Nov  9 16:49:50 2007
 22.33% done, estimate finish Fri Nov  9 16:49:54 2007
 25.51% done, estimate finish Fri Nov  9 16:49:53 2007
 28.70% done, estimate finish Fri Nov  9 16:49:53 2007
 31.88% done, estimate finish Fri Nov  9 16:49:53 2007
 35.08% done, estimate finish Fri Nov  9 16:49:52 2007
 38.26% done, estimate finish Fri Nov  9 16:49:52 2007
 41.45% done, estimate finish Fri Nov  9 16:49:52 2007
 44.64% done, estimate finish Fri Nov  9 16:49:54 2007
 47.83% done, estimate finish Fri Nov  9 16:49:54 2007
 51.01% done, estimate finish Fri Nov  9 16:49:53 2007
 54.21% done, estimate finish Fri Nov  9 16:49:53 2007
 57.39% done, estimate finish Fri Nov  9 16:49:53 2007
 60.58% done, estimate finish Fri Nov  9 16:49:53 2007
 63.77% done, estimate finish Fri Nov  9 16:49:54 2007
 66.96% done, estimate finish Fri Nov  9 16:49:54 2007
 70.14% done, estimate finish Fri Nov  9 16:49:54 2007
 73.33% done, estimate finish Fri Nov  9 16:49:54 2007
 76.52% done, estimate finish Fri Nov  9 16:49:53 2007
 79.71% done, estimate finish Fri Nov  9 16:49:53 2007
 82.89% done, estimate finish Fri Nov  9 16:49:53 2007
 86.09% done, estimate finish Fri Nov  9 16:49:53 2007
 89.27% done, estimate finish Fri Nov  9 16:49:54 2007
 92.46% done, estimate finish Fri Nov  9 16:49:55 2007
 95.65% done, estimate finish Fri Nov  9 16:49:55 2007
 98.84% done, estimate finish Fri Nov  9 16:49:55 2007
Total translation table size: 0
Total rockridge attributes bytes: 0
Total directory bytes: 4096
Path table size(bytes): 42
Max brk space used 0
156833 extents written (306 MB)

Burn dvd.iso to DVD disk:
$ growisofs -dvd-compat -dvd-video -speed=4 -Z /dev/dvd dvd/*

Further readings: