[Ffmpeg-devel] mpeg2 program stream with LPCM question.

Bill May wmay
Fri Jun 10 22:54:09 CEST 2005


I have a couple of question about LPCM in mpeg program stream files.  This
is for my own program stream reader in mpeg4ip, although ffplay doesn't
seem to play this particular file (made with Adobe's mpeg encoder).

1). What specification covers how to insert these files ?

2). In the file I have, I'm having trouble resolve PTS in the pes
header with actual number of samples.  The PTS doesn't seem to
correspond with the number of bytes in the PES, after removing
the 3 byte header.  I can extract, then play the PCM, but the
PTS doesn't seem to line up.

For example: first PES has PTS of 19203, is 2008 bytes after removing
the headers.  That should be 502 samples at 48000 or 941 ticks.  The
PTS of the next pes is 20253 (a difference of 1050).

When I extract the pcm data by pulling the data out (removing the 3 bytes),
it plays fine.

What am I missing ?

Thanks in advance,
Bill May

More information about the ffmpeg-devel mailing list