#1474 closed defect (fixed)
Some audio encoders stopped encoding strange channel layouts
Reported by: | Dan | Owned by: | |
---|---|---|---|
Priority: | important | Component: | undetermined |
Version: | git-master | Keywords: | regression |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
Summary of the bug:
I am stitching 2 videos side by side together into 1 output video (using libavfilter, the -vf flag). Each source video is mpeg2, the output is .mp4 (libx264).
I have tried many ways to get the audio to map from an input to the output, including adding: -c:a libfaac -ac 2 -map 0:v -map 0:a:0 -map 0:a:1
and
-acodec libfaac -ac2 -map 0:1 -map 0:2
I always get the error: "[aresample @ 0x7fdd626023e0] [SWR @ 0x7fdd638c2e00] Input channel layout isnt supported"
When I go back to a macports build of ffmpeg (0.7.8) the following command string: ffmpeg -i /Users/danielpcoffey/Desktop/nate.mov -b 500k -t 00:01:00 -acodec libfaac -ab 64k -vcodec libx264 -r 29.97 -pass 1 -s 1280x720 -vf "movie=/Users/danielpcoffey/Desktop/tommy.mov, setpts=PTS-STARTPTS [tommyhandle]; [in] pad=1280*2:720 [natehandle]; [tommyhandle] scale=1280:720 [tommyhandle]; [natehandle][tommyhandle] overlay=1280:0 [out]" ~/Desktop/sidebyside720r500k.mp4
FFMPEG 0.7.8 does function as I expect (joins 2 videos and uses the audio from the first input). When I do the same exact command string in ffmpeg 0.11.1, I get the error: "[aresample @ 0x7fdd626023e0] [SWR @ 0x7fdd638c2e00] Input channel layout isnt supported"
Am I doing something wrong? I'd like to stitch 2 videos together side by side and use the audio from the first (or alternatively the second or a mix of both). Please let me know if I can do anything else! Thank you!!
How to reproduce:
% ffmpeg -i /Users/danielpcoffey/Desktop/nate.mov -b 500k -t 00:01:00 -acodec libfaac -ab 64k -vcodec libx264 -r 29.97 -pass 1 -s 1280x720 -vf "movie=/Users/danielpcoffey/Desktop/tommy.mov, setpts=PTS-STARTPTS [tommyhandle]; [in] pad=1280*2:720 [natehandle]; [tommyhandle] scale=1280:720 [tommyhandle]; [natehandle][tommyhandle] overlay=1280:0 [out]" ~/Desktop/sidebyside720r500k.mp4 ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers built on Jun 9 2012 21:40:17 with clang 3.0 (tags/Apple/clang-211.10.1) configuration: --prefix= --enable-gpl --enable-version3 --enable-nonfree --enable-libx264 --enable-libxvid --enable-postproc --enable-swscale --enable-avfilter --enable-pthreads --enable-yasm --enable-libfaac --enable-libmp3lame --cc=clang --enable-libvorbis libavutil 51. 54.100 / 51. 54.100 libavcodec 54. 23.100 / 54. 23.100 libavformat 54. 6.100 / 54. 6.100 libavdevice 54. 0.100 / 54. 0.100 libavfilter 2. 77.100 / 2. 77.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 15.100 / 0. 15.100 libpostproc 52. 0.100 / 52. 0.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/danielpcoffey/Desktop/nate.mov': Metadata: major_brand : qt minor_version : 537199360 compatible_brands: qt creation_time : 2012-06-19 21:13:20 Duration: 00:02:28.81, start: 0.000000, bitrate: 36378 kb/s Stream #0:0(eng): Video: mpeg2video (Main) (xdvf / 0x66766478), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 35000 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 59.94 tbc Metadata: creation_time : 2012-06-19 21:13:20 handler_name : Apple Alias Data Handler Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels (FL), s16, 768 kb/s Metadata: creation_time : 2012-06-19 21:13:20 handler_name : Apple Alias Data Handler Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels (FR), s16, 768 kb/s Metadata: creation_time : 2012-06-19 21:13:20 handler_name : Apple Alias Data Handler Stream #0:3(eng): Data: none (tmcd / 0x64636D74) Metadata: creation_time : 2012-06-19 21:13:20 handler_name : Apple Alias Data Handler timecode : 02:20:28;08 Please use -b:a or -b:v, -b is ambiguous [buffer @ 0x7fdd62417d20] w:1920 h:1080 pixfmt:yuv420p tb:1/2997 sar:1/1 sws_param:flags=2 [buffersink @ 0x7fdd62418e80] No opaque field provided [movie @ 0x7fdd62419b00] seek_point:0 format_name:(null) file_name:/Users/danielpcoffey/Desktop/tommy.mov stream_index:0 [scale @ 0x7fdd624190a0] w:1920 h:1080 fmt:yuv420p sar:1/1 -> w:1280 h:720 fmt:yuv420p sar:1/1 flags:0x4 [pad @ 0x7fdd625008c0] w:1280 h:720 -> w:2560 h:720 x:0 y:0 color:0x000000FF [movie @ 0x7fdd62419b00] TB:0.000334 [scale @ 0x7fdd62500c20] w:1920 h:1080 fmt:yuv420p sar:1/1 -> w:1280 h:720 fmt:yuva420p sar:1/1 flags:0x4 [overlay @ 0x7fdd625001e0] main w:2560 h:720 fmt:yuv420p overlay x:1280 y:0 w:1280 h:720 fmt:yuva420p [overlay @ 0x7fdd625001e0] main_tb:1/2997 overlay_tb:1/2997 -> tb:1/2997 exact:1 [aformat @ 0x7fdd62601e00] auto-inserting filter 'auto-inserted resampler 0' between the filter 'src' and the filter 'aformat' [aresample @ 0x7fdd626023e0] [SWR @ 0x7fdd638c2e00] Input channel layout isnt supported Error opening filters!
Attachments (1)
Change History (26)
follow-up: 2 comment:1 by , 12 years ago
comment:2 by , 12 years ago
Replying to Cigaes:
Please try the following patch:
http://ffmpeg.org/pipermail/ffmpeg-devel/2012-June/126277.html
Alternatively, you could try to use-filter_complex
rather than-f lavfi
.
Please also note that, while your command line is, strictly speaking, correct, it produces a file with a single-channel audio stream that is not declared as "mono" but as "front-left"; this is rather unusual. You can fix it using the
pan
filter:pan=mono:FC=FL
.
Thanks for your help. I tried the patch with both FFMPEG 0.11.1 and 0.10.2.git-f77fd34
Note: my libavdevice/lavfi.c file was slightly different in both cases, here's what it looks like after I removed the 2 lines:
enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_U8, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_DBL, -1 }; AVABufferSinkParams *abuffersink_params = av_abuffersink_params_al$ abuffersink_params->sample_fmts = sample_fmts; ret = avfilter_graph_create_filter(&sink, abuffersink, inout->name, NULL, abuffersink_params, lavfi->grap$
Here is the command and output from FFMPEG 0.10.2.git:
/usr/local/ffgit/bin/ffmpeg -i `pwd`/nate.mov -b 2500k -t 00:01:00 -acodec libfaac -ab 64k -vcodec libx264 -r 29.97 -pass 1 -s 1280x720 -vf "movie=`pwd`/tommy.mov, setpts=PTS-STARTPTS [tommyhandle]; [in] scale=1280:720, pad=1280*2:720 [natehandle]; [tommyhandle] scale=1280:720 [tommyhandle]; [natehandle][tommyhandle] overlay=1280:0 [out]" `pwd`/10out.mp4 ffmpeg version 0.10.2.git-f77fd34 Copyright (c) 2000-2012 the FFmpeg developers built on Jun 21 2012 12:18:12 with gcc 4.6.3 20120306 (Red Hat 4.6.3-2) configuration: --prefix=/usr/local/ffgit --enable-gpl --enable-version3 --enable-nonfree --enable-libx264 --enable-libxvid --enable-postproc --enable-swscale --enable-avfilter --enable-pthreads --enable-yasm --enable-libfaac --enable-libmp3lame --enable-libvorbis --enable-libvpx libavutil 51. 59.100 / 51. 59.100 libavcodec 54. 29.100 / 54. 29.100 libavformat 54. 10.100 / 54. 10.100 libavdevice 54. 0.100 / 54. 0.100 libavfilter 2. 82.100 / 2. 82.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 15.100 / 0. 15.100 libpostproc 52. 0.100 / 52. 0.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/mnt/hgfs/danielpcoffey/Desktop/nate.mov': Metadata: major_brand : qt minor_version : 537199360 compatible_brands: qt creation_time : 2012-06-19 21:13:20 Duration: 00:02:28.81, start: 0.000000, bitrate: 36378 kb/s Stream #0:0(eng): Video: mpeg2video (Main) (xdvf / 0x66766478), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 35000 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 59.94 tbc Metadata: creation_time : 2012-06-19 21:13:20 handler_name : Apple Alias Data Handler timecode : 02:20:28;08 Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels (FL), s16, 768 kb/s Metadata: creation_time : 2012-06-19 21:13:20 handler_name : Apple Alias Data Handler Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels (FR), s16, 768 kb/s Metadata: creation_time : 2012-06-19 21:13:20 handler_name : Apple Alias Data Handler Stream #0:3(eng): Data: none (tmcd / 0x64636D74) Metadata: creation_time : 2012-06-19 21:13:20 handler_name : Apple Alias Data Handler timecode : 02:20:28;08 Please use -b:a or -b:v, -b is ambiguous [Parsed_movie_0 @ 0xa0d9460] seek_point:0 format_name:(null) file_name:/mnt/hgfs/danielpcoffey/Desktop/tommy.mov stream_index:0 [in @ 0xa0ba5a0] w:1920 h:1080 pixfmt:yuv420p tb:1/2997 fr:2997/100 sar:1/1 sws_param:flags=2 [ffmpeg_buffersink @ 0xa141b80] No opaque field provided [Parsed_scale_2 @ 0xa0b9ae0] w:1920 h:1080 fmt:yuv420p sar:1/1 -> w:1280 h:720 fmt:yuv420p sar:1/1 flags:0x4 [Parsed_pad_3 @ 0xa0b9e40] w:1280 h:720 -> w:2560 h:720 x:0 y:0 color:0x000000FF [Parsed_movie_0 @ 0xa0d9460] TB:0.000334 [Parsed_scale_4 @ 0xa0ba600] w:1920 h:1080 fmt:yuv420p sar:1/1 -> w:1280 h:720 fmt:yuva420p sar:1/1 flags:0x4 [Parsed_overlay_5 @ 0xa0ba9a0] main w:2560 h:720 fmt:yuv420p overlay x:1280 y:0 w:1280 h:720 fmt:yuva420p [Parsed_overlay_5 @ 0xa0ba9a0] main_tb:1/2997 overlay_tb:1/2997 -> tb:1/2997 exact:1 [scale @ 0xa0bad60] w:2560 h:720 fmt:yuv420p sar:1/1 -> w:1280 h:720 fmt:yuv420p sar:2/1 flags:0x4 [aformat @ 0xa440f20] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'aformat' [auto-inserted resampler 0 @ 0xa434da0] [SWR @ 0xa434fe0] Input channel layout '1 channels (FL)' is not supported [auto-inserted resampler 0 @ 0xa434da0] Failed to configure output pad on auto-inserted resampler 0 Error opening filters!
and the output from FFMPEG 0.11.1:
ffmpeg -i `pwd`/nate.mov -b 2500k -t 00:01:00 -acodec libfaac -ab 64k -vcodec libx264 -r 29.97 -pass 1 -s 1280x720 -vf "movie=`pwd`/tommy.mov, setpts=PTS-STARTPTS [tommyhandle]; [in] scale=1280:720, pad=1280*2:720 [natehandle]; [tommyhandle] scale=1280:720 [tommyhandle]; [natehandle][tommyhandle] overlay=1280:0 [out]" `pwd`/sidebyside720r2500k.mp4 ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers built on Jun 21 2012 12:07:09 with gcc 4.6.3 20120306 (Red Hat 4.6.3-2) configuration: --prefix=/usr/local --enable-gpl --enable-version3 --enable-nonfree --enable-libx264 --enable-libxvid --enable-postproc --enable-swscale --enable-avfilter --enable-pthreads --enable-yasm --enable-libfaac --enable-libmp3lame --enable-libvorbis --enable-libvpx libavutil 51. 54.100 / 51. 54.100 libavcodec 54. 23.100 / 54. 23.100 libavformat 54. 6.100 / 54. 6.100 libavdevice 54. 0.100 / 54. 0.100 libavfilter 2. 77.100 / 2. 77.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 15.100 / 0. 15.100 libpostproc 52. 0.100 / 52. 0.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/mnt/hgfs/danielpcoffey/Desktop/nate.mov': Metadata: major_brand : qt minor_version : 537199360 compatible_brands: qt creation_time : 2012-06-19 21:13:20 Duration: 00:02:28.81, start: 0.000000, bitrate: 36378 kb/s Stream #0:0(eng): Video: mpeg2video (Main) (xdvf / 0x66766478), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 35000 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 59.94 tbc Metadata: creation_time : 2012-06-19 21:13:20 handler_name : Apple Alias Data Handler Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels (FL), s16, 768 kb/s Metadata: creation_time : 2012-06-19 21:13:20 handler_name : Apple Alias Data Handler Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels (FR), s16, 768 kb/s Metadata: creation_time : 2012-06-19 21:13:20 handler_name : Apple Alias Data Handler Stream #0:3(eng): Data: none (tmcd / 0x64636D74) Metadata: creation_time : 2012-06-19 21:13:20 handler_name : Apple Alias Data Handler timecode : 02:20:28;08 Please use -b:a or -b:v, -b is ambiguous File '/mnt/hgfs/danielpcoffey/Desktop/sidebyside720r2500k.mp4' already exists. Overwrite ? [y/N] y w:1920 h:1080 pixfmt:yuv420p tb:1/2997 sar:1/1 sws_param:flags=2 [buffersink @ 0xa44cd20] No opaque field provided [movie @ 0xa433b20] seek_point:0 format_name:(null) file_name:/mnt/hgfs/danielpcoffey/Desktop/tommy.mov stream_index:0 [scale @ 0xa44d680] w:1920 h:1080 fmt:yuv420p sar:1/1 -> w:1280 h:720 fmt:yuv420p sar:1/1 flags:0x4 [scale @ 0xa4b6520] w:1280 h:720 fmt:yuv420p sar:1/1 -> w:1280 h:720 fmt:yuv420p sar:1/1 flags:0x4 [pad @ 0xa433a80] w:1280 h:720 -> w:2560 h:720 x:0 y:0 color:0x000000FF [movie @ 0xa433b20] TB:0.000334 [scale @ 0xa4b7040] w:1920 h:1080 fmt:yuv420p sar:1/1 -> w:1280 h:720 fmt:yuva420p sar:1/1 flags:0x4 [overlay @ 0xa4b62e0] main w:2560 h:720 fmt:yuv420p overlay x:1280 y:0 w:1280 h:720 fmt:yuva420p [overlay @ 0xa4b62e0] main_tb:1/2997 overlay_tb:1/2997 -> tb:1/2997 exact:1 [aformat @ 0xa5f7360] auto-inserting filter 'auto-inserted resampler 0' between the filter 'src' and the filter 'aformat' [aresample @ 0xa656ca0] [SWR @ 0xa63a2c0] Input channel layout isnt supported Error opening filters!
Thank you and let me know what else I can do!
follow-up: 5 comment:4 by , 12 years ago
Replying to cehoyos:
Did you provide a sample?
You could try -channel_layout 4
Hi, a new development! I went to create a short 30 second clip of my media to upload and I got the same error without the filters! Perhaps this is not an issue with the filters...
command:
ffmpeg -i tommy.mov -t 00:00:30 -sameq tommy30.mov
error:
[aresample @ 0x7fcab2419b60] [SWR @ 0x7fcab2829800] Input channel layout isnt supported
complete output:
ffmpeg -i tommy.mov -t 00:00:30 -sameq tommy30.mov ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers built on Jun 21 2012 12:07:09 with gcc 4.6.3 20120306 (Red Hat 4.6.3-2) configuration: --prefix=/usr/local --enable-gpl --enable-version3 --enable-nonfree --enable-libx264 --enable-libxvid --enable-postproc --enable-swscale --enable-avfilter --enable-pthreads --enable-yasm --enable-libfaac --enable-libmp3lame --enable-libvorbis --enable-libvpx libavutil 51. 54.100 / 51. 54.100 libavcodec 54. 23.100 / 54. 23.100 libavformat 54. 6.100 / 54. 6.100 libavdevice 54. 0.100 / 54. 0.100 libavfilter 2. 77.100 / 2. 77.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 15.100 / 0. 15.100 libpostproc 52. 0.100 / 52. 0.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'tommy.mov': Metadata: major_brand : qt minor_version : 537199360 compatible_brands: qt creation_time : 2012-06-19 21:18:43 Duration: 00:01:59.61, start: 0.000000, bitrate: 36382 kb/s Stream #0:0(eng): Video: mpeg2video (Main) (xdvf / 0x66766478), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 35000 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 59.94 tbc Metadata: creation_time : 2012-06-19 21:18:43 handler_name : Apple Alias Data Handler Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels (FL), s16, 768 kb/s Metadata: creation_time : 2012-06-19 21:18:43 handler_name : Apple Alias Data Handler Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels (FR), s16, 768 kb/s Metadata: creation_time : 2012-06-19 21:18:43 handler_name : Apple Alias Data Handler Stream #0:3(eng): Data: none (tmcd / 0x64636D74) Metadata: creation_time : 2012-06-19 21:18:43 handler_name : Apple Alias Data Handler timecode : 02:47:32;24 File 'tommy30.mov' already exists. Overwrite ? [y/N] y w:1920 h:1080 pixfmt:yuv420p tb:1/2997 sar:1/1 sws_param:flags=2 [buffersink @ 0xac5c9e0] No opaque field provided [aformat @ 0xac5df80] auto-inserting filter 'auto-inserted resampler 0' between the filter 'src' and the filter 'aformat' [aresample @ 0xac5d6e0] [SWR @ 0xac58d00] Input channel layout isnt supported Error opening filters!
I tried adding the -channel_layout 4:
ffmpeg -i tommy.mov -t 00:00:30 -sameq -channel_layout 4 tommy30.mov
same error. (build 0.11.1 on both my mac and Fedora VM.)
on the git snapshot I pulled down (0.10.2.git-f77fd34), I get a slightly different error (adding -channel_layout 4 didn't fix it either):
[SWR @ 0xb16a3e0] Input channel layout '1 channels (FL)' is not supported [auto-inserted resampler 0 @ 0xb1242a0] Failed to configure output pad on auto-inserted resampler 0
complete output:
/usr/local/ffgit/bin/ffmpeg -i tommy.mov -t 00:00:30 -sameq -channel_layout 4 tommy30-1.mov ffmpeg version 0.10.2.git-f77fd34 Copyright (c) 2000-2012 the FFmpeg developers built on Jun 21 2012 12:18:12 with gcc 4.6.3 20120306 (Red Hat 4.6.3-2) configuration: --prefix=/usr/local/ffgit --enable-gpl --enable-version3 --enable-nonfree --enable-libx264 --enable-libxvid --enable-postproc --enable-swscale --enable-avfilter --enable-pthreads --enable-yasm --enable-libfaac --enable-libmp3lame --enable-libvorbis --enable-libvpx libavutil 51. 59.100 / 51. 59.100 libavcodec 54. 29.100 / 54. 29.100 libavformat 54. 10.100 / 54. 10.100 libavdevice 54. 0.100 / 54. 0.100 libavfilter 2. 82.100 / 2. 82.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 15.100 / 0. 15.100 libpostproc 52. 0.100 / 52. 0.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'tommy.mov': Metadata: major_brand : qt minor_version : 537199360 compatible_brands: qt creation_time : 2012-06-19 21:18:43 Duration: 00:01:59.61, start: 0.000000, bitrate: 36382 kb/s Stream #0:0(eng): Video: mpeg2video (Main) (xdvf / 0x66766478), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 35000 kb/s, 29.97 fps, 29.97 tbr, 2997 tbn, 59.94 tbc Metadata: creation_time : 2012-06-19 21:18:43 handler_name : Apple Alias Data Handler timecode : 02:47:32;24 Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels (FL), s16, 768 kb/s Metadata: creation_time : 2012-06-19 21:18:43 handler_name : Apple Alias Data Handler Stream #0:2(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 1 channels (FR), s16, 768 kb/s Metadata: creation_time : 2012-06-19 21:18:43 handler_name : Apple Alias Data Handler Stream #0:3(eng): Data: none (tmcd / 0x64636D74) Metadata: creation_time : 2012-06-19 21:18:43 handler_name : Apple Alias Data Handler timecode : 02:47:32;24 File 'tommy30-1.mov' already exists. Overwrite ? [y/N] y w:1920 h:1080 pixfmt:yuv420p tb:1/2997 fr:2997/100 sar:1/1 sws_param:flags=2 [ffmpeg_buffersink @ 0xa491060] No opaque field provided [aformat @ 0xa491dc0] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'aformat' [auto-inserted resampler 0 @ 0xa48d440] [SWR @ 0xa4933e0] Input channel layout '1 channels (FL)' is not supported [auto-inserted resampler 0 @ 0xa48d440] Failed to configure output pad on auto-inserted resampler 0 Error opening filters!
I went back to my macports install on my mac (0.7.8) and was able to create the short file with the same command line:
ffmpeg -i tommy.mov -t 00:00:30 -sameq tommy30.mov
(results in this file - 30 seconds, 49.5mb:)
http://dcoffey.net/FTP/tommy30.mov
Any ideas? Let me know if you'd like more info or more samples. The sample I uploaded is the same as the rest of the source media.
Thank you!
comment:5 by , 12 years ago
Replying to dcoffey3296:
I tried adding the -channel_layout 4:
ffmpeg -i tommy.mov -t 00:00:30 -sameq -channel_layout 4 tommy30.mov
You have to put -channel_layout 4 between ffmpeg and -i.
Please provide a sample.
comment:6 by , 12 years ago
putting in -channel_layout 4 solved my problem when placed between ffmpeg and -i. Thank you very much for the assistance and sorry for my ignorance!
follow-up: 9 comment:8 by , 12 years ago
Hi cehoyos,
I posted this earlier but probably got buried in my comments. Here is a 30 second sample clip:
http://dcoffey.net/FTP/tommy30.mov
Let me know if you'd like the full version, it's about 500 Mb. I generated this clip with: ffmpeg -sameq -t 00:00:30
comment:9 by , 12 years ago
Replying to dcoffey3296:
I posted this earlier but probably got buried in my comments.
Sorry for missing it!
Please always test with the actual sample you are uploading, I fear the problem is not reproducible with the provided sample;-(
Please see http://ffmpeg.org/bugreports.html for information how to cut the original sample (1MB should be more than enough), if it doesn't work after cutting, use tools/qt-faststart before cutting it.
comment:10 by , 12 years ago
Hi cehoyos,
I have uploaded a sample file from the instructions from the bugreport page. It is 2MB, I was unable to open the file myself but assume you can get what you need from it. Please let me know if I can provide anything else and thanks again for all of your help!
comment:11 by , 12 years ago
Please build qt-faststart in your ffmpeg directory:
$ make tools/qt-faststart
Then use qt-faststart to produce a cuttable sample:
$ tools/qt-faststart tommy.mov out.mov
Then cut the new mov file
$ dd if=out.mov of=ticket1474.mov bs=1M count=1
Then please attach ticket1474.mov
comment:12 by , 12 years ago
Hi cehoyos,
I had to increase to a 2.5MB file for it to open but it worked! Let me know what other info I can provide you! It is now attached.
Dan
comment:13 by , 12 years ago
Component: | FFmpeg → undetermined |
---|---|
Keywords: | libavfilter removed |
Reproduced by developer: | set |
Status: | new → open |
Version: | 0.11.1 → git-master |
comment:14 by , 12 years ago
Keywords: | regression added |
---|---|
Priority: | normal → important |
comment:15 by , 12 years ago
Summary: | FFMPEG 2 videos (mpeg2video -> .mp4) audio fails → Some audio encoders stopped encoding strange channel layouts |
---|
Regression since ca332b1
follow-up: 17 comment:16 by , 12 years ago
I would say that the current behaviour is correct: you are trying to encode an audio stream that has only a single left channel, and libfaac does not support that: it supports stereo, mono (which is a single center channel) and various surround layouts.
There is no obvious way of converting a left channel into a center one: if it will be mixed with a right channel, then it needs to be divided by 2.
We could add an exception to libswr to accept any single channel → single channel conversion, but I am not sure it would be a good idea: if not for that error, you may never have noticed that the file had a strange channel layout.
The correct course of action, IMHO, when dealing with such a file, is to tell ffmpeg exactly what you want to do: treat the left channel as center? mix it with the right? anything else?
comment:17 by , 12 years ago
Replying to Cigaes:
I would say that the current behaviour is correct: you are trying to encode an audio stream that has only a single left channel, and libfaac does not support that
I am not sure this is correct: libfaac can be muxed into mov which supports "FL".
I don't think it makes much sense in this case but I believe we should not forbid to encode six channel layouts that are != 5.1. The solution may be to just print a warning instead of failing hard.
comment:18 by , 12 years ago
I do not know about libfaac, but libvorbis, and possibly some version of the AC3 encoder too, treats the LFE channel differently from the others. The encoders also take into account the relation between corresponding left and right channels (channel coupling), and I would not be surprised if some encoders would take that a step further.
So I really do not think that lying to the encoder about the channel layout is a good idea, even with a warning.
comment:19 by , 12 years ago
True, but you could use AV_CH_LAYOUT_SURROUND instead of AV_CH_LAYOUT_4POINT0 ...
comment:20 by , 12 years ago
Probably. But then we need to have heuristics to decide when a conversion is completely safe, safe but inefficient, unsafe. That is becoming quite complex.
But even so, it is not clearly the right thing to do. With the file we have here, there are ~50% chances that what the user really want is -filter_complex '[0:1] [0:2] amerge'
.
If I am in a ten-floors building and get on the elevator on the 7th floor, I do not want it to start going down immediately, even though it is probably the right decision: the time wasted when it is wrong and I did not stop it in time is much worst that the time gained by not pressing a button.
The same goes for programs that automagically decide what to do with any given input: there are inputs where we really do not have enough information, and it is best to just let the user decide.
follow-up: 22 comment:21 by , 12 years ago
Since e4c00ac / 3bab7cd, ffmpeg shows "mono" for both audio streams, and encoding succeeds.
Imo, this means the bug was replaced by another bug because the actual channel layout for both audio streams is not mono.
comment:22 by , 12 years ago
Replying to cehoyos:
Since e4c00ac / 3bab7cd, ffmpeg shows "mono" for both audio streams, and encoding succeeds.
Imo, this means the bug was replaced by another bug because the actual channel layout for both audio streams is not mono.
If as you describe, this bug is no more and replaced by another then please open a new ticket and close this one.
comment:23 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
The bug is not reproducable anymore and all information i have points toward it having been fixed.
If some issue remains please reopen or better open a new ticket (this one has become unwieldingly big)
comment:24 by , 12 years ago
Also what i forgot, swr now also can handle random single channels and treats them as mono.
Please try the following patch:
http://ffmpeg.org/pipermail/ffmpeg-devel/2012-June/126277.html
Alternatively, you could try to use
-filter_complex
rather than-f lavfi
.Please also note that, while your command line is, strictly speaking, correct, it produces a file with a single-channel audio stream that is not declared as "mono" but as "front-left"; this is rather unusual. You can fix it using the
pan
filter:pan=mono:FC=FL
.