MLUG Bash Scripting Workshop 25/04/08 | ||
---|---|---|
Prev | Index | Next |
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.
Note: It was not my intent to present web pages that were suitable for printing. This page is intended to be read off line in a browser. The command above runs off the page and you will come across other lines that do the same on the pages that follow. IMHO it is better to leave the lines intact and readible rather than truncate them at some arbitrary point just so they can fit on a single sceen (width).