I recently took on the task of converting our old family video tapes into DVDs.
To start out, I pulled out my old tv and tape recording scripts and fixed them up a bit (and made them work again...).
tvrec is designed for recording directly from my tv tuner.
taperec is designed for reading from the composite input on my tv tuner.
Both scripts record directly to 720x480 mpeg2 video with ac3 audio.
And yes, I know it's overkill but I like it. :P
The problem I then ran into was that the recordings were simply too big to fit on DVD.
I noticed that most of the available DVD creation programs don't re-encode videos down to fit on the disc.
This led me to searching around for a way to re-encode a video down to a specified filesize.
After reading around I decided that the best option was write another script to run the calculations and re-encode the video with the (hopefully) optimal video bitrate to get the desired filesize.
Thus was born resizevid.
The main issue I ran into with this was that you can't easily determine the size of the audio stream in order to determine the video stream size to use for calculations.
My work around is to rip the audio stream out with ffmpeg in order to get an accurate size to use.
This file is then deleted at the end of the script since it is not used.
The desired filesize and the audio stream filesize are used to determine the optimal new bitrate for the encoding.
The video is then re-encoded with the new video bitrate out to a new file.
The scripts are available in
this archive.
I of course welcome any improvements.
Tracked: Sep 12, 19:57
Tracked: Sep 12, 19:59