As you may or may not know I’m a big fan of mythtv (www.mythtv.org). However mythtv transcodes videos in NUV (nupple video) format which is quite useless to use on anything other than mythtv. In fact mythtv seems to be the sole user of nuv format these days.
I’ve played around with mythtv for some time and I think I’ve come up with the perfect workflow of how to convert nuv to dvix avi’s. And yes, I did try nuvexport and it didn’t work very well – most of the time the video and audio was out of sync.
– Configure the mythtv transcoders to resize and convert to MPEG4 (DIVX).
– Editing the video you want to convert/export removing all commericals etc.
– Initiate a job in mythtv to transcode the video and cut the commericals out and transcode into nuv mpeg4. Now you should be left with a nuv file which is essentially a DIVX file already.
– Use nuvexport and export the video out of mythtv as a nuv files. When I do this I usually remove the video from mythtv altogether when prompted. Some people might wonder why I wouldn’t just convert the file using nuvexport. I’ve found that it’s only successful about 10% of the time and most of the time it get’s the video and audio completely out of sync.
– Run this script with the file name as the first argument.
mencoder -ni -oac mp3lame -ovc copy -vf harddup -noskip -skiplimit 0 -o test.avi "$video"
mv "$video" "$video.done"
mencoder -forceidx -oac copy -ovc copy -aspect 16:9 -o "$newvideo" test.avi
This script will re-encode the video using mencoder. You will note that I only transcode the audio and not the video – this is just copied. I found that this produced a avi file that couldn’t be fast forward. Therefore I quickly run mencoder over the file again and force the index to be rewritten. This seems to fix the problem and the avi is seekable again.
That’s it. You should now have a proper DIVX AVI file that you can use just about anywhere where dvix is supported.