[mythtv] [PATCH] Partial fix for mythtranscode segfault

Dooferlad dooferlad at thelongslide.com
Tue Dec 2 10:56:22 EST 2003

On Tue, Dec 02, 2003 at 06:52:10AM -0800, Geoffrey Hausheer wrote:
> Anyhow, I mightbe able to save you the trouble.  First off, are you doing
> commercial cuts before transcoding?  If so, this is causing the problem. 
> The transcoder was never designed to do what you are doing (though it
> shouldn't be too hard to support).  When converting mpeg4->mpeg4 and the
> commerical-cut code is on, it assumes you want to prune out the
> commercials without re-encoding the whole file.  So you'll end up with a
> hodge-podge of different frame types around the commercial cuts, that are
> likely to screw up your video.
> A crude hack would be to comment out line 2935 in NuppelVideoPlayer.cpp
> (the line which says 'decoder->SetRawVideoState(true);').  If that fixes
> your problem, I'll try to think of a way to control that option better. 
> Note that if you're not in 'raw' mode, it will take a long time to
> transcode the file, since it needs to reencdoe every frame.

Just thought I would doom myself and start posting :-)

Could the transcoder find the key frame previous to the commercial cut
start and the key frame following the cut end and re-encode between them?
I am no mpeg4 expert, but to my simple mind it sounds like it should
work. The rest of the video can be a direct stream copy. In fact you
could insert a keyframe at the point where the commercial cut starts
and just encode until the key frame following the commercial cut, if that
sort of thing is possible.

I think I will go back to hiding under a rock before people start
throwing things at me.

By way of introduction I have finally got around to getting a PVR350 to
put in my Shuttle box so I should have video out under Linux. I put
Mandrake on it but it failed to set up my Radion 9000 AIW correctly
for X so I will have to try another distro. I am a Debian nut at
heart so I will probably go with that unless I get told not to.

  [ http://www.thelongslide.com ]

More information about the mythtv-dev mailing list