[mythtv] MPEG/other audio timecode problem

Mark Spieth mark at dclabs.com.au
Mon Feb 7 00:35:51 UTC 2005


Ive finally diagnosed the audio timecode issue.
Its a wrap around problem I see with DVB
the max dvb pts/dts is 2^33 ~= 8.5E9
this is rescaled by 1000000/90000 to get the timestamp in us
this number is them ~95E9
convert to ms and get 95E6 which is what Im seeing as the timestamp wrap
point.
Got a good example of this in a recording on sunday. DVB PS and first time
not transcoded. transcoding introduces another effect. at least raw mpeg ps
or ts recovers after about 1.5 seconds, though avg calc will be seriously
askew by this time.

what I would like to do is to generate an offset in av_read_frame_internal
when the first timecode is generated so that the offset will lie within
2^33*0.25 and 2^33*0.75 just in case it gets init in the middle if the play
starts in the middle.
how would this affect non mpeg timestamps? i.e in ffm.c. not sure what the
rescale values used in this mode yet. hints?
also seeking to timestamps will be an issue.
perhaps retimestamping on record so that the wrap point is not attained.
I see this affecting everyone at some point

opinions/comments/solutions/gotchas welcome before I start unless someone
has a good solution already.

cheers
mark



More information about the mythtv-dev mailing list