Thursday, December 2, 2010

[Ubuntu]燒錄DVD影片及選單(Burn/make video DVD from files with DVD menus)

在Ubuntu下要把影片檔做出可以在DVD播放機上可以播放的DVD影片光碟,目前沒有單一工具可以完成,但可以依下列方式達到

1.轉檔(Convert video files to DVD video type)(說明)
ffmpeg -i  example.mpg  -target ntsc-dvd example.avi
2.產生DVD影片目錄格式至tmp_folder內(Generate DVD VIDEO_TS/AUDIO_TS folder and .vob file)
dvdauthor -o tmp_folder -t example.avi
3.使用KMediaFactory製作DVD選單及使用k3b燒錄(Using KMediaFactory to make DVD menu and burn DVD with k3b)
3.1 (Media)
將tmp_folder/VIDEO_TS目錄 中之.vob檔案加入KMediaFactory之專案中(Add vob files in tmp_folder/VIDEO_TS to KMediaFactory project)
3.2 (Template)
選擇Menu範本(choose menu template)
3.3 (Output)
選擇輸出方式,可直接使用k3b燒錄,按右下角的start即可開始製作了
(You can choose k3b to burn DVD disc or image file)


批次轉檔可以使用下列script(Using following script to batch converting files )
#!/bin/bash
for f in *.DAT; do ffmpeg -i "$f" -target ntsc-dvd "$f.avi"; done
for f in *.avi; do dvdauthor -o dvd -t "$f"; done