Wednesday, November 24, 2010

Making DVD movies in Linux

(1.0) Generally, people never used to copy the whole DVD files while copying from an orginal DVD disc. In such case, playing in the computer is fine but an error is likely to occur while writing to disc. So, what we have to do is, install dvdauthor as root:

#aptitude install dvdauthor

Then, open Text Editor and copy the following html codes and give any name as following.
For instance:  movie.xml
<dvdauthor dest="/home/jrabgay/Desktop">
<vmgm>
<menus>
<video format="pal"></video>
<pgc entry="title">
</pgc>
</menus>
</vmgm>
<titleset>
<menus>
<pgc entry="root">
</pgc>
</menus>
<titles>
<pgc>
<vob file="vts_01_1.mpg"></vob>
<vob file="vts_01_2.mpg"></vob>
<vob file="vts_01_3.mpg"></vob>
<vob file="vts_01_4.mpg"></vob>
<post>call vmgm menu;</post>
</pgc>
</titles>
</titleset>
</dvdauthor>

Note: Keep all your DVD files and movie.xml in one folder.

Its always recommended to save in root partition(home folder) rather than FAT32 file system. Therefore, we have to change destination to /home/username at the top of your xml.
All DVD files will be in .vob format(vts_01_1 etc.), so we have to change that into .mpg for all the files as given above. After doing these, run dvdauthor in terminal.
 Locate the source:

#cd /media/common/DVD_Project/
#ls
movie.xml  vts_01_0.vob  vts_01_1.vob  vts_01_2.vob

Run dvdauthor:

#dvdauthor -x movie.xml

Finally, the new DVD(VIDEO_TS & AUDIO_TS) will be created. Put these in one folder and name it dvd or any.

  
Now make a DVD ISO file


  1. Run in terminal--
#mkisofs -o /tmp/image.raw -dvd-video /data6/video/Sheffield6 (If mkisofs doesn't work, try using genisoimage)
(Change destination /temp to other. /data6/video/Sheffield6 to /home/bhutan/dvd)

  1. Finally, we can see a file called image.raw. (If .raw doesn't work properly, rename it to .iso)
    This we can burn directly as an iso file in k3b(or any linux burners) and play in the movie player.


Note: Without making an iamge.raw the movie can't play. Its not necessary to put background and all. Just try simple!


(1.1) Exceptionally, some DVD files can't work though their formats are in .vob. This is because the files are not compiled in a correct format. What we have to do?

Install mencoder (there are many mencoders but I prefer PAL DVD) as below:

#aptitude install mencoder

Run mencoder with the following commands:

#cd /media/common/DVD_Project/
#ls
movie.xml  vts_01_0.vob  vts_01_1.vob  vts_01_2.vob 
#mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf \
 -vf scale=720:576,harddup -srate 48000 -af lavcresample=48000 \
 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:\
keyint=15:vstrict=0:acodec=ac3:abitrate=192:aspect=16/9 -ofps 25 \
  -o movie.mpg movie.avi

Change output movie.mpg to movie1.mpg and input movie.avi to  vts_01_1.vob. When it is completed, go for the second file with the same method by just changing its name(like, movie2.mpg for vts_01_2.vob)

Then, do the same thing as stated in index 1.0.

No comments:

Post a Comment