HowTO: BitTorrented Anime to NTSC DVD
Sep. 11th, 2004 10:44 pmI have figured out how to burn anime DVDs, with a decent menu, under Linux. Those have always been my two bugaboos-- I could create working VOBs, and I could create menus, but the two programs that did these things didn't agree with one another.
Then I found the undocumented feature. So here's the trick.
First, have the traditional suite of video processing tools: mplayer, toolame, transcode, ffmpeg, sox. You'll want the encoder portion of mplayer, mencoder, and transcode must install mplex. You'll also need dvd rw tools and cdrecord for mkisofs.
Okay, are we ready? Good. Here are two more things you'll need: avitovob, and mkdvd. Mkdvd runs in pike, so you might need that too.
By the way, this process takes about twenty gigabytes of free disk space. Check ahead.
First, download between six to eight episodes of your favorite anime and have them ready. Also, find a nice wallpaper for your anime. You'll want it for the background for your video. It's best if the wallpaper has the name of the series on it somewhere.
Make backups of your episodes. Don't use the originals. Nothing happens to them during the processing, but I accidentally deleted four episodes of Stellvia one night because I was tired. Rename them so they read "Episode 01.avi" or "Chapter 01.avi". Something useful like that. Remember, the wallpaper should be informative.
Now, the simple part is this:
avitovob Episode*.avi
This takes about five to six hours on my 2.4GhZ athlon. Once it's done, you'll be ready for the next part: generating the menu and the DVD master. This was where I got hung up. I was trying to use mkdvd to do this, but mkdvd tried to reprocess the MPEGs again, not what I wanted. The secret is this: the generated .mpg files need to be renamed to .vob. That's it. Then mkdvd leaves them alone. I have a script that does that, taking any perl regular expression and renaming files according to it:
rn 's/\.mpg/\.vob/' Episode*.mpg
Then run mkdvd:
mkdvd --aspect=4:3 --nomenutitle -i wallpaper.png --ntsc Episode_*.vob 2> /dev/null
Note the --nomenutitle entry. That's why the wallpaper's so important. This (and fiddling with the ypos, fontsize, and fontname arguments) can lead to having very pretty and very functional wallpapers. Also note the 2> /dev/null suffix. Transcode's not very smart, and the aspect ratio flag it embeds in your produced mpegs confuses the heck out of mkdvd, throwing warnings all over the place. You want to send those warning somewhere other than your console; that'll just slow things down.
Finally, prep and burn the mastered DVD (obviously, substitute the correct device for the -Z target). If you want, you can do the mkisofs and growisofs arguments together, as documented in the man pages, but I have found that that sometimes gives me coasters. This is more reliable.
cd dvd
chown -R root:root AUDIO_TS VIDEO_TS
chmod 500 AUDIO_TS VIDEO_TS
chmod 400 VIDEO_TS/*
cd ..
mkisofs -dvd-video -o dvd.iso dvd/
growisofs -dvd-compat -Z /dev/hdg=dvd.iso
The secret to all of this was, sadly, the renaming of the episode files.
Then I found the undocumented feature. So here's the trick.
First, have the traditional suite of video processing tools: mplayer, toolame, transcode, ffmpeg, sox. You'll want the encoder portion of mplayer, mencoder, and transcode must install mplex. You'll also need dvd rw tools and cdrecord for mkisofs.
Okay, are we ready? Good. Here are two more things you'll need: avitovob, and mkdvd. Mkdvd runs in pike, so you might need that too.
By the way, this process takes about twenty gigabytes of free disk space. Check ahead.
First, download between six to eight episodes of your favorite anime and have them ready. Also, find a nice wallpaper for your anime. You'll want it for the background for your video. It's best if the wallpaper has the name of the series on it somewhere.
Make backups of your episodes. Don't use the originals. Nothing happens to them during the processing, but I accidentally deleted four episodes of Stellvia one night because I was tired. Rename them so they read "Episode 01.avi" or "Chapter 01.avi". Something useful like that. Remember, the wallpaper should be informative.
Now, the simple part is this:
avitovob Episode*.avi
This takes about five to six hours on my 2.4GhZ athlon. Once it's done, you'll be ready for the next part: generating the menu and the DVD master. This was where I got hung up. I was trying to use mkdvd to do this, but mkdvd tried to reprocess the MPEGs again, not what I wanted. The secret is this: the generated .mpg files need to be renamed to .vob. That's it. Then mkdvd leaves them alone. I have a script that does that, taking any perl regular expression and renaming files according to it:
rn 's/\.mpg/\.vob/' Episode*.mpg
Then run mkdvd:
mkdvd --aspect=4:3 --nomenutitle -i wallpaper.png --ntsc Episode_*.vob 2> /dev/null
Note the --nomenutitle entry. That's why the wallpaper's so important. This (and fiddling with the ypos, fontsize, and fontname arguments) can lead to having very pretty and very functional wallpapers. Also note the 2> /dev/null suffix. Transcode's not very smart, and the aspect ratio flag it embeds in your produced mpegs confuses the heck out of mkdvd, throwing warnings all over the place. You want to send those warning somewhere other than your console; that'll just slow things down.
Finally, prep and burn the mastered DVD (obviously, substitute the correct device for the -Z target). If you want, you can do the mkisofs and growisofs arguments together, as documented in the man pages, but I have found that that sometimes gives me coasters. This is more reliable.
cd dvd
chown -R root:root AUDIO_TS VIDEO_TS
chmod 500 AUDIO_TS VIDEO_TS
chmod 400 VIDEO_TS/*
cd ..
mkisofs -dvd-video -o dvd.iso dvd/
growisofs -dvd-compat -Z /dev/hdg=dvd.iso
The secret to all of this was, sadly, the renaming of the episode files.