Hi, The attached patch fixes incorrect bit rate values in riff headers when a conversion is done from 16 bit samples to alaw.
[user@test ffmpeg-new]$ ./ffprobe ../sample.wav 2>&1 | tail -4 Input #0, wav, from '../sample.wav': Duration: 00:00:10.00, bitrate: 256 kb/s Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, 1 channels, s16, 256 kb/s [user@test ffmpeg-new]$ ./ffmpeg -i ../sample.wav -f wav -acodec pcm_alaw -ac 1 -ar 8000 ../sample.alaw.wav ffmpeg version 0.10.14 Copyright (c) 2000-2014 the FFmpeg developers built on Aug 12 2014 12:30:33 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51) configuration: --disable-yasm libavutil 51. 35.100 / 51. 35.100 libavcodec 53. 61.100 / 53. 61.100 libavformat 53. 32.100 / 53. 32.100 libavdevice 53. 4.100 / 53. 4.100 libavfilter 2. 61.100 / 2. 61.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 6.100 / 0. 6.100 [wav @ 0x158813a0] max_analyze_duration 5000000 reached at 5120000 Input #0, wav, from '../sample.wav': Duration: 00:00:10.00, bitrate: 256 kb/s Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 16000 Hz, 1 channels, s16, 256 kb/s File '../sample.alaw.wav' already exists. Overwrite ? [y/N] y Output #0, wav, to '../sample.alaw.wav': Metadata: encoder : Lavf53.32.100 Stream #0:0: Audio: pcm_alaw ([6][0][0][0] / 0x0006), 8000 Hz, 1 channels, s 16, 64 kb/s Stream mapping: Stream #0:0 -> #0:0 (pcm_s16le -> pcm_alaw) Press [q] to stop, [?] for help size= 78kB time=00:00:09.99 bitrate= 64.0kbits/s video:0kB audio:78kB global headers:0kB muxing overhead 0.072509% [user@test ffmpeg-new]$ ./ffprobe ../sample.alaw.wav 2>&1 | tail -4 Input #0, wav, from '../sample.alaw.wav': Duration: 00:00:09.99, bitrate: 64 kb/s Stream #0:0: Audio: pcm_alaw ([6][0][0][0] / 0x0006), 8000 Hz, 1 channels, s 16, 64 kb/s Without the patch ffprobe would report a bit rate of 128kb/s. Greetings, Wilfried
0001-merge-pcmenc-set-correct-bitrate-value.patch
Description: 0001-merge-pcmenc-set-correct-bitrate-value.patch
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel