Copying and Burning DVDs

Table of Contents (TOC)

Copying and Burning a Data DVD
Copying and Burning a Video DVD
Converting Between NTSC and PAL
Using the Tovid Program Suite
Removing Unwanted Audio
Working with mkv Files
Downloading Multiple Files from Rapidshare
Making an avi file from a DVD
A quick note on OSX dmg files

IMPORTANT NOTE

The information on this page is NOT provided in order to pirate media disks. It is intended for users to make backups for personal use, when allowed.

There are a variety of pages and tools on burning and copying DVDs. This page is being put up for my own personal use, so that I don't have to look things up each time.

I am NOT any sort of video editing expert. There are many articles, (some of them are linked here) that cover the finer points of video editing. The wonderful ffmpeg has all sorts of options that I don't begin to cover. This page is just about backing up DVDs and converting other video formats so that they can be burned to a hopefully watchable DVD.

Most of this has been done on CentOS 5.4. How it's done, package names and the like, will differ between distributions, but hopefully, the reader can adapt it to their own needs. The commands, once the various programs are installed, are usually similar, though from time to time, one will find that a distribution doesn't have a particular library.

In most cases, if one installs mplayer and/or vlc, many of the libraries will be provided as dependencies. One will usually also want dvdauthor, dvd+rw-tools, and ffmpeg. Lastly, I strongly recommend the tovid program, which makes many things much simpler.

These are various tips I've gotten from various places. One of my most frequently referenced pages is the howto-pages.org article. I give other links when I have them throughout this article.

These days, with Linux becoming more and more Windows like, many people prefer the GUI tools to do these things. Judging from various forums, however, sometimes the GUI tools don't work, and just like Windows, it can be difficult to figure out why. CLI (Command Line Interface) tools also use fewer resources, can be run in screen or tmux, and quite possibly provide greater flexibility.

Lastly, note that much of this requires several gigs of disk space.

With all that out of the way, these are methods that work for me.

If you find some glaring error, feel free to drop me a note at scottro11 [at] gmail.com, and also feel free to send your own tips, but don't be offended if they don't appear here. Note that many of the commands will require being run as root or with root privilege using sudo.

Copying and Burning a Data DVD

With a data DVD, one can use vobcopy or dvdbackup, but it's not necessary. (I've also found it not to work, for whatever reason, when backing up OS X DVDs). As my main machine has a sata DVD burner, called /dev/scd0, I'll be using that nomenclature in all examples. Change it to match your machine's listing of its DVD burner. Once you have your data DVD in the drive
cat /dev/scd0 > datadisk.iso

This will take awhile, but at the end of it, you'll have an ISO file than can be burned to a backup DVD. People also use dd if=/dev/scd0 of=datadisk.iso, but I haven't found any difference.

The iso can now be burned to a DVD with the growisofs command, part of the dvd+rw-tools. I like to check it first, to make sure that it did get what I wanted, so I usually do
mount -o loop datadisk.iso /mnt
ls /mnt

Hopefully, this will show me the various files that are on the original DVD. Once that's done, unmount. Note that the command is umount, NOT unmount, something often missed by newcomers.
umount /mnt

Remove the source DVD and replace it with a blank DVD-R (or DVD+R, if that's what you use.)
growisofs -dvd-compat -Z /dev/scd0=datadisk.iso

One can, as is covered all over the place, also make a large collection of files into an iso, then burn that. For example, to make and burn an iso of a directory called my files, assuming you're in the directory that contains the myfiles directory
growisofs -Z /dev/scd0 -R -J ./myfiles

I have sometimes run into problems with this when making isos larger than 4 GB on CentOS. I haven't had the problem with video files, only with directories containing other types of data.

CentOS, as its users know, is binary compatible with RedHat, which, aimed at the enterprise, will use older, proven stable, versions of packages. The growisofs program relies upon mkisofs. The syntax for mkisofs, (to just create an iso of the myfiles directory) is
mkisofs -J -r -o myfiles.iso ./myfiles

The ./ refers to the current directory and is probably not necessary, it's simply a habit. The -o is for the output.

Most current distributions actually use the more modern genisoimage. This has no trouble with larger files. If you run the command
mkisofs --version

on the majority of distributions, you'll see a message like
mkisofs 2.01 is not what you see here. This line is only a fake for too
clever
GUIs and other frontend applications. In fact, this program is:
genisoimage 1.1.10 (Linux)

In practice, when I do run into problems, I just put the files on either another machine or a VirtualMachine, running something with more current versions of makeisofs. As far as I know, there isn't an rpm for genisoimage for CentOS 5.x, and the one time I tried to install it on CentOS, it needed more current versions of one library or another.

If the file is larger than a DVD's 4.7 GB, one can use a double layer (DL) DVD in the same manner. I've noticed that if it's a DVD+R DL DVD there is a message, when growisofs starts to burn, about splitting layers. I don't see that with a DVD-R DL DVD, however it seems to make no difference.

TOC

Copying and Burning a Video DVD

Ok, that was an easy one. Now, let's take a more complex situation, where you have a video DVD. The steps will be to produce a directory that has the VIDEO_TS and sometimes the AUDIO_TS. (Lately, I've noticed that various DVDs only have the VIDEO_TS and the audio is included in there.)

There are two common tools for this, dvdbackup and vobcopy. I think vobcopy is supposed to be faster, but I usually use dvdbackup.

NOTE FOR CENTOS USERS
Unfortunately, there is no dvdbackup program in the CentOS repos at time of writing. (March 2010). However, rpmforge has lxdvdrip which includes dvdbackup_lxdvdrip, and it works the same way.

The problem below has either been fixed or will be fixed shortly
I'm leaving in the issue mentioned below for reference. However, I believe that Dag has already pushed the repaired lxdvdrip 1.70 and 1.76 through, so the reader should try to install via normal procedure first.

The issue was that if one tries to install the package with yum, using the rpmforge repo, (see the CentOS wiki article for information about enabling the rpmforge repo), it will fail, saying it needs dvdbackup and streamdvd.

One workaround is to find old versions of these packages (the oldest I saw were for Fedora Core 4, back when it was called Core), install them with the --nodeps option, then install lxdvdrip. The more elegant, in my opinion, option is to rebuild the spec file, removing those dependencies.

For those familiar with building rpms, I have a revised spec file (slow site, not always available) here. (On the same, somewhat unreliable site, I have my own version of the x86_64.rpm file, here.) This page is not a tutorial on rebuilding rpms. Once again, see the CentOS wiki article for information.

Assuming you know how to do this, if the link above is down, or you prefer to do it yourself, grab the src.rpm from Dag's site (current at time of writing), and install it. Then, in the spec file, you will see a line reading
Requires: dvdauthor, dvdbackup, dvd+rw-tools, mplayer, streamdvd, transcode

Change it to read
Requires: dvdauthor, dvd+rw-tools, mplayer, transcode

In other words, remove dvdbackup and streamdvd. Then rebuild it with
rpmbuild -ba lxdvdrip.spec

Then install it with rpm -ivh lxdvdrip-<version>.rpm. (For example, rpm -ivh lxdvdript-1.76-1.x86_64.rpm).

Most other distros should have a package for it. I'm not sure about Fedora, but even if it's not in the repos, there is probably a current rpm around. I suppose one could install it on Ubuntu and use alien to create an rpm, but again, that's beyond the scope of this article.

Once it's installed, one can insert a DVD into the DVD drive and run the command
dvdbackup -M -i /dev/scd0 -o backupdir

(If using CentOS, substitute "dvdbackup," with "dvdbackup_lxdvdrip".) That's assuming you've created a backup directory called backupdir. -M is mirror, -i is input and -o is output. Inside that directory, you'll find a directory containing the DVD files. There will be one parent directory with the VIDEO_TS and possibly AUDIO_TS inside. For our example, we'll assume that dvdbackup called it MYVIDEO

If using vobcopy, one first mounts the DVD.
mount /dev/scd0 /mnt 

Now run vobcopy. It seems necessary to put the -m (for mirror) before the -i (for input directory), but your mileage may vary.
vobcopy -m -i /mnt

This will create a DVD directory in your current directory. Again, we'll assume it's called MYVIDEO. (It isn't necessary to specify an output directory for vobcopy, though you can give it a title if you choose--if you don't, vobcopy calls it by the existing title, in this case, MYVIDEO.) When done, unmount the mounted dvd.

umount /mnt

Get to the directory containing MYVIDEO (your current directory if you used vobcopy, or backupdir if you used dvdbackup.)

At this point, you can use mkisofs to first create an ISO, then burn it with growisofs, or do it in one step. The two step method, again, assuming you are in the directory containing the MYVIDEO directory.
mkisofs -dvd-video -o video.iso ./MYVIDEO

If you want to give it a title, you can do that here with
mkisofs -dvd-video -o video.iso -V "MY TITLE"  ./MYVIDEO

This will produce an iso called video.iso. (Obviously, you can call it whatever you want, such as myvideo.iso). You can now check the file if you wish, using mplayer, vlc or your media player of choice. For example, with mplayer
mplayer video.iso 

Now, put a blank DVD in your dvd burner and burn it with
growisofs -Z /dev/scd0=video.iso

To do it in one step, burning directly to disk without using mkisofs to make an iso first
growisofs -Z /dev/scd0 -dvd-video ./MYVIDEO

Again you can use the -V "MY TITLE" option if desired.

If you try to play the disk immediately after burning, you might find that mplayer and vlc are unable to play it. Before you say bad words and throw out what seems to be a coaster, eject the disk and replace it. A friend of mine's version of growisofs will do this automatically, (unless one uses the option use-the-force-luke=notray), but mine doesn't. It may depend upon your system, both software and hardware, but regardless, eject the disk once before trying to play it. Once ejected, it's fine. That is, you can eject it and put it directly into a tabletop player and it will play. The tovid suite's makedvd -burn will also automatically briefly open the tray after burning.

Once again, all this works in the same way with DL DVDs for larger files. If one just wants to make a backup copy of a purchased movie, for example, you can use vobcopy or dvdbackup to copy the DVD, put in a DL DVD and run growisofs as usual.

TOC

Converting Between NTSC and PAL

Much of this was taking from an article on skrud.net.

I also used this article from idolinux.blogspot.com for the first step.

If moving from one country to another, or receiving a present from another country, it may be that your tabletop DVD player can't play PAL or NTSC dvds. As I live in the US, and have only run into being unable to play PAL, this section is geared towards converting a PAL DVD to NTSC format.

Step one is to dump the DVD to a big vob file. The idolinux article suggests using mplayer with
mplayer dvd://1 -v -dumpstream -dumpfile dump.vob

This works, but I found that the following vobcopy command would also work. First mount the DVD, then use vobcopy as follows, with the -i and -m flags where I have them. (Otherwise, you get the usual video directory, that we used above).
mount /dev/scd0 /mnt
vobcopy -i -m /mnt

Note the order of the -i and -m flags. In this case, we want one big vob file, so the command is done differently than it was above.

This should create one large file called MYVIDEO.vob (with MYVIDEO being whatever title vobcopy was able to get from the disk.)

Next, it's always good to use mplayer or other media player, to make sure it's what you want.
mplayer MYVIDEO.vob

Assuming it looks good, use the incredibly versatile ffmpeg.
ffmpeg -i MYVIDEO.vob -target ntsc-dvd -acodec copy mynewvid.mpg

Note that skrud.net's article adds in framerate and aspect. His version is
ffmpeg -i /path/to/vobfile -target ntsc-dvd -r '30000/1001' -aspect 16:9
-acodec copy outputfile.mpg

I didn't find that to be necessary, it seemed as if ffmpeg figured it out. The -acodec copy means to copy the audio from the source.

Now we have an mpg file. At this point, I use tovid, which segues nicely into the next section. (But see the section on mkv files, where I did find it necessary to include the aspect ratio.)

TOC

Using the tovid program suite

The incredibly useful tovid suite is a collection of various DVD authoring tools. Many distributions have a package for it. CentOS doesn't, but it's fairly easy to install. The link above goes to the wiki's front page, which has a link for the necessary dependencies (some of which are available as CentOS rpms), as well as the program itself with installation instructions.

Installation will be left as an exercise for the reader. It's a popular program, so help should be available on your distribution's forums. Ubuntu has a package for it. If using a distribution such as CentOS or Fedora, you may be able to use Ubuntu's alien to make a working rpm.

I'm only covering its basic use here.

Assuming you have an avi file, first encode it into an mpg.
tovid -in myfile.avi -out myfile_encoded

It will examine the file and eventually produce a file called myfile_encoded.mpg. Now, make an xml file to use.
makexml myfile_encoded.mpg -out myfile

This creates a file called myfile.xml Now you can immediately burn the dvd, or first create the structure. To create the structure in a separate step
makedvd myfile.xml

This will create a DVD directory called MYFILE. Then you can burn it with
makedvd -burn ./MYFILE

To do it in one step
makedvd -burn myfile.xml

This will make the structure, then burn it. If you have two dvd burners, then specify the device.
makedvd -device /dev/scd0 -burn myfile.xml

(This isn't always necessary--however, sometimes I've found that for some reason, CentOS will symlink /dev/dvd to /dev/scd1 rather than /dev/scd0.)

If one already has an mpg file, they can just skip the first step of tovid -in infile -out outfile. For example, in the previous section about PAL and NTSC, we created an mpg file called outputfile.mpg, using vobcopy and ffmpeg. Once that file is created, I can finish the job with tovid's makexml command.
makexml outputfile.mpg -out outputfile

Once that's done, I can use makedvd as described above.

By default, I believe tovid still uses mencoder. This can take a long time as it encodes audio and video separately. Using ffmpeg is much faster, but has to be specified.
tovid -ffmpeg -in myfile.avi -out myfile_encoded

At time of writing however, if using ffmpeg, you can't use subtitles unless they're already hardcoded into the avi file. If you want to include subtitles, don't use the ffmpeg option. Also, as the man page points out, when one does insert subtitles, they are hardcoded into the resulting mpg file, meaning you can't turn them off. I'm not covering subtitles here, see the man page.

I have seen tovid have problems with some High Definition Blu-Ray ripped mp4 files. If using ffmpeg, it takes about 10 seconds and the resulting mpg file is a 0 byte file. If not using the ffmpeg option, it will examine the file, then exit with a message about having a problem encoding the audio to ac3 format.

When that happens, once again, ffmpeg can save the day. When I have run into this situation I've been able to fix it with
ffmpeg -i myfile.mp4 -target ntsc-dvd file.mpg

From there, I was able to use makexml on the mpg file and create a reasonably good DVD.

TOC

Removing Unwanted Audio

From time to time, you may have a file with several audio tracks and not want all of them. For example, there may be a video file with a foreign language track and a track in your language. Howard Pritchett's excellent ffmpeg page covers this in detail, but I'll go over it briefly.

The video track will usually be track 0. The audio track will usually be 1, and if there's a second audio track, that will be 2. (One way to confirm which is which is to use vlc and select the audio track from its menu. Howard covers ways to do it all from command line.)

In this case, we'll say that the first audio track, 1, is in French and the second, 2, in English, and the reader only wants the file with the English track.

ffmpeg -i movie.avi -map 0:2 -target ntsc-dvd file.mpg

As usual, there are many more options that can be used. In this case, we're creating an mpg file that can be made into a DVD but will only have streams 0, the video, and 2, the English audio.

TOC

Making an avi file from a DVD

Lastly, a simple way to create an avi file from a DVD. Dump the DVD into a single vob file, as described above, either using mplayer or vobcopy. In the example, we'll use vobcopy. Then, run the vob file through ffmpeg. Several options are available. See this thread on linuxquestions.org for some examples. However, it can be done quite simply and still be watchable, although the quality may not be the best.
mount /dev/scd0 /mnt
vobcopy -i -m /mnt
ffmpeg -i MYVIDEO.vob myvideo.avi

While such simplicity might make purists gnash their teeth, it works, and is handy when, for example, one has a home made dvd from a camcorder that they wish to share with friends.

TOC

Working with mkv Files

I haven't run into mkv files too often, but they seem to be popular for blu-ray rips. As blu-ray becomes more common, I expect I'll run into them more often.

Usually, tovid and ffmpeg can deal with them normally. The my-guides site has a good article on converting to avi with VLC.

Sometimes, I have run into issues trying to simply feed an mkv to ffmpeg. However, so far at least, I've always been able to use the -target ntsc-dvd option that I mention in the tovid section, to get reasonable mpg files.

I've also been able to strip out unneeded subtitles. For that one can either use the ffmpeg option -map mentioned in the removing unwanted audio, or use the excellent mkvtoolnix suite of tools.

One of the tools in the suite is mkvmerge. To remove subtitles from the mkv, use the -S option. The syntax is (if the original is called file.mkv and you wish the new file to be called newfile.mkv
mkvmerge -S -o newfile.mkv file.mkv

Actually, in at least one mkv file, using ffmpeg -in myfile.mkv -target ntsc-dvd myfile.mpg automatically stripped out the subtitles. I'm not sure how that happened though.

If such a thing happens, and you want to keep the subtitles, one can then extract them with mkvextract. As a rule, the subtitle will be track 3 (1 and 2 usually being video and audio). You can get this information by running
mkvmerge --identify file.mkv

You will get back something similar to
File 'file.mkv': container: Matroska
Track ID 1: video (V_MPEG4/ISO/AVC)
Track ID 2: audio (A_AC3)
Track ID 3: subtitles (S_TEXT/UTF8)

The subtitles can then be extracted with mkvextract.
mkvextract tracks file.mkv 3:file.srt

Now, if you use mplayer to play the mpg that you made with ffmpeg, as long as the srt file is in the same directory, mplayer will automatically use it. Note that the srt file has to have the same name as the mpg file. So, if the file made with ffmpeg is myfile.mpg the srt file has to be named myfile.srt.

As mentioned below, the mpg file may be much smaller than the mkv file. In one case, I had the mpg file without subtitles. I didn't really need the 7 GB mkv file, but also wanted an mpg with subtitles hardcoded into it. To do that, I went back to tovid. I had myfile.mpg and myfile.srt, which I'd gotten by using mkvextract as mentioned above. To create a second mpg file with subs
tovid -subtitles myfile.srt -in myfile.mpg -out mynewfile

This created a new mpg file with the subtitles. (Note that as mentioned elsewhere in this article, one can't use ffmpeg with the -subtitles option.) The mpg was about a gig larger than the non-subtitled mpg, but still less than half the size of the of the mkv file.

One problem I have run into with that is on some widescreen files. If you run mplayer myfile.mkv and hit ctl+C shortly afterwards, it might show that the aspect ratio is something like 2.21:1 or 2.50:1. What will happen is that it will create the mpg which is fine.

From there, I used the tovid's suite makexml and then makedvd from the xml file. However, I received a series of messages like WARN: unknown mpeg2 aspect ratio 4. When I tested the dvd file, it had squashed the wide screen into a square format, complete with distortion of the picture. The way around it seems to be to use an aspect ratio of 16:9 with
ffmpeg -i myfile.mkv -target ntsc-dvd -aspect 16:9 myfile.mpg

This still seems somewhat square, but it works. I've not yet found a good solution for this problem. Some folks use padding, others use -s as in size rather than -aspect, but I've yet to find the perfect solution for that pesky 2.21:1 (or 2.40 or 2.50) aspect ratio.

A thread with several suggested solutions can be found here, but none were perfect for me.

One handy option for ffmpeg when testing this is the vframes option. If I'm testing an aspect ration, I only need a minute or so of the file. I can run something like
ffmpeg -in myfile.mkv -aspect 16:9 -vframes 2500 myfile.mpg

This way, rather than waiting for the entire file to be converted, it will only work with the first 2000 frames, taking a minute or so. I can then play the mpg file and see if I am happy with the new aspect ratio.

One should also note that the mpg file will usually be smaller than than the mkv file, so that even if one is working with a 7 GB mkv file, the result might be burnable to a standard 4.7 GB DVD. (Of course, using the tovid suite also took care of it, tovid puts all those options in for you. Although I mention the --split option of mkvmerge below, if the reason for using it is to hope to get an mpg file that will fit a normal size DVD, it may be unnecessary. For example, I've had 6.6 GB mkv file, and after running tovid on it, to turn it into an mpg, the mpg was only 1.6 GB.

As for the aforementioned mkvmerge--as it name implies, it can merge files, but it can do several other things. The general syntax is mkvmerge --[various options, such as split] -o (outfile) filename. Despite the merge in its name, it can also split files based on time or size. For example, if you had a 7 GB mkv file that you wished to split into two smaller mkvs, of about 4 GB and 3 GB, you can run
mkvmerge --split size:40000m -o output.mkv myfile.mkv

This will create 2 files output-001.mkv and output-002.mkv. The man page goes into more detail. One can also do it by time, as per the example in the man page. To split after an hour's duration
mkvmerge --split duration:00:60:00.000 -o output.mkv myfile.mkv

The format, according to the man page, must have the form of HH:MM:SS.nnn or be in seconds, e.g. --split 3600s. The man page goes into more detail, also noting that it will split right before the next key frame, so the division might not be exactly what you expected.

Another useful option might be to remove subtitles that were coded into the mkv files. As mentioned, one can do it with the -map option of ffmpeg (using another mkv tool included with the mkvtoolnix suite, called mkvinfo to get the track), but one can also run
mkvmerge  -o output.mkv -S myfile.mkv

The mkvinfo file mentioned above can also be useful (especially if you wanted to use the ffmpeg -map option previously mentioned.) Just run mkvinfo myfile.mkv to get various information about the file, including the audio and video and subtitle, if included, track.

TOC

Downloading Multiple Files from Rapidshare (With a premium account)

As those who have gotten a longterm or short term Rapidshare account know, it doesn't make it all that easy to download a series of files. Sometimes, the uploader might have split their files into several rar files. I came across this tip recently, and thought I'd share. I don't know how one can do it without a premium account. My version is exactly the same as the page I used, on my-guides.net--I'm simply repeating the instructions here to save the reader a bit of skipping around. (The my-guides.net site has many other useful articles, many of them about working with media files).

This is being used with the very kind permission of the author.

Assume that your Rapidshare username is john and your password is 1234. Make a directory in your home directory, .cookies. (Note the dot before the name, this keeps it a hidden file). Now run the command
wget --save-cookies ~/.cookies/rapidshare --post-data
"login=john&password=1234" --no-check-certificate -0 -
https://ssl.rapidshare.com/cgi-bin/premiumzone.cgi > /dev/null

That's all one line (or one can break the line with \ as is done on the original link.)

Note that that is an upper case letter o, not the numeral zero.

Next, make a shell script. (Again, this is exactly the same script that Axel gives at my-guides.)
#!/bin/bash
for url in `cat $1`
do
 wget -c --load-cookies ~/.cookies/rapidshare $url
done

Save it somewhere in your $PATH, for example, $HOME/bin, and call it downloader.sh Make it executable with chmod 755 downloader.sh

Now, if you have a list of urls, such as rapidshare.com/file1.rar rapidshare.com/file2.rar, rather than having to go to each url, make a list of all the urls and save them as a file called urls, which might read
http://rapidshare.com/file1.rar
http://rapidshare.com/file2.rar
http://rapidshare.com/file3.rar

(As we all know, the urls are much longer than that, and more of a nuisance to type.) Now, to get your batch of files just type

downloader.sh url

Again, this is taken EXACTLY from the my-guides.net and many thanks to Axel, the author, as it was just what I needed.

TOC

A quick note on OSX dmg files

There are various programs to convert OSX dmg files to iso format. I've hard partial success with Acetoneiso. I didn't find a CentOS version, but once again, just ran it in a virtual machine running something more current. I'm not going to go into great detail here, it's a GUI program that is fairly intuitive. To convert an OSX dmg file, The web page has some documentation. One point worth mentioning is that they recommend, rather than burning a dmg directly to an iso, one extracts the dmg to a directory, then makes an iso from the directory. (These are all options in the menu.) The first time one does this, there will be a message suggesting that the user downloads and installs poweriso, which doesn't have a GPL license. Click ok and it will download and extract the necessary binary.

The problem is that it only works on some dmg files. Many times, it will error out, saying it's not a proper dmg file, or something similar. Other times it works like a charm. Your mileage may vary.

As every time I've seen someone post the question about how to burn a dmg on a Linux machine on a forum, someone who doesn't know the answer asks, you shouldn't do that, why are you working with proprietary software on Linux, or something equally only relevant to those who don't use Linux for actual work, let me explain that anyone who works in an environment where both Linux and OSX are used might have a reason to do it. Perhaps the IT department only has Linux and Windows machines, with OSX reserved for customer service, and one has to distribute a properly purchased and licensed program to various users. That's just one example. Sometimes, the Mac users are doing something resource intensive--my own, non-benchmarked impression is that my Linux box uses less resources, and takes less time than using OSX's builtin burning programs. At any rate, there are various reasons it might be easier to do it on the Linux machine,

However, as mentioned, it doesn't always work. One can also try running mkisofs on a dmg, burning it to a DVD and seeing if it works. For example
mkisofs -o myimage.iso myimage.dmg

Then the usual
growisofs -dvd-compat -Z /dev/scd0=myimage.iso

Like acertone, this one doesn't always work.

The poweriso program itself, is another that sometimes works. It can be downloaded here. It's a tar.gz of the binary. Extract it with (version number may change, it's 1.3 at time of writing)
tar xvf poweriso-1.3.tar.gz

This will give you a binary file called poweriso. Move the binary to your $HOME/bin, or /usr/local/bin.
mv poweriso /usr/local/bin

To use it to convert a dmg to a burnable iso file, run
poweriso convert myfile.dmg -o myfile.iso

There are a few other options with the tool. Run poweriso -? for a list.

The easiest way, of course, if one does have a Mac, is to right click on the image and choose burn to disc, but as mentioned above, sometimes, it is simpler to create a DVD on another machine for various reasons.

TOC

As mentioned, my main reason for this article is to save myself some time. It is hoped that the reader finds at least some of it to be useful.