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

Bill May wmay
Mon Jun 13 21:47:27 CEST 2005



M?ns Rullg?rd wrote:
>>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).
> 
> 
> We'd appreciate a sample of anything that doesn't decode correctly.
> Could you please upload a few megabytes?

Uploaded to wmay_mpeg2 directory, test.mpg.

Crash report follows below:

[snip]

> The LPCM header is 7 bytes in all, including the substream id.  I
> found this description somewhere:
> 
>    id                                                     8 bit
>    number of frames                                       8 bit
>    first acces unit pointer, i.e. start of audio frame   16 bit
>    audio emphasis on-off                                  1 bit
>    audio mute on-off                                      1 bit
>    reserved                                               1 bit
>    audio frame number                                     5 bit
>    quantization word length                               2 bit
>    audio sampling frequency (48khz = 0, 96khz = 1)        2 bit
>    reserved                                               1 bit
>    number of audio channels - 1 (e.g. stereo = 1)         3 bit
>    dynamic range control (0x80 if off)                    8 bit
> 
> The PTS refers to the first start of a frame in the PES packet.  One
> frame is 150 PTS ticks in length, or 80 samples at 48kHz.  The first
> PES packet will contain a little over 6 frames, and the second packet
> will begin with the remainder of the 7th frame.  The PTS of the second
> packet refers to the start of the 8th frame, the location of which is
> specified in the LPCM header.

Thanks.  That's what I needed, exactly.  It's working now, in my code.
The crash report (on the latest ffmpeg CVS version) follows.

Bill May

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ffmpeg_crash.txt
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20050613/34fa66d3/attachment.txt>



More information about the ffmpeg-devel mailing list