[FFmpeg-user] FFmpeg crashes when AC3 audio changes from 5.1ch to 2ch with -f sox

Andrew Berg bahamutzero8825 at gmail.com
Thu Apr 7 20:37:56 CEST 2011


I'm trying to convert an AC3 audio stream to AAC and increase the volume
along the way. Unfortunately, some bits of the stream are stereo, and
when it changes, FFmpeg crashes.

This command line:
> ffmpeg.exe -i input.ts -f sox - 2>nul | sox.exe -t sox - -t wav - vol
> 1.5 2>nul > nul
gives this before it crashes:
> Seems stream 0 codec frame rate differs from container frame rate:
> 59.94 (60000/1001) -> 59.94 (60000/1001)
> Input #0, mpegts, from 'p:/input.ts':
>   Duration: 01:29:55.25, start: 0.166644, bitrate: 14187 kb/s
>   Program 1
>     Stream #0.0[0x1011]: Video: h264 (Main), yuv420p, 1920x1080 [PAR
> 1:1 DAR 16:9], 59.96 fps, 59.94 tbr, 90k tbn, 59.94 tbc
>     Stream #0.1[0x1100](eng): Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
> Incompatible sample format 's16' for codec 'pcm_s32le', auto-selecting
> format 's32'
> Output #0, sox, to 'pipe:':
>   Metadata:
>     encoder         : Lavf52.105.0
>     Stream #0.0(eng): Audio: pcm_s32le, 48000 Hz, 5.1, s32, 9216 kb/s
> Stream mapping:
>   Stream #0.1 -> #0.0
> Press [q] to stop encoding
> Input stream #0.1 frame changed from rate:48000 fmt:s16 ch:6 to
> rate:48000 fmt:s16 ch:2
It gets up to about 1241 seconds before it crashes. I've tried adding
-ac 6, but that doesn't change anything. I thought that would upmix the
audio to 6ch, but I guess it doesn't.
It doesn't crash if I change to -f wav, but the audio channels are
always mapped wrong if piped into SoX that way, and I really need to
increase the volume.


More information about the ffmpeg-user mailing list