[Ffmpeg-devel] mpeg2 muxer: lpcm issue

Chris chris
Fri Jul 21 11:42:20 CEST 2006


Hi,

I have found a strange issue with the mpeg muxer.

I have an mpeg 2 program stream which contains a LPCM audio track (stream id
0xa0). All I want to do is to remux it. When I choose any of the formats so
that s->is_mpeg2 (in mpeg.c) is true (i.e svcd, dvd or vob) the resultant
mpeg plays its audio as white noise in WMP and any media player that I have
tried. When I just use the mpg format (i.e s->is_mpeg2 is false) the audio
plays fine but clearly it is muxed as an mpeg 1 program stream.

This is happening on all my mpegs with LPCM audio tracks. An example of one
is at: ftp://ftp.mplayerhq.hu/MPlayer/incoming/mpeg2_mux_lpcm_issue

Additional points:

- The source mpeg plays fine.
- I have demuxed the input & output streams and done a binary compare - they
are identical. This suggests that the headers in the PS are maybe causing
the issue.

Thanks,

Chris


Here are my command lines:

MPEG 1 Format example:

ffmpeg.exe  -y -i output-RAW.mpg -vcodec copy -acodec copy output.mpg
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:  --enable-a52 --enable-gpl --enable-memalign-hack
--disable-debug
  libavutil version: 49.0.0
  libavcodec version: 51.10.0
  libavformat version: 50.5.0
  built on Jul 21 2006 10:05:00, gcc: 3.4.4 (mingw special)
Input #0, mpeg, from 'output-RAW.mpg':
  Duration: 00:01:45.9, start: 0.233567, bitrate: 6204 kb/s
  Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480, 8264 kb/s, 29.97
fps(r)
  Stream #0.1[0xa0]: Audio: pcm_s16be, 48000 Hz, stereo, 1536 kb/s
Output #0, mpeg, to 'output.mpg':
  Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 8264 kb/s, 29.97
fps(c)
  Stream #0.1: Audio: pcm_s16be, 48000 Hz, stereo, 1536 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
frame= 3180 q=0.0 Lsize=   79060kB time=105.9 bitrate=6113.8kbits/s
video:58656kB audio:19862kB global headers:0kB muxing overhead 0.689891%

MPEG 2 Format example:

ffmpeg.exe"  -y -i output-RAW.mpg -vcodec copy -acodec copy output.vob
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:  --enable-a52 --enable-gpl --enable-memalign-hack
--disable-debug
  libavutil version: 49.0.0
  libavcodec version: 51.10.0
  libavformat version: 50.5.0
  built on Jul 21 2006 10:05:00, gcc: 3.4.4 (mingw special)
Input #0, mpeg, from 'output-RAW.mpg':
  Duration: 00:01:45.9, start: 0.233567, bitrate: 6204 kb/s
  Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 720x480, 8264 kb/s, 29.97
fps(r)
  Stream #0.1[0xa0]: Audio: pcm_s16be, 48000 Hz, stereo, 1536 kb/s
Output #0, vob, to 'output.vob':
  Stream #0.0: Video: mpeg2video, yuv420p, 720x480, q=2-31, 8264 kb/s, 29.97
fps(c)
  Stream #0.1: Audio: pcm_s16be, 48000 Hz, stereo, 1536 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
frame= 3180 q=0.0 Lsize=   79602kB time=105.9 bitrate=6155.7kbits/s
video:58656kB audio:19862kB global headers:0kB muxing overhead 1.380175%


ftp://ftp.mplayerhq.hu/MPlayer/incoming/mpeg2_mux_lpcm_issue






More information about the ffmpeg-devel mailing list