[FFmpeg-user] how to add WebCam Audio to output stream

Soho Soho123 soho123.2012 at gmail.com
Tue Jun 21 13:03:09 CEST 2011


Hi all,

I use the option below : I cannot get audio for output stream
Any one have idea?

# ffmpeg -intra -f oss -i /dev/dsp -ac 1 -acodec copy -f video4linux2 -vcodec mj
peg -r 30 -s 640x480 -i /dev/video0 -r 30 -vcodec copy http://localhost:8090/fee
d1.ffm
FFmpeg version 0.6.3, Copyright (c) 2000-2010 the FFmpeg developers
  built on Jun 21 2011 11:ALSA sound/usb/usbaudio.c:1338: 48setting
usb interface 3:1
:29 with gcc 3.4.6-1.3.6
  configuration: --enable-cross-compile --cALSA
sound/usb/usbaudio.c:1338: rosetting usb interface 3:4
ss-prefix=rsdk-linux- --arch=mips --target-os=linux --enable-small
--prefix=/home/bradhuang/sd9_usbip_new/0610_ffmpeg/uw
ifi-rtl819x-sdk-v2.4/users/stream_server/ffmpeg-0.6.3/romfs
--bindir=/home/bradhuang/sd9_usbip_new/0610_ffmpeg/uwifi-rtl
819x-sdk-v2.4/users/stream_server/ffmpeg-0.6.3/romfs --enable-pic
--disable-encoders --enable-encoder=mjpeg --enable-enc
oder=flv --enable-encoder=mpeg4 --disable-decoders
--enable-decoder=mjpeg --enable-decoder=flv --enable-decoder=mpeg4 --
enable-decoder=rawvideo --enable-encoder=rawvideo
--enable-decoder=vorbis --enable-encoder=vorbis --disable-hwaccels --d
isable-muxers --disable-demuxers --enable-muxer=rawvideo
--enable-muxer=mpegts --enable-muxer=ffm --enable-muxer=mov --e
nable-muxer=yuv4mpegpipe --enable-muxer=rtp --enable-muxer=flv
--enable-muxer=rtsp --enable-muxer=mjpeg --enable-muxer=m
pjpeg --enable-muxer=h264 --enable-muxer=h263
--enable-muxer=mpeg1video --enable-muxer=mpeg2video --disable-shared
--ena
ble-static --enable-demuxer=flv --enable-demuxer=mov
--enable-demuxer=rawvideo --enable-demuxer=ffm --enable-demuxer=mpe
gts --enable-demuxer=yuv4mpegpipe --enable-muxer=rm
--enable-demuxer=rm --enable-demuxer=sdp --enable-demuxer=rtsp --ena
ble-demuxer=mjpeg --enable-demuxer=mpjpeg --enable-demuxer=h264
--enable-demuxer=h263 --enable-demuxer=mpeg1video --enab
le-demuxer=mpeg2video --disable-parser=dvbsub --disable-parser=mlp
--disable-parser=vp3 --disable-parser=vc1 --disable-p
arser=pnm --disable-parser=dirac --disable-parser=pnm
--disable-parser=dca --disable-avfilter --disable-bsfs --disable-p
arser=mpegaudio --disable-parser=mpegvideo --disable-parser=aac
--disable-parser=ac3 --disable-parser=aac_latm --disable
-filters --disable-filter=buffer --disable-parser=dnxhd
--disable-parser=cavsvideo --disable-protocol=concat --disable-p
rotocol=rtmpte --disable-protocol=gopher --disable-protocol=applehttp
--disable-protocol=mmsh --disable-protocol=crypto
--disable-protocol=mmst --disable-protocol=rtmp
--disable-protocol=rtmpe --disable-protocol=rtmps
--disable-protocol=rtm
pt --enable-pthreads
  libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0.11. 0 /  0.11. 0
[oss @ 0x70ac50]max_analyze_duration reached
[oss @ 0x70ac50]Estimating duration from bitrate, this may be inaccurate
Input #0, oss, from '/dev/dsp':
  Duration: N/A, start: 1308679421.657824, bitrate: N/A
    Stream #0.0, 220, 1/1000000: Audio: 0x0000, 44100 Hz, 1 channels, 705 kb/s
[video4linux2 @ 0x70d1d0][4]Capabilities: 4000001
[video4linux2 @ 0x70d1d0]The V4L2 driver set input_id: 0, input: Camera 1
[mjpeg @ 0x70e3e0]marker=d8 avail_size_in_buf=10421
[mjpeg @ 0x70e3e0]buffer too small, expanding to 10421 bytes
[mjpeg @ 0x70e3e0]marker parser used 0 bytes (0 bits)
[mjpeg @ 0x70e3e0]marker=e0 avail_size_in_buf=10419
[mjpeg @ 0x70e3e0]marker parser used 32 bytes (256 bits)
[mjpeg @ 0x70e3e0]marker=db avail_size_in_buf=10384
[mjpeg @ 0x70e3e0]index=0
[mjpeg @ 0x70e3e0]qscale[0]: 16
[mjpeg @ 0x70e3e0]marker parser used 67 bytes (536 bits)
[mjpeg @ 0x70e3e0]marker=db avail_size_in_buf=10315
[mjpeg @ 0x70e3e0]index=1
[mjpeg @ 0x70e3e0]qscale[1]: 32
[mjpeg @ 0x70e3e0]marker parser used 67 bytes (536 bits)
[mjpeg @ 0x70e3e0]marker=c0 avail_size_in_buf=10246
[mjpeg @ 0x70e3e0]sof0: picture: 640x480
[mjpeg @ 0x70e3e0]component 0 2:1 id: 0 quant:0
[mjpeg @ 0x70e3e0]component 1 1:1 id: 1 quant:1
[mjpeg @ 0x70e3e0]component 2 1:1 id: 2 quant:1
[mjpeg @ 0x70e3e0]pix fmt id 21111100
[mjpeg @ 0x70e3e0]marker parser used 17 bytes (136 bits)
[mjpeg @ 0x70e3e0]marker=da avail_size_in_buf=10227
[mjpeg @ 0x70e3e0]escaping removed 7 bytes
[mjpeg @ 0x70e3e0]component: 0
[mjpeg @ 0x70e3e0]component: 1
[mjpeg @ 0x70e3e0]component: 2
[mjpeg @ 0x70e3e0]marker parser used 10219 bytes (81751 bits)
[mjpeg @ 0x70e3e0]marker=d9 avail_size_in_buf=0
[mjpeg @ 0x70e3e0]mjpeg decode frame unused 0 bytes
[video4linux2 @ 0x70d1d0]All info found
[video4linux2 @ 0x70d1d0]Estimating duration from bitrate, this may be
inaccurate
Input #1, video4linux2, from '/dev/video0':
  Duration: N/A, start: 1308679426.540000, bitrate: 0 kb/s
    Stream #1.0, 1, 1/1000000: Video: mjpeg, yuvj422p, 640x480, 1/30,
0 kb/s, 30 tbr, 1000k tbn, 30 tbc
url_open 129 filename:http://localhost:8090/feed1.ffm
http_open Enter
http_open_cnx Enter
ff_url_split Enter url:http://localhost:8090/feed1.ffm
http_open_cnx hostname=localhost,port=8090
url_open 129 filename:tcp://localhost:8090
ff_url_split Enter url:tcp://localhost:8090
tcp_open 50 hostname=localhost port=8090
tcp_open 59 retvalue=0
url_open 153 ret=0
    Last message repeated 1 times
Probed with size=2048 and score=101
url_open 129 filename:http://localhost:8090/feed1.ffm
http_open Enter
http_open_cnx Enter
ff_url_split Enter url:http://localhost:8090/feed1.ffm
http_open_cnx hostname=localhost,port=8090
url_open 129 filename:tcp://localhost:8090
ff_url_split Enter url:tcp://localhost:8090
tcp_open 50 hostname=localhost port=8090
tcp_open 59 retvalue=0
url_open 153 ret=0
stream_copy is selected, no need to decode or encode
    Last message repeated 1 times
Output #0, ffm, to 'http://localhost:8090/feed1.ffm':
  Metadata:
    encoder         : Lavf52.64.2
    Stream #0.0, 0, 1/1000000: Video: mjpeg, yuvj422p, 640x480, 1/30,
q=2-31, 0 kb/s, 1000k tbn, 30 tbc
Stream mapping:
  Stream #1.0 -> #0.0
Press [q] to stop encoding
frame=  883 fps= 30 q=-1.0 Lsize=   27000kB time=29.85 bitrate=7409.0kbits/s
video:26888kB audio:0kB global headers:0kB muxing overhead 0.416721%


More information about the ffmpeg-user mailing list