[MEncoder-users] Forcing audiorate import on ffmpeg
David Liontooth
liontooth at cogweb.net
Fri Jan 11 17:49:48 CET 2008
With mencoder, I can use audiorate for input and srate for output to
capture dmg sound from an saa7134 card directly to flash:
mencoder -tv
driver=v4l2:device=/dev/video2:fps=30000/1001:chanlist=us-cable:\
audiorate=32000:adevice=hw.2:alsa:input=0:amode=1:normid=4 -vf pp=lb
-ffourcc FLV1 -ovc lavc \
-lavcopts
vcodec=flv:autoaspect:vbitrate=800:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 \
-oac mp3lame -lameopts cbr:br=128 -srate 22050 -endpos $TIM -o
$DIR/$FIL.flv tv:// > /dev/null
Is there a way to achieve the same result with ffmpeg? Can I use
something like -oac? This attempt at using a sequence of codecs fails:
$ ffmpeg -ar 32000 -threads 2 -vd /dev/video2 -y -r ntsc -b 800 -s
640x480 -vcodec flv -threads 1 -pix_fmt yuv420p -g 300 -me epzs -qmin 2
-qmax 15 -deinterlace -ad /dev/dsp2 -acodec pcm_s16le -ar 32000 -ac 2
-acodec mp3 -ac 2 -ab 96 -async 50 -t 5 -f flv -y -ar 22050
/tmp/TEST_32000.flv
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2006 Fabrice Bellard, et al.
configuration: --prefix=/usr --libdir=${prefix}/lib
--shlibdir=${prefix}/lib --incdir=${prefix}/include/ffmpeg
--enable-shared --enable-mp3lame --enable-gpl --enable-faad
--mandir=${prefix}/share/man --enable-vorbis --enable-pthreads
--enable-faac --enable-xvid --enable-dts --enable-amr_nb --enable-amr_wb
--enable-pp --enable-libogg --enable-libgsm --enable-x264 --enable-a52
--extra-cflags=-Wall -g -fPIC -DPIC --cc=ccache cc
libavutil version: 49.3.0
libavcodec version: 51.32.0
libavformat version: 51.8.0
built on Feb 8 2007 10:09:03, gcc: 4.1.2 20061115 (prerelease)
(Debian 4.1.1-21)
[video4linux2 @ 0x2b700f20b160][4]Capabilities: 5010015
Input #0, video4linux2, from '':
Duration: N/A, bitrate: N/A
Stream #0.0: Video: rawvideo, yuv420p, 640x480, 110481 kb/s, 29.97 fps(r)
Input #1, audio_device, from '':
Duration: N/A, bitrate: N/A
Stream #1.0: Audio: pcm_s16le, 22050 Hz, stereo, 705 kb/s
Output #0, flv, to '/tmp/TEST_32000.flv':
Stream #0.0: Video: flv, yuv420p, 640x480, q=2-15, 0 kb/s, 29.97 fps(c)
Stream #0.1: Audio: mp3, 22050 Hz, stereo, 96 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #1.0 -> #0.1
Press [q] to stop encoding
frame= 155 q=31.0 Lsize= 604kB time=5.1 bitrate= 961.6kbits/s
video:538kB audio:60kB global headers:0kB muxing overhead 0.963668%
Cheers,
Dave
More information about the MEncoder-users
mailing list