[FFmpeg-user] AC3 audio in mpg leads to strange results

Eric M. eric.mccormick at ymail.com
Fri Apr 20 08:47:01 CEST 2012


Hello,

I'm trying to cut a MPG file recorded from DVB-C. It contains one video and
two audio streams, one being mp2 and the other one ac3.

Everything works as expected with only the mp2 stream, but if I include the
ac3
stream, the resulting file plays without audio in VLC and there are 17 audio
tracks and 13 subtitle tracks to choose from (there should be one audio
track
and no subtitle tracks). In my input file, both audio tracks are working.

Here's the output I get:

-------------------------------------------------------------------------------
d:\ffmpeg -i in.mpg -ss 00:00:00.00 -t 00:00:05.00 -vcodec copy -acodec copy
-map 0:0 -map 0:1 out.mpg
ffmpeg version N-39877-g4fa706a Copyright (c) 2000-2012 the FFmpeg
developers
  built on Apr 16 2012 14:53:47 with gcc 4.6.3
  configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-ru
ntime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r
--enable-libass
 --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable
-libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut
--enable-libope
njpeg --enable-librtmp --enable-libschroedinger --enable-libspeex
--enable-libth
eora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-
libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid
--e
nable-zlib
  libavutil      51. 46.100 / 51. 46.100
  libavcodec     54. 14.101 / 54. 14.101
  libavformat    54.  3.100 / 54.  3.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 70.100 /  2. 70.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 11.100 /  0. 11.100
  libpostproc    52.  0.100 / 52.  0.100
[mpeg @ 01d9be80] max_analyze_duration 5000000 reached at 5016000
Input #0, mpeg, from 'in.mpg':
  Duration: 00:27:59.34, start: 1.694456, bitrate: 6522 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x576 [SAR
64:45 DA
R 16:9], 10000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, s16, 448 kb/s
    Stream #0:2[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16, 160 kb/s
Output #0, mpeg, to 'out.mpg':
  Metadata:
    encoder         : Lavf54.3.100
    Stream #0:0: Video: mpeg2video, yuv420p, 720x576 [SAR 64:45 DAR 16:9],
q=2-3
1, 10000 kb/s, 25 fps, 90k tbn, 25 tbc
    Stream #0:1: Audio: ac3, 48000 Hz, stereo, 448 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=   12 fps=0.0 q=-1.0 size=     224kB time=00:00:00.51
bitrate=3568.4kbits/
frame=  121 fps=0.0 q=-1.0 Lsize=    3768kB time=00:00:05.02
bitrate=6142.1kbits
/s
video:3475kB audio:273kB global headers:0kB muxing overhead 0.521334%
-------------------------------------------------------------------------------

Everything works fine if I save my output file as .ts or .mkv. MP4 fails
("codec frame size is not set"), but that's another problem.

Does anybody know what could be the problem?

--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/AC3-audio-in-mpg-leads-to-strange-results-tp4573018p4573018.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list