[FFmpeg-devel] Formats with 0 channels
Andreas Öman
andreas
Mon Jun 2 09:13:09 CEST 2008
Hi
Some streams have the AAC channel configuration stored as a PCE
element inside the stream, but sample rate can be recovered
from format.
This causes ffmpeg to believe that it should use 0 channels
for output:
$ ./ffmpeg_g -i samples/aac_lc/al03_48.mp4 -f s16be /dev/null
FFmpeg version SVN-r13618, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration:
libavutil version: 49.7.0
libavcodec version: 51.57.0
libavformat version: 52.14.0
libavdevice version: 52.0.0
built on Jun 2 2008 08:44:21, gcc: 4.1.3 20070929 (prerelease)
(Ubuntu 4.1.2-16ubuntu2)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'samples/aac_lc/al03_48.mp4':
Duration: 00:00:08.23, start: 0.000000, bitrate: 67 kb/s
Stream #0.0(und): Audio: aac, 48000 Hz, 0 channels
File '/dev/null' already exists. Overwrite ? [y/N] y
Output #0, s16be, to '/dev/null':
Stream #0.0(und): Audio: pcm_s16be, 48000 Hz, 0 channels
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
Floating point exception (core dumped)
The attached patch fixes this by checking for both a valid
sample rate and number of channels, i.e:
$ ./ffmpeg_g -i samples/aac_lc/al03_48.mp4 -f s16be /dev/null
FFmpeg version SVN-r13618, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration:
libavutil version: 49.7.0
libavcodec version: 51.57.0
libavformat version: 52.14.0
libavdevice version: 52.0.0
built on Jun 2 2008 08:44:21, gcc: 4.1.3 20070929 (prerelease)
(Ubuntu 4.1.2-16ubuntu2)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'samples/aac_lc/al03_48.mp4':
Duration: 00:00:08.23, start: 0.000000, bitrate: 67 kb/s
Stream #0.0(und): Audio: aac, 48000 Hz, mono
File '/dev/null' already exists. Overwrite ? [y/N] y
Output #0, s16be, to '/dev/null':
Stream #0.0(und): Audio: pcm_s16be, 48000 Hz, mono, 768 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
size= 0kB time=8.21 bitrate= 0.0kbits/s
video:0kB audio:770kB global headers:0kB muxing overhead -99.999873%
-------------- next part --------------
A non-text attachment was scrubbed...
Name: utils.patch
Type: text/x-patch
Size: 456 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080602/79203f7e/attachment.bin>
More information about the ffmpeg-devel
mailing list