MLUG Bash Scripting Workshop 25/04/08
Prev Index Next

Problem: a big long command:

We have a couple DVB-T cards we use for watching and saving digital TV broadcasts. I use dvbstream for locking onto digital signals and either saving the broadcast to disk or streaming the show on our lan.

Dvbstream saves to disk in a very basic program stream (mpeg-ps) format. If I want to burn that program as a DVD, I prefer to first encode it into something a little more suitable with the following command:


mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=720:576,harddup -srate 48000 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=15:acodec=ac3:abitrate=192:aspect=16/9 -ofps 25 [input.mpg] -o [output.mpg] 

Scroll to the right a little if you want to see just how long this command is :^)

Remember I told you about me not being a good typist and also being lazy? This is the time if ever there was one for me to put together a script.

You might be thinking, "Wait! I'm sure someone has written a GUI program that will do that!".

Well you might be right, but there are a couple other very good reasons for me to script this command.


Top