Showing posts with label mkisofs. Show all posts
Showing posts with label mkisofs. Show all posts

Tuesday, January 01, 2008

method to create a menuless DVD

Happy 2008, everybody!

I keep forgetting the commands to create and burn DVD-ready files from Cinelerra. As the following commands worked well for me, I thought I'd write 'em down for folks. I won't concentrate on creating the DVD-ready file, but more on the latter steps using dvdauthor and burning an iso.

In order to get a working DVD, you're going to do the following:
1 - from Cinelerra, create a valid DVD-ready MPEG file
2 - with dvdauthor, create a DVD filesystem from that MPEG
3 - with dvdauthor, create a table of contents for the DVD filesystem
4 - with mkisofs, create a DVD-ready ISO image in prep for burning to DVD
5 - with growisofs, burn the DVD

PrerequisitesCinelerra
mplex
dvdauthor
dvd+rw-tools

References
http://gentoo-wiki.com/HOWTO_Create_a_DVD:Burn
http://gentoo-wiki.com/HOWTO_Mencoder_Introduction_Guide

1 - Create a valid DVD-ready MPEG file
In Cinelerra, create a project with the following specs:
Audio
Samplerate: 48000
Channels: 2

Video
Framerate: 29.97
Width: 720
Height: 480
W/H Ratios both 1
Color Model: YUVA-8bit
Aspect Ratio: 3:2 or check Auto
Interlace Mode: Not Interlaced

Render Options
Audio
File Format: MPEG Audio
Layer: II
Kbits per second: 384Kbps

Video
File Format: YUV4MPEG

Either mpeg2enc or ffmpeg presets should work. Just make sure the aspect ratio of the resultant video is 16:9, because dvdauthor will not create the DVD filesystem if this is not the case. The switch to ffmpeg is "-aspect 16:9" or "aspect 1.777" like so:
ffmpeg -f yuv4mpegpipe -i - -y -target dvd -aspect 1.777 -f mpeg2video %

Since multiplexing to DVD-ready file in ffmpeg doesn't work as expected, I combine the audio and video with MPLEX using this command:
mplex -f 8 -o test.mpg video.m2v audio.mp2

I will try to figure out the source of the ffmpeg issue later.

2 - Create a DVD filesystem from MPEG
Using dvdauthor, run this command to create a filesystem in a folder called "dvd" from your test mpeg:
[mule@ogre ~]# dvdauthor -o dvd/ -t test.mpg
DVDAuthor::dvdauthor, version 0.6.14.
Build options: gnugetopt iconv freetype fribidi
Send bugs to

INFO: dvdauthor creating VTS
STAT: Picking VTS 03

STAT: Processing test.mpg...
STAT: VOBU 1488 at 394MB, 1 PGCS
INFO: Video pts = 0.133 .. 598.564
INFO: Audio[8] pts = 0.133 .. 598.621
STAT: VOBU 1499 at 395MB, 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: mp2/2ch, 48khz 20bps

STAT: fixed 1499 VOBUS


3 - Create a Table of Contents
Using dvdauthor, run this command to create a table of contents for the DVD filesystem:
[mule@ogre ~]# dvdauthor -o dvd/ -T
DVDAuthor::dvdauthor, version 0.6.14.
Build options: gnugetopt iconv freetype fribidi
Send bugs to

INFO: dvdauthor creating table of contents
INFO: Scanning dvd/VIDEO_TS/VTS_01_0.IFO
INFO: Scanning dvd/VIDEO_TS/VTS_02_0.IFO
INFO: Scanning dvd/VIDEO_TS/VTS_03_0.IFO
INFO: Scanning dvd/VIDEO_TS/VTS_04_0.IFO


4 - Create a DVD-ready ISO image for burning
Using mkisofs, create an ISO image:
[mule@ogre ~]# mkisofs -dvd-video -o dvd.iso dvd/
I: -input-charset not specified, using utf-8 (detected in locale settings)
Unknown file type (unallocated) dvd/.. - ignoring and continuing.
0.51% done, estimate finish Mon Dec 31 20:31:57 2007
1.02% done, estimate finish Mon Dec 31 20:31:57 2007
..
99.07% done, estimate finish Mon Dec 31 20:32:50 2007
99.58% done, estimate finish Mon Dec 31 20:32:50 2007
Total translation table size: 0
Total rockridge attributes bytes: 0
Total directory bytes: 4380
Path table size(bytes): 42
Max brk space used 0
979076 extents written (1912 MB)


Here's nice tip on testing your ISO by mouting it from your filesystem:
http://gentoo-wiki.com/TIP_Mounting_Iso_Files


5 - Burn the ISO image to a DVD
Using growisofs, burn the ISO image to a DVD. Note that I used this command on a DVD RW:
[mule@ogre ~]# growisofs -dvd-compat -Z /dev/dvd=dvd.iso
Executing 'builtin_dd if=dvd.iso of=/dev/dvd obs=32k seek=0'
/dev/dvd: "Current Write Speed" is 2.0x1352KBps.
3407872/2005147648 ( 0.2%) @0.5x, remaining 39:09 RBU 100.0% UBU 6.5%
12288000/2005147648 ( 0.6%) @1.9x, remaining 18:55 RBU 100.0% UBU 100.0%
..
1992097792/2005147648 (99.3%) @2.0x, remaining 0:04 RBU 77.9% UBU 100.0%
2001076224/2005147648 (99.8%) @1.9x, remaining 0:01 RBU 24.4% UBU 100.0%
builtin_dd: 979088*2KB out @ average 1.9x1352KBps
/dev/dvd: flushing cache
/dev/dvd: writing lead-out


Appendix
Formatting a DVD RW
Using dvd+rw-format, format your DVD RW media:
[mule@ogre Desktop]# dvd+rw-format -f /dev/dvd
* BD/DVD±RW/-RAM format utility by , version 7.0.
* 4.7GB DVD-RW media in Restricted Overwrite mode detected.
* formatting 29.2/


That's it. Happy New Year!
The Mule

Sunday, March 26, 2006

Burned a DVD using Linux! Success!!

Such small things make us happy. Well, this was not a small thing, as I've been wanting to use Linux to burn a DVD of my custom videos created from Cinelerra for a loooong time. Up until now, I've copped out and just rebooted to XP to get the dirty work done. This was the first time I really sat down and muddled through the arcane commands to get a DVD burned. In fact, not only did I get a DVD-R burned, but I also figured out how to get a DVD-RW formatted and a DVD image burned to that! F'n A!!

I will work on a doc later, but here are the quick and dirty steps to burning a DVD on a Fedora Core 4 system:

REFERENCES
http://heroinewarrior.com/cinelerra/cinelerra.html#MAKING%20A%20DVD
http://dvd.chevelless230.com/
http://www.kerklied.com/adrie/presentatiedvdmakeneng.html
http://users.dslextreme.com/~craig.lawson/linux_notes/video.html#Writing_to_DVD_media
growisofs syntax

PREREQUISITES
I needed ifogen, so get the latest copy of dvdrtools found here:
http://www.arklinux.org/projects/dvdrtools

CREATE DVD-READY MPEG
[root@computer 20060319]# ffmpeg -i test.m2v -i test.wav -target dvd output.mpg

TEST DVD-READY MPEG
[root@computer 20060319]# mplayer output.mpg

MAKE THE DIRECTORY TO PUT DVD IMAGE IN
[root@computer 20060319]# mkdir -p dvd/VIDEO_TS

CREATE DVD READY FILES (VOB/BUF/IFO)
[root@computer 20060319]# ifogen output.mpg -o dvd

VIEW DIRECTORY
[root@computer 20060319]# ll dvd/VIDEO_TS/
total 34444
-rw-r--r-- 1 root root 12288 Mar 26 14:58 VTS_01_0.BUP
-rw-r--r-- 1 root root 12288 Mar 26 14:58 VTS_01_0.IFO
-rw-r--r-- 1 root root 35205120 Mar 26 14:58 VTS_01_1.VOB

CREATE TABLE OF CONTENTS
[root@computer 20060319]# ifogen -T -o dvd
INFO: dvdauthor creating table of contents
scanning dvd/VIDEO_TS/VTS_01_0.IFO

VIEW DIRECTORY
[root@computer 20060319]# ll dvd/VIDEO_TS/
total 34460
-rw-r--r-- 1 root root 6144 Mar 26 14:59 VIDEO_TS.BUP
-rw-r--r-- 1 root root 6144 Mar 26 14:59 VIDEO_TS.IFO
-rw-r--r-- 1 root root 12288 Mar 26 14:58 VTS_01_0.BUP
-rw-r--r-- 1 root root 12288 Mar 26 14:58 VTS_01_0.IFO
-rw-r--r-- 1 root root 35205120 Mar 26 14:58 VTS_01_1.VOB

CREATE THE DVD IMAGE
[root@computer 20060319]# mkisofs -dvd-video -udf -o dvd.iso dvd/

USE -scanbus SWITCH TO VERIFY DEVICE NAME
[root@computer 20060319]# dvdrecord -scanbus

THIS COMMAND DID NOT WORK WITH MY ATA NEC DRIVE LABELED 1,0,0
[root@computer 20060319]# dvdrecord -ignsize -dao -v dev=1,0,0 fs=67108864 dvd.iso

THIS COMMAND CHECKS YOUR DRIVE
[root@computer 20060319]# cdrecord -dev=ATA:1,0,0 driveropts=help -checkdrive

THIS COMMAND BURNS A DVD-R WITH THE DEVICE LABELED ATA:1,0,0
[root@computer 20060319]# dvdrecord -ignsize -dao -v dev=ATA:1,0,0 fs=67108864 dvd.iso

THIS COMMAND FORMATS A DVD-RW
[root@computer 20060319]# dvd+rw-format -f /dev/hdc

THIS COMMAND BURNS A DVD ISO IMAGE TO A REWRITEABLE DVD DISC
[root@computer 20060319]# growisofs -Z /dev/hdc=dvd.iso

Until next time..good burning to you!

5/30/07 update: Here's a great article on the many types of DVDs and how to use them in Linux:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/creating-dvds.html