[FFmpeg-devel] mpegts_write_header(), the buffering and thus reordering of audio samples.

Will Korbe wkorbe at gmail.com
Tue Nov 1 19:47:23 CET 2011


On Tue, Nov 1, 2011 at 5:26 AM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> Will Korbe <wkorbe <at> gmail.com> writes:
>
>> I see there is an efficiency built in to bundle multiple audio samples
>> into one PES packet and was wondering if someone could point out a
>> paragraph from the MPEG2 specification which indicates the reordering
>> of TS Packets this causes is okay? I have a video with many 41 byte
>> audio samples at the start, and this seems to push the first audio
>> samples 5 seconds into the output.
>
> Is this related to tickets 542 and 566?
> (ffmpeg does not see aac streams in newly created ts files if the audio stream
> starts silent.)
>
> Carl Eugen
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>

Hi Carl,

Thank you for pointing out these tickets. They seem at least somewhat
related due to my test video beginning with silence as well. In my
test case,  which is to have a player play the output directly instead
of being re-encoded, I don't see any side-effects, however, the
displaced audio could be partly to blame for the symptoms these
tickets point out. Perhaps the audio samples are held off too long
from the TS Packet Stream such that the consumer of the stream is
coded to think if it has not seen a audio sample by now, then a audio
track does not exist. Just a thought.

Thank you,
Will


More information about the ffmpeg-devel mailing list