[FFmpeg-user] using ffmpeg to re-sample

Oliver Fromme oliver at fromme.com
Mon Jun 30 09:12:41 CEST 2014


Diaz Soho wrote:
 > fmpeg -sn -f video4linux2 -r 30 -s 1280x720 -input_format h264 -i
 > /dev/video1 -f alsa -ar 22050 -ac 1 -i hw:0 -map 0:0 -map 1:0 -vcodec copy
 > -acodec g726 -strict -1 http://localhost:8090/feed.ffm
 > 
 > it can capture audio from usb web cam.
 > and endcode to g726 adpcm.
 > 
 > if I would like to encode to g726 and sample rate is 8000Hz.
 > is it possible?

Did you try the aresample filter? (i.e. aresample=8000)
See the manual for details.

Another option is to directly capture at 8000 Hz, if that's
supported by your hardware and video4linux driver.  This
would be more efficient because ffmpeg doesn't have to do
the resampling.

If either way fails for you, please show us your command
line and the complete output.

Best regards
   Oliver


-- 
``We are all but compressed light'' (Albert Einstein)


More information about the ffmpeg-user mailing list