another really really simple script
Quote:
Originally Posted by je_fro
Cool deal!
I never understood why you split the movie, only to rejoin it later...
Take a look here at a couple of mencoder scripts you might find useful to get around that, unless there's a reason that I don't know about...
http://jeffrey.homelinux.org/RRweb/files/mencoder.html
[EDIT] Oh, I get it...because it's an avi!!! [/EDIT]
Okay, I know that most of you already know how to do this but this post is aimed at the newbie:
I wrote (well, "assembled" is probably a better word) a script that combines almost all of these steps into one. I skipped the surround sound steps. None of the avi files that I was using had it, and my TV can't play them anyway.
so here's the script. Obviously, all I've done is save myself a lot of time by copying the commands to a text editor, and seperating them with semicolons so that they'll run in sequence. It ain't rocket science.
Quote:
transcode -i movie.avi -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o movie -D0 -s2 -m movie.ac3 -J modfps=clonetype=3 --export_fps 29.97 ; mplex -f 8 -o dvd_movie.mpg movie.m2v movie.ac3 ; dvdauthor -x dvdauthor.xml ;
Of course, I run the script in a directory that contains:
1. The avi file, which I have renamed "movie.avi"
2. the dvdauthor.xml file:
Quote:
<dvdauthor dest="DVD">
<vmgm />
<titleset>
<titles>
<pgc>
<vob file="dvd_movie.mpg" chapters="0,15:00,30:00,45:00,1:00:00"/>
</pgc>
</titles>
</titleset>
</dvdauthor>
3. An empty directory entitled "DVD"
4. The script itself.
and after the script has finished running, All that's left is to burn the actual DVD. I put the disk in the drive, and run:
Quote:
growisofs -Z /dev/dvd -dvd-video DVD/
I could certainly have added the final command to the script, thus automating the whole process from beginning to end, but I would have to keep a blank DVD in the drive while the script was running.
Now, I don't understand how this business of splitting and reassembling a file is exclusive to AVIs, but I have discovered that the exact same technique works fine for MPG files. For all I know, mpg files don't require this kind of splitting and reassembling, and there may be a simpler way to do it, but the following script works fine:
Quote:
transcode -i movie.mpg -y ffmpeg --export_prof dvd-ntsc --export_asr 3 -o movie -D0 -s2 -m movie.ac3 -J modfps=clonetype=3 --export_fps 29.97 ; mplex -f 8 -o dvd_movie.mpg movie.m2v movie.ac3 ; dvdauthor -x dvdauthor.xml ;
To the Newbie, this is a big reason why Linux rocks at the command line. You take a sequence of commands, put them in a text file in order, seperate them with semicolons and spaces, save the file, and that's called a shell script. There are more sophisticated approaches to shell scripting, but frankly, I haven't learned them yet. What little I know is this: any command can be a shell script, and a sequence of individual commands separated by semicolons is called a compound command. That's all I've needed to know to automate scads of processes, saving me hours and hours of repetetive drudgery. Scripts, of course, can be saved, reused, and redited for different circumstances. I keep most of my scripts online in the "notepad" of my yahoo mail account, so I can always find them and access them from any online Linux system I happen to be running.
The name of my script is avi2dvd, and this is how I run it. I run the command
chmod a+x avi2dvd
just once, to make the script executable, and from then on, all I have to do is type the command:
./avi2dvd
From a directory that contains the four items listed above.