Opened 5 years ago

Closed 5 years ago

#1088 closed enhancement (invalid)

Arbitrary dropping channels is not supported

Reported by: cehoyos Owned by: michael
Priority: wish Component: swresample
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

http://thread.gmane.org/gmane.comp.video.ffmpeg.user/36098

If input has more than 8 channels, reducing the number of channels is not possible.

$ ffmpeg -f s16le -ac 16 -i /dev/zero -y -ac 2 -t 10 out.wav
ffmpeg version N-38840-g32a5775 Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar 17 2012 09:29:33 with gcc 4.3.2
  configuration: --cc=/usr/local/gcc-4.3.2/bin/gcc --enable-gpl
  libavutil      51. 42.100 / 51. 42.100
  libavcodec     54. 10.100 / 54. 10.100
  libavformat    54.  2.100 / 54.  2.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 64.101 /  2. 64.101
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  7.100 /  0.  7.100
  libpostproc    52.  0.100 / 52.  0.100
[s16le @ 0x8eb8b40] Invalid sample rate 0 specified using default of 44100
[s16le @ 0x8eb8b40] Estimating duration from bitrate, this may be inaccurate
Input #0, s16le, from '/dev/zero':
  Duration: N/A, start: 0.000000, bitrate: 11289 kb/s
    Stream #0:0: Audio: pcm_s16le, 44100 Hz, 16 channels, s16, 11289 kb/s
Output #0, wav, to 'out.wav':
  Metadata:
    encoder         : Lavf54.2.100
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le -> pcm_s16le)
Press [q] to stop, [?] for help
[SWR @ 0x8eb4880] Input channel layout isnt supported
swr_init() failed
Can not resample 16 channels @ 44100 Hz to 2 channels @ 44100 Hz

Change History (2)

comment:1 Changed 5 years ago by Cigaes

Using -ac does not drop channels, it remixes them. The remixing code can only work if it knows what channel is what: you do not mix side-left and side-right the same way than lower-rear-center and upper-rear-center.

Furthermore, I believe that dropping channels is already supported with the -map_channel option.

comment:2 Changed 5 years ago by cehoyos

  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.