[FFmpeg-user] How to set sample format for the alsa demuxer?
LANGLOIS Olivier PIS -EXT
olivier.pis.langlois at transport.alstom.com
Tue Dec 10 22:21:37 CET 2013
Hi,
I have found the answer:
I had to change -sample_fmt s32 in
ffmpeg -f alsa -sample_fmt s32 -i hw:1,1,0 -strict -2 -acodec aac -ar 48000 -b:a 64k out.aac
to -acodec pcm_s32le for
ffmpeg -f alsa -acodec pcm_s32le -i hw:1,1,0 -strict -2 -acodec aac -ar 48000 -b:a 64k out.aac
> -----Original Message-----
> From: ffmpeg-user-bounces at ffmpeg.org [mailto:ffmpeg-user-
> bounces at ffmpeg.org] On Behalf Of LANGLOIS Olivier PIS -EXT
> Sent: Tuesday, December 10, 2013 2:44 PM
> To: ffmpeg-user at ffmpeg.org
> Subject: [FFmpeg-user] How to set sample format for the alsa demuxer?
>
> I want to set the input sample format to s32 but I failed to change it from its
> S16_LE default format.
>
> Am I doing something wrong or did I have stumbled onto a small ffmpeg
> bug?
>
> lano1106 at hpmini ~/dev/packages/ffmpeg/repos/extra-i686/src/ffmpeg-
> 2.1.1/libavdevice :( $ ffmpeg -f alsa -sample_fmt s32 -i hw:1,1,0 -strict -2 -
> acodec aac -ar 48000 -b:a 64k out.aac
> ffmpeg version 2.1.1 Copyright (c) 2000-2013 the FFmpeg developers
> built on Dec 10 2013 17:24:34 with gcc 4.8.2 (GCC)
> configuration: --prefix=/usr --disable-debug --disable-static --enable-
> avresample --enable-dxva2 --enable-fontconfig --enable-gnutls --enable-gpl
> --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm --
> enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --
> enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-
> libpulse --enable-librtmp --enable-libschroedinger --enable-libspeex --
> enable-libtheora --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-
> libx264 --enable-libxvid --enable-pic --enable-postproc --enable-runtime-
> cpudetect --enable-shared --enable-swresample --enable-vdpau --enable-
> version3 --enable-x11grab
> libavutil 52. 48.101 / 52. 48.101
> libavcodec 55. 39.101 / 55. 39.101
> libavformat 55. 19.104 / 55. 19.104
> libavdevice 55. 5.100 / 55. 5.100
> libavfilter 3. 90.100 / 3. 90.100
> libavresample 1. 1. 0 / 1. 1. 0
> libswscale 2. 5.101 / 2. 5.101
> libswresample 0. 17.104 / 0. 17.104
> libpostproc 52. 3.100 / 52. 3.100
> [alsa @ 0x8b2afa0] cannot set sample format 0x10000 2 (Invalid argument)
> hw:1,1,0: Input/output error
>
________________________________
CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium.
More information about the ffmpeg-user
mailing list