[mythtv] Advice on adding feature to mythtranscode
lists at glidos.net
Wed Aug 10 15:25:33 UTC 2011
On 10/08/2011 15:49, Raymond Wagner wrote:
> On 8/10/2011 08:52, Paul Gardiner wrote:
>> I'm trying to add an option to mythttranscode where cutting
>> is achieved by decoding all video/audio and throwing away
>> the cut sections, rather than seeking.
> Out of curiosity, what do you achieve by performing a full decode rather
> than just parsing the structure?
It fixes two problems.
1) Some h264 transmissions don't have any completely safe start
points. They have I frames, but it is permitted to have use of
reference frames across an I frame. BBC HD is the source that
I've analysed the most. It has no regular IDRs, no recovery points
and no use of memory operations to clear the reference list.
Because of that, slight corruption can occur at the start of
a transcode and at each cut point. (If you are like me, then
you will find what I've just said hard to believe, but I've
also found seemingly knowledgeable people on forums confirming
it. Apparently decoders are supposed to work around the problem
the best they can.)
2) mythtranscode in fifo mode has a very clever synchronisation
mechanism that ensures the amount of video and audio sent to the
fifos always corresponds with the timecodes that were associated
with the data when in the source stream. The mechanism works very
well when it settles down, but can produce a momentary freeze-frame
effect on start up. That happens at the start and at each cut point.
By decoding the whole stream, the momentary freeze can be reduced
to just the start of the recording, most likely within the first cut,
and hence not seen in the transcoded output.
More information about the mythtv-dev