[mythtv] transcoding to lower bitrates

Daniel Manjarres danmanj at gmail.com
Sat Oct 2 18:37:40 UTC 2004

Hi guys, thanks for mythtv, I love it. In fact there's the problem: I
love it so much that I've got 604 GB of TV shows saved in mpeg4 format
and I'm running out of space. I want to use the built-in transcoder to
re-encode the older files that I don't watch so much at a lower
bitrate. The problem is that the test  around line 352 in

if (vidsetting == encodingType && !framecontrol &&
        fifodir == NULL && honorCutList)
        copyvideo = true;
        VERBOSE(VB_GENERAL, "Reencoding video in 'raw' mode");

will set the transcoder to copy the video data even though the bitrate
in the transcoding profile is lower than  the video was originally
recorded at (the profile used in recording has never been saved, so it
can't know that it should re-encode). After several hours of looking
through the code I have come to the conclussion that the only way to
cleanly support this type of transcoding is to add a flag to the
transcode profile to the effect of "force reencoding  with these
settings" that mythtranscode could check around line 352.
Unfortunatley I don't have the ability to make all the changes this
would require, such as changing the datvbase schema, setting up a
checkbox in the gui, in addition to writing it all into the c++ code.
So I have just hacked it up on my system by replacing the
mythtranscode binary with a shell script that drops the "-l"
(honorCutList) option so the test at line 352 always fails, and I can
get it to encode with the lower bitrate just fine.

I was wondering what you guys thought of this solution, and if anybody
with more time than me would be interested in adding it to the code.
My hack works fine for me since I only transcode to drop the bitrate
of mpeg4, never to cut out commercials, but other people might not be
able to use my hack.

Thanks, guys

Dan Manjarres

More information about the mythtv-dev mailing list