[FFmpeg-user] Can not resample 6 channels @ 48000 Hz to 6 channels @ 48000

Mike Scheutzow mjs973 at optonline.net
Sun Mar 27 16:52:49 CEST 2011


Bernd Butscheidt wrote:
> Hello,
>
> using the given ffmpeg of my gentoo-pc, this works fine:
>
> ===============================================
> /usr/bin/ffmpeg -ac 6 -r 50 -deinterlace -i Tatort_test.ts -vcodec libx264 -vpre 
> fast -maxrate 40000k -bufsize 30000k -crf 12 -wpredp 1 -bf 3 -b_strategy 1 
> -vlevel 41 -g 24 -flags2 -bpyramid -slices 4 -subq 1 -refs 1 -flags2 +aud 
> -flags2 +dct8x8 -trellis 2 -me_method hex -coder 1 -threads 0 -acodec ac3 -ab 
> 448k -ac 6 -r 25 -f matroska Tatort_test€reenc.mkv
>
> FFmpeg version SVN-r25767, Copyright (c) 2000-2010 the FFmpeg developers
>   built on Mar  5 2011 21:55:02 with gcc 4.5.2
>   configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 
> --mandir=/usr/share/man --enable-static --enable-shared 
> --cc=x86_64-pc-linux-gnu-gcc --enable-gpl --enable-version3 --enable-postproc 
> --enable-avfilter --disable-stripping --disable-debug --disable-doc 
> --disable-vaapi --disable-static --enable-libmp3lame --enable-libtheora 
> --enable-libvorbis --enable-libx264 --enable-libxvid --enable-libfaac 
> --enable-nonfree --disable-indev=oss --disable-indev=jack --enable-x11grab 
> --disable-outdev=oss --enable-pthreads --disable-altivec --cpu=athlon64 
> --enable-hardcoded-tables
>   libavutil     50.33. 0 / 50.33. 0
>   libavcore      0.13. 0 /  0.13. 0
>   libavcodec    52.96. 0 / 52.96. 0
>   libavformat   52.84. 0 / 52.84. 0
>   libavdevice   52. 2. 2 / 52. 2. 2
>   libavfilter    1.62. 0 /  1.62. 0
>   libswscale     0.12. 0 /  0.12. 0
>   libpostproc   51. 2. 0 / 51. 2. 0
>
> [h264 @ 0xe14380] mmco: unref short failure
> Input #0, mpegts, from 
> 'Tatort_test.ts':                                                                                                 
>  
>   Duration: 00:00:59.99, start: 1.400000, bitrate: 12679 kb/s
>   Program 1 Service01
>     Metadata:
>       name            : Service01
>       provider_name   : FFmpeg
>     Stream #0.0[0x100]: Video: h264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 50 
> fps, 50 tbr, 90k tbn, 100 tbc
>     Stream #0.1[0x101](deu): Audio: ac3, 48000 Hz, stereo, s16, 448 kb/s
>
> ...
>
>     Stream #0.0: Video: libx264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], q=10-51, 
> 200 kb/s, 1k tbn, 25 tbc
>     Stream #0.1(deu): Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s
> Stream mapping:
>   Stream #0.0 -> #0.0
>   Stream #0.1 -> #0.1
> Press [q] to stop encoding
> ==================================================
>
>
> Doing the same thing with a self-compiled ffmpeg from today I get the mentioned 
> error (same file - same call !?!):
>
> =======================================================
> /usr/local/bin/ffmpeg -ac 6 -r 50 -deinterlace -i Tatort_test.ts -vcodec libx264 
> -vpre fast -maxrate 40000k -bufsize 30000k -crf 12 -wpredp 1 -bf 3 -b_strategy 1 
> -vlevel 41 -g 24 -flags2 -bpyramid -slices 4 -subq 1 -refs 1 -flags2 +aud 
> -flags2 +dct8x8 -trellis 2 -me_method hex -coder 1 -threads 0 -acodec ac3 -ab 
> 448k -ac 6 -r 25 -f matroska Tatort_test€reenc.mkv
>
> FFmpeg version UNKNOWN, Copyright (c) 2000-2011 the FFmpeg developers
>   built on Mar 26 2011 14:43:55 with gcc 4.5.2
>   configuration: --enable-gpl --enable-libx264 --enable-filter=hqdn3d 
> --enable-nonfree --enable-libmp3lame --enable-libfaac --enable-frei0r 
> --enable-avfilter --enable-version3
>   libavutil    50. 40. 0 / 50. 40. 0
>   libavcodec   52.115. 0 / 52.115. 0
>   libavformat  52.103. 0 / 52.103. 0
>   libavdevice  52.  3. 0 / 52.  3. 0
>   libavfilter   1. 76. 0 /  1. 76. 0
>   libswscale    0. 13. 0 /  0. 13. 0
>
> ...
>
>     Stream #0.0[0x100]: Video: h264 (High), yuv420p, 1280x720 [PAR 1:1 DAR 
> 16:9], 50 fps, 50 tbr, 90k tbn, 100 tbc
>     Stream #0.1[0x101](deu): Audio: ac3, 48000 Hz, stereo, s16, 448 kb/s
>
> ...
>
> [ac3 @ 0x18883d0] No channel layout specified. The encoder will guess the 
> layout, but it might be incorrect.
> Output #0, matroska, to 
> 'Tatort_test€reenc.mkv':                                                                                         
>  
>   Metadata:
>     encoder         : Lavf52.103.0
>     Stream #0.0: Video: libx264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], q=0-69, 
> 200 kb/s, 1k tbn, 25 tbc
>     Stream #0.1(deu): Audio: ac3, 48000 Hz, 5.1, flt, 448 kb/s
> Stream mapping:
>   Stream #0.0 -> #0.0
>   Stream #0.1 -> #0.1
> Press ctrl-c to stop encoding
> Input stream #0.1 frame changed from rate:48000 fmt:s16 ch:2 to rate:48000 
> fmt:s16 ch:6
> Resampling with input channels greater than 2 unsupported.
> Can not resample 6 channels @ 48000 Hz to 6 channels @ 48000 
> Hz                                                                        
>   

Your first "this works fine" case is probably not doing what you expect, 
unless your goal was to downmix. Did you notice that the input to the 
resampler is "ch:2"? But it seems that version of ffmpeg does not warn 
you that something bad is being done.

If your goal is to have 5.1 audio in the output file, then use '-acodec 
copy'. Do not decode the audio, then try to re-encode it.

Mike Scheutzow




More information about the ffmpeg-user mailing list