[FFmpeg-devel] [PATCH] examples: add resampling_audio.c file

Stefano Sabatini stefasab at gmail.com
Fri Nov 30 23:42:43 CET 2012


On date Friday 2012-11-30 19:58:51 +0100, Stefano Sabatini encoded:
> ---
>  doc/examples/Makefile           |    3 +-
>  doc/examples/resampling_audio.c |  208 +++++++++++++++++++++++++++++++++++++++
>  2 files changed, 210 insertions(+), 1 deletion(-)
>  create mode 100644 doc/examples/resampling_audio.c

Upped.

Note, this doesn't work if I change destination layout MONO ->
SURROUND, I got:
$ resampling_audio out.raw
...
Resampling succeeded. Play the output file with the command:
ffplay -f s16le -channel_layout 7 -ac 3 -ar 44100 out.raw
$ ffplay -f s16le -channel_layout 7 -ac 3 -ar 44100 out.raw
ffplay version N-46906-ga5e382a Copyright (c) 2003-2012 the FFmpeg developers
[...]
[s16le @ 0x7f11080042d0] Estimating duration from bitrate, this may be inaccurate
Input #0, s16le, from 'out.raw':
  Duration: 00:00:10.01, start: 0.000000, bitrate: 2116 kb/s
    Stream #0:0: Audio: pcm_s16le, 44100 Hz, 3.0, s16, 2116 kb/s
SDL_OpenAudio (3 channels): 1 (mono) and 2 (stereo) channels supported
[pcm_s16le @ 0x7f1108000ad0] Invalid PCM packet, data has size 2 but at least a size of 6 was expected

and I got distorted sound. Any hint?
-- 
FFmpeg = Fierce and Fabulous Monstrous Philosofic Enigmatic Game
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-examples-add-resampling_audio.c-file.patch
Type: text/x-diff
Size: 8945 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121130/ca95b4c2/attachment.bin>


More information about the ffmpeg-devel mailing list