home / blog

Converting mythtv mpg files

In order to use TV programs recorded by mythtv with a video editor such as Final Cut Pro some conversion needs to be done.

The first step is to fix the video using mythtranscode. Raw mpeg TS files recorded by mythtv will only play with mplayer/VLC but crash most other programs

  mythtranscode --mpeg2  --infile input.mpg --outfile output.mpg

However, mythtranscode appears to loose the audio stream. So run this to extract the audio from the original file

  mplayer -vo null -hardframedrop -ao pcm:file=soundtrack.wav input.mpg

Now output.mpg and soundtrack.wav can be loaded into Final Cut Pro and you can edit away. This does not deinterlace the file though and various deinterlace filters in final cut do not appear to work.

Another way possibly better way to convert the files is use nuvexport. This has the disadvantage of quality loss of re-encoding the files. It does do de-interlacing. nuvexport also seems tied into mythtv, i.e. you can’t give it arbitary mpeg files to work with as it queries the mythtv database to lookup the file.

nuvexport-xvid --transocde --deinterlace --quantisation 1  --a_bitrate 192 --v_bitrate 5000 --nice 10 --input=1001_20071025193000.mpg
This entry was posted in geek and tagged , . Bookmark the permalink.

One Response to Converting mythtv mpg files

  1. AC says:

    I wish I had found this page a few days ago :( VLC was choking on the raw mythtv mpeg2 file – which was very annoying.

    mythtranscode takes the mpeg-ts file (which VLC chokes on) and I guess transforms it into a mpeg-ps file (which VLC now plays nicely).

    mythtranscode –infile /path/to/mpeg-ts_file/weird_number_mythtv_file_name.mpg –mpeg2 –outfile /path/to/output_file/name_of_output_file.mpg

    Also, check the mythtv wiki pages. Hope somebody finds this useful. :)

Leave a Reply

Your email address will not be published.