Southern California Glider Landout Database
5-Inch Sky Robot
FDM in Vacuum
Custom Discovery Roof Rack
August, 2012 - Sierra Backpacking
July 22nd, 2012 - Hiking in Santa Barbara
July 15th, 2012 - Valley of Fire
May 5th, 2012 - Afton Canyon
April 28th, 2012 - Devils Playground
Convict Creek Trail
January 2012 - Mustangs
January 3rd, 2012 - Heart Lake
August 7th, 2011 - Kelso Dunes
August 5th, 2011 - Lundy Canyon Hike
August 2011, Mammoth Archery
Birds in the garden
June 4th, 2011 - San Gorgonio
May 29th, 2011 - Sequoia National Forest
April 23rd, 2011 - Living Desert
April 2nd, 2011 - Death Valley
March 8th, 2011 - Mountain Palm Springs
February 13th, 2011 - Iron Smelt
November 13th, 2010 - Mojave
October, 2010 - Mammoth
September, 2010 - Mammoth
September, 2010 - Duck Lake Trail Backpacking
Iron bloom forging
August 28th, 2010 - Mt. San Jacinto
OSM Import: US Designated Wilderness
July 25th, 2010 - Mojave Mustangs
July 17th, 2010 - Mojave Exploration
Bloomery furnace iron smelting
Open Street Map: Mojave Project
June 13th, 2010 - Mojave
June 6th, 2010 - El Cajon Trails
Wolf Mountain Sanctuary
March 28th, 2010 - Salton Sea
March 21st, 2010 - South Main Divide
March 13th, 2010 - Anza Borrego Wildflowers
March 7th, 2010 - CSULB Japanese Garden
February 2010 - Mammoth
Dakota and Asha Celebrate Christmas, 2009
November 21st, 2009 - Mojave Road
November 14th, 2009 - Anza Borrego
Exploring The East Mojave: The Afton Canyon Area
Broken flex plate
Remote Image Serving
Astro/night photography in Inyo National Forest
Wild Mustang Sightings
September 26th, 2009 - Night Photography In Frazier Park
August 15th, 2009 - Catalina dive trip
January 24th, 2009 - Mojave Exploration
July 2008 Mammoth Vacation
President Barack Obama!
April 12th, 2008 - Wildflowers and Landmarks
My Grandfather's Alfa Romeo Spider
March 8th, 2008 - Carrizo Plain
Bridge To Nowhere
October 20th, 2007 - Big Bear Camping
October 22nd, 2007 - Fire
Scottish Highlands, Aug 7th, 2006
Scottish Highlands, Aug 6th, 2006
August 5th, 2007 - Duck Lake Trail
May 26th, 2007 - Kelso Dunes
Culloden Battlefield, Aug 5th, 2006
May 20th, 2006 - Irwindale Renaissance Faire
Edinburgh, Aug 4th, 2006
The Clifs of Moher, Aug 3rd, 2006
The Burren, Aug 2nd, 2006
Bunratty Castle, Aug 1st, 2006
May 5th, 2007 - Mojave
Truck Audio/Data Network
2007 - Master Bath Remodel
The Ring of Kerry, Jul 31st, 2006
Victory in 2006!
Blarney and Killarney, Jul 30th, 2006
Dublin and Cork, Jul 29th, 2006
Dublin, Jul 27th & 28th, 2006
What Can I Do?
April 30th, 2006 - Anza Borrego
New desktop: Intel 805 D
Jan 7th and 14th, 2006 - Hiking
Whiting Ranch Hiking
Digital Photography with Linux
September 5th, 2005 - Living Desert
August 19th, 2005 - Mammoth
Hiking and Photography
July 30th, 2005 - Tucker Wildlife Sanctuary
Death, Fright and Photography
May 14th, 2005 - Red Rock
April 2nd, 2005 - Death Valley
Count Every Vote Act of 2005
Linear Logic ScanGuage
November 6, 2004 - Mojave
Super Tuesday, 2004
Canon A80 Camera
Jul 25, 2004 - Death Valley
May 4th, 2004
Landscaping - My Front Slope
Stump Pullin' Yeeee Haw!
Feb 22nd, 2004
Feb 16th, 2004
PostgreSQL Logfile Analysis
Mountains? Desert? Jan 30th, 2004
Jan 28th, 2004
Ceiling Cargo Basket
Front Bumper Version 2
Land Rover Valve Jobs
The Matrix: Revolutions
Greg Davis CDL Linkage
Mom's Turkey Gravy
Julian Pie Company
The KB1DIG 2-meter Halo Antenna
Gardening is hard!
Aug 13th, 2003
SQL and Perl
Jul 9th, 2003
Jun 17th, 2003
Some People's Comments
Dakota is a silly dog
The Matrix: Reloaded
Chris' Stage Bottle Harness
April 23rd, 2003
DVD Burning Under Linux
My Satellite Phone
My Near-Death Experience
Laser Cannon Revival
Front Bumper, Version 2
KPC 3 Plus and HTX-252
Moving, moving moving...
New new house
In Truck Dr. Pepper
My Favorite Toilet
Late Thoughts: Dr. Pepper Cooler
265/75-R16 Tires on a DII
George W. Bush
Horses Sep 14 2002
August 17th Yukon Dives
My Custom Front Bumper
Bracketless, Renamable Links
Jul 28 2002 Day Trip
Jedi Group, my T1 and money
A Bumperless Discovery!
My Custom Rear Bumper
Vanessa's 24th Birthday
Jun 30th Dive to Long Beach Canyon
PHP/PostgreSQL String Quoting
Tonsillectomy, Uvulaectomy and Turbinite Reduction
240 Watt CO2 Laser Cannon
The Tulsa Rib Company
The quality of hard disks these days
Email notification of articles
Email notification of comments
erikburrows.com source code
Renisance Faire Jun 9, 2002
Computers hate me, and it is mutual.
Star Wars Sucks!
Horses, Jun 1, 2002
Land Rover Mileage
Insomnia, Robin goes evil.
100 Watt Diode Laser Test Firing 1
2001: A Space Odyssey
TDI Deco Class
Horses, Apr 30, 2002
My Truck Batteries
The Zope Bible
100 Watt Diode Laser
The New www.erikburrows.com
Hunter the Kitty
Matts Desert Pics
|DVD Burning Under Linux -   2003/02/28||Viewed 190 times this month, last update: 2008/12/09|
In ages past, Linux DVD burning was painful. We used scary command-line tools, built up menu files by hand, and converted video formats from memory!
These days, not everyone, but smart people forgo all that WORK, and let MythTV do everything for us. MythTV will burn DVDs from recorded TV files, and nearly any video file format you can think of. I use MythTV for burning DVDs now, but years ago I did do all the manual work, which you can read about below, if you REALLY, REALLY want to...
Burning DVD video disks from files captured from T.V. under Linux has been my dream for a long time. Until recently DVD-R drives have been too expensive to be realistically useful. Now that a good drive can be had for less than $300, I made the jump. It was a long and difficult trip, but I finally got everything working. Now I'll never loose an episode of Junkyard Wars, Full Metal Challenge, or Duckman again.
I have developed three shell scripts to help me create DVD video disks:
capture_video.sh: Grabs video from a Video For Linux (v4l) device, and puts it into an MJPEG AVI file.
process_video.sh: Converts the AVI output of capture_video.sh into DVD compatable MPEG.
create_dvd.sh: Burns a DVD+RW disk from a list of MPEG files.
In order to use these scripts, you will need a DVD+RW drive, configured under linux as a SCSI emulated IDE device as /dev/cdrom and the following list of software:
You'll need to do a lot of work to get this working, as configuring the DVD drive is involved, as is configuring of a capture card and XawTV, but it's worth it! Please use these scripts as much as you like. Send me any improvements you make, and happy DVD burning!
If you like, you can read the log of my harrowing journey into this project:
Yesterday I got a nifty new DVD+R/RW IDE drive. I've had my trusty SCSI Yamaha CDR drive for a couple of years, and loved it. A friend of mine got a DVD burner, and is having fun with it, so I was inspired. I went out to microcenter and picked up the only name-brand DVD burner drive they had, which was the Verbatim DVD+ Producer, and some Verbatim DVD+R disks.
First of all, I didn't know there was such a thing as DVD+. It seems that the + type is a new veriety, wince cdrecordProDVD explicitly does not support it! So, just before I turned around to return the drive to Microcenter (who is great with returns BTW) I found the DVD+RW/R tools for Linux.
It took me about 20 minutes to get the DVD+RW/R toolset installed, and burned by first DVD data disk. An hour later, I had my first single-disk full system backup of my server. Very nice.
The first burn was good, but that was on the DVD+RW disk that came with the drive. For some reason I was not able to use the Verbatim DVD+R disks I bought. Oh well, the DVD+RW disk is good for 100 rewrites. So I'll just play with it for a while.
Now, with the sucessful backup under my belt, I dicided to try to tackle DVD video disks. I've got some MPEG files laying around (mostly The Matrix) so I downloaded all the tools I thought I would need. It took about 2 hours just to find them, another hour to get everything compiled, and then 2-3 hours of fighting with dvdauthor before I gave up for the night.
This morning I dicided that my problem with the DVD+R disks might be that the DVD+RW/R toolset was accessing the drive via IDE, not the IDE-SCSI emulation layer. It took me about an hour of reboots to get that working, but I still couldn't use the DVD+R disks. One last thing... What if I turn the write speed down? I set it to 1x (from the default 2.4x) and it worked just fine. Ugh! Now... Back to video disks. Maybe the DVD player will like DVD+R disks better than the rewritable ones.
I don't know what a VOBU is, but dvdauthor dicided my MPEG files (re-formated with mplex -f 8) didn't have any. But, for some reason, when I mplexed the matrix "Kung Fu" scene with track 1 of The Matrix soundtrack, dvdauthor dicided the file now had some VOBU's. But, of course, my Sony DVD player didn't like the disk. So it's off to more researching I go...
HA! I got the dvd authoring software to work well enough to create a CD (not DVD) that will play The Matrix Kung-Fu scene with background music on my laptop's DVD player software. The Sony DVD player doesn't want to read the CD, and the laptop doesn't want to read the DVD+R, but this is one baby step toward the goal!
Ok, for a failure to compliment some of the above sucesses: I cannot create a DVD disk that is readable in any way on my laptop's DVD/CD drive. I've tried four combinations of DVD+R and DVD+RW of different brands. All work in my burner, once I turn the speed down, but none are readable by the laptop.
OK! More sucesses!
1. I can get my laptop to read my DVD+R disks if I use the DVD+RW/R tool's dvd+rw-booktype program to make it think the DVD+R disk is a DVD-ROM. Yeay!
2. If I burn my "Kung Fu" scene onto a DVD+R and set it's booktype to DVD-ROM, then the DVD player program on my laptop plays it! This just might mean I can make DVDs! Unfortunately, my Sony DVD player doesn't like the same disk my laptop does, but then it doesn't like some CD-Rs either. Maybe it's just picky. I'm thinking about taking my DVD+R "Kung Fu" disk down to the "Good Guys" and trying it out on their vast array of players.
3. I've figured out some of Linux's oddities in handling files > 2GB. The kernel and filesystem work just fine with big files, but tcsh doesn't like piping that much data. So, for instance:
tar cf - / | gzip -c - > file.tgz Doesn't work but...
tar cf file.tar /; gzip file.tar Does work!
Armed with this knowledge, I can make DVD+R backups of my computers without having to do wierd NFS trickery. I just make one big tar file, scp it over, split it up (iso9660 FS doesn't like big files either) and burn it. Cool!
Well, no matter how hard I tried, I could not get my three year-old Sony DVD player to play my DVD+RW video disks. So, last night I went out and bought a new Sony DVD player that said it is DVD-R/DVD-RW/DVD+R/DVD+RW compatable. $113.
Bang! Right out of the gate it worked. Video with sound, and the sound was in sync!
There are a few problems though:
1. It seems a bit unstable. When using multiple chapters, sometimes the player gives up.
2. The video qualtity is pretty poor, especially in action sequences.
3. The audio pitch is off! Everyone sounds like girls!
Yes! Fixed the audio problem! The pitch is back to normal. The problem was the audio compression program's sampling rate. I have been following the wonderful HOWTO from the Linux Gazette, but the options to mp2enc were for Video-CDs. For DVD encoding, the -A flag should not be used, but manually specify the sample rate and bit rate by using: mp2enc -r 48000 -b 384
Zang! Pass mpeg2enc the -b 3800 and -q 1 and the video 'jumpyness' goes away alltogether!
Looking more closely, with video captured from TV, there is still some 'jumpyness' to the video. It took me a while to track it down, but I have figured out that the 'queued frame twice' warning messages from streamer really mean 'dropped frame'. Streamer captures and compresses to mjpeg on the fly, and so uses a ton of CPU, but I guess even my 1.3Ghz CPU isn't up to the task. If I turn down the JPEG compression level, it stops loosing frames, and the jumpyness goes away entirely. However, I don't want to have to record with that crappy compression. I wonder how far my motherboard will go...
Matt Bell (2003-03-02): Sony players are like that on purpose.. I finally gave mine to my folks because I couldn't play anything but store bought disks in it. It would ignore everything else. Sony makes nice equipment, but their parinoia about pirating sucks.
Erik (2003-03-02): I didn't know that! So what's a good vendor? Phillips? No-name?
Jason (2003-04-28): Hey Erik- Capturing video to a drive with information on it will always result in dropped frames. The only way to avoid it is to capture to a blank drive, entirely zero'd out. After every capture and transfer to DVD, the capture drive should be wiped before the next capture. A faster HD, 10,000 RPM or more is best. Are you capturing full frame or smaller?
I have also found that DVD-R's can vary by computer. Some DVD-R's burned on one drive by one manufacturer will not always play on another drive by another manufacturer.
Erik (2003-04-28): Actually, my research has been that, at least in my application, the process is CPU-bound. My disk is really not taxed at all. This is due to the mjpeg capture format, which compresses each frame in real-time.
I have experimented with capturing to a raw format, which does greatly reduce the CPU utlization, but then disk bandwidth becomes the limiting factor. It's nearly there, so I'm looking at a $100 CPU upgrade to a 2.0Ghz CPU.
I too have seen wierd incompatabilities with DVD+R/RW media, but using the DVD booktype set to DVD-ROM, everything behaves.
Mark (2003-07-20): If you've got the space on your drives to capture and want the best quality, I suggest capturing from your capture device through the huffyuv codec - completely lossless compression, so that your captured file is not as big as raw video, but looks just as good. Once you've got that file, then pass it through your mpeg encoding software - your result should be flawless video.
I also don't agree with Jason's comment regarding the requirement of a zeroed drive to not drop frames - I had to play with my system a bit to get it quit dropping frames, but now I can capture for hours on a 7200 rpm IDE drive with a negligible frame drop percentage (less than 10 frames per hour).
I do all of this with my 1.3ghz athlon, so if you haven't purchased that CPU upgrade yet, I'd say that you don't need to to get flawless video - just some more tweaking, and perhaps incorporation of huffyuv to your capturing, and you should be set.
Erik (2003-07-20): Thanks Mark, I'll give that a shot!
Mark (2003-07-21): I need to ammend my previous comments regarding huffyuv - as I have just begun using video software under linux, and had previously only had windows experience when it comes to video editing, I didn't realize that huffyuf is a windows codec - the source is available all over the place, but it's probably designed to interface with video4windows - some changes probably need to be made to make it work under linux.
In the mean time I'm going to see if I can find another lossless codec to use in linux, and I'll update here if I find anything.
Erik (2003-07-21): I looked too, and could not find any huffyuf codec for Linux. You did give me an idea though: Maybe I can stream raw video to a normal data compressor like gzip on a very low compression setting, to find that sweet spot between CPU and disk saturation. I just havn't had time to try yet...
Mark (2003-07-21): Oops - while adding these comments I apparently ran into a limitation in your script/mysql setup, and couldn't post the whole thing at once - I'm gonna split it in two posts.
Ok, so I found out that huffyuv is included with ffmpeg, and I got ffmpeg working. However, I'm not comfortable with direct conversion from huffyuv to mpeg2 yet, so I'm going from huffyuv, to mjpeg, and then using your scripts to take it from mjpeg to dvd. Unfortunately I haven't been able to test the final product as I can't get my burner to write to these dvd-rw's I've got sitting here... I don't wanna use up dvd-r's or dvd+r's until I get a working +/- rw out. So, I'm working on that presently, but in the mean time, here's the shell script I'm using to capture a file and make it mjpeg. (See next post)
Mark (2003-07-21): #!/bin/bash
/usr/bin/ffmpeg -strict -1 -s 320x240 -r 30 -ar 48000 -ab 384 -ac 2 -vd /dev/video0 -vcodec huffyuv -acodec pcm_s16le -hq $1-tmp.avi
/usr/bin/ffmpeg -strict -1 -i $1-tmp.avi -s 320x240 -r 30 -b 3800 -ar 48000 -ab 384 -ac 2 -vd /dev/video0 -vcodec mjpeg -acodec pcm_s16le -hq $1.avi
#rm -f $1-tmp.avi
Note that I'm only using 320x240 because I'm getting a lot of dropped frames if I go up to 720x480. I'm getting complaints when I run the mpeg2enc about incorrect height, so I'm gonna have to play with the resolution, and also see if I can capture at a higher resolution. That's it for now!
Erik (2003-07-22): Mark, I'm having some luck with:
ffmpeg -vcodec huffyuv -acodec ac3 -strict -1 -s 720x480 -r 30 -ar 48000 -ab 384 -ac 2 -t $1 out.avi
to capture the video, and compress it a little, then process it with:
ffmpeg -i out.avi -b 6000 -vcodec mpeg1video -f rawvideo out.mpeg
ffmpeg -i out.avi -ar 48000 -ab 384 -acodec mp2 out.mp2
mplex -f 8 out.mp2 out.mpeg -o movie.mpeg
The resulting mpeg will burn onto a DVD and play in my Sony, but I'm still not happy with the quality. No dropped frames though!
foobardude (2003-09-23): Great article! Just wanted to say, XCDroast now supports DVD+R/+RW as well with the use of cdrecordProDVD. So as long as you make a DVD image file, you'll be fine with DVD+R/+RW.
(2005-04-04): Most of the popular new PVR cards sold for Windows XP MC, known as "Blackbird", haven't hard drivers to use with Linux/Myth.
We have been working on these drivers and released an alpha version at http://plutohome.com. Pluto even has a self-booting kick-start CD that will automatically install & configure everything for you, including a ready-to-go Myth system. It's the fastest and easiest way to get a MythTV PVR up and running, and also installs Xine, Asterisk and our own software to give you the most advanced media & entertainment, home automation, security, telecom & computing system, controllable with your Symbian Bluetooth mobile phone, as well as PDA's and Webpads.
We're working hard to harden the drivers as quickly as possible and would like as much feedback as possible. These 2nd generation cards are lower in price and offer better picture quality than the current models supported in IVTV, so be sure to check them out. A list of all the compatible cards, known as "Blackbird" cards, is found on our website.
visit: plutohome.com, click 'support', 'support site', and choose "CX88 Blackbird Drivers" from the projects menu
mac11 (2006-02-02): i have used winavi to convert my avi file to dvd files but when i burn it to a dvd+R or a dvd-R it doesnt work on my dvd player but it works in my computer and my playstation2 does anybody knows the problem.....
Erik (2006-02-03): Mac11, my understanding is that that is a pretty common problem, and due to the DVD player just not being sensitive enough to read the CD-R disks. Newer DVD players seem be better, and some even explicitly list compatability with certain types of media.
emac (2008-01-08): Sometimes I try other burning way, like handbrake, This software allows you to burn to remote CD and DVD burners over a network.
taco (2008-01-29): getting a 404 on your create_dvd.sh script
Paul George (2008-04-26): On Windows you can use lots of dvd burnesrs but on Linux there aren't many choices. This article is great but I couldn't make it work with DVD-R drives. Anybody knows why?
Rpn (2008-07-11): Indeed DVD+ and DVD- are different types of formats. Historically Home DVD players used the DVD-R format.
If you wish to burn the most widely acceptable format use DVD-R's. DVD+R is newer and better but isn't compatible with home players over 2-3 years old. OTOH, PC DVD players will play almost anything including DVDRW.
But save yourself some time and trouble. Buy a $100 new home DVD player with DivX, mpeg and avi capability. This way you can burn the avi straight to the DVD AS DATA without authoring it (IOW the DVD-Video format is not necessary) and watch the movie.
This has a number of advantages the most obvious of which is saving time. Secondarily a ripped movie avi of is typically 700MB-1.3GB in size so you can put 4-6 movies on one DVD. One disadvantage at this time is you typically get Dolby 2.0 surround - Whether this is acceptable depends on what type of Home Theater sound system you have.
These new Divx capable home players can be had for as cheap as $40. The better ones cost a little more.
Lastly, some of the problems I see here are no doubt caused by using crappy media. It is getting very difficult to get decent media. The various vendors change suppliers often so you go and buy 100 Maxell blanks because the last ones you had were good and then you discover you bought junk like Ritek. Once you locate good blanks STOCK UP!
Lauren (2015-01-22): Due to command line interface, Linux is note ones best choice. One can use it who knows its commands well. Hope so your information will help me to burn DVD in Linux.more technical details
See also: MythTV