Ticket #98 (open defect)
Channel reordering in pcm files
| Reported by: | cehoyos | Owned by: | |
|---|---|---|---|
| Priority: | minor | Component: | undetermined |
| Version: | git-master | Keywords: | chan |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | yes | |
| Analyzed by developer: | yes |
Description
I will attach a three channel pcm caf file. The file contains left, center and right stream, FFmpeg currently warns that the channel layout is unsupported. It is simple to set the correct channel layout (trivial patch attached), but the problem is that the file has channel order "center, left, right" (MPEG-3-0-B), so that FFmpeg maps the left channel to the right, the right channel to center and the center channel to the left channel on decoding.
How can a demuxer tell the pcm decoder that the decoder has to reorder channels?
ffmpeg -i MPEG30B.caf
FFmpeg version git-N-29301-gab15726, Copyright (c) 2000-2011 the FFmpeg developers
built on Apr 23 2011 10:48:07 with gcc 4.5.2
configuration: --cc=/usr/local/gcc-4.5.2/bin/gcc --enable-gpl --enable-libcelt
libavutil 51. 0. 0 / 51. 0. 0
libavcodec 53. 1. 0 / 53. 1. 0
libavformat 53. 0. 1 / 53. 0. 1
libavdevice 53. 0. 0 / 53. 0. 0
libavfilter 2. 0. 0 / 2. 0. 0
libswscale 0. 13. 0 / 0. 13. 0
[caf @ 0x12a0ae0] Unknown channel layout.
[caf @ 0x12a0ae0] Estimating duration from bitrate, this may be inaccurate
Input #0, caf, from 'MPEG30B.caf':
Duration: 00:00:10.66, start: 0.000000, bitrate: 1151 kb/s
Stream #0.0: Audio: pcm_s8, 48000 Hz, 3 channels, u8, 1152 kb/s
At least one output file must be specified
Attachments
Change History
comment:1 Changed 8 months ago by cehoyos
- Analyzed by developer set
- Status changed from new to open
- Version changed from git to git-master
- Type changed from enhancement to defect
- Reproduced by developer set
This is now a bug because FFmpeg incorrectly reports "3.0" instead of "3 channels, unknown layout".
$ ffmpeg -i MPEG30B.caf
ffmpeg version N-44712-g7200fec Copyright (c) 2000-2012 the FFmpeg developers
built on Sep 23 2012 21:08:48 with gcc 4.5.3 (GCC)
configuration: --cc=/usr/local/gcc-4.5.3/bin/gcc --enable-gpl
libavutil 51. 73.101 / 51. 73.101
libavcodec 54. 58.100 / 54. 58.100
libavformat 54. 28.100 / 54. 28.100
libavdevice 54. 2.101 / 54. 2.101
libavfilter 3. 17.100 / 3. 17.100
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
[caf @ 0x14f4240] Estimating duration from bitrate, this may be inaccurate
Input #0, caf, from 'MPEG30B.caf':
Duration: 00:00:10.66, start: 0.000000, bitrate: 1151 kb/s
Stream #0:0: Audio: pcm_s8 (lpcm / 0x6D63706C), 48000 Hz, 3.0, u8, 1152 kb/s
At least one output file must be specified
I sent a patch last year to fix this ticket:
http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/132789



