Hi All, <br><br><br>I got the problem when I try to capture audio + video from USB web cam by ffmepg.<br>the problem is audio can not play when I use VLC to play the stream that ffserver output.<br>the question is : <br>I use ffmepg the encode audio to "wmav1" but, I can see the log that is output by audio filter.<br>
the audio format is "fltp".<br>What is "fltp"? Does anyone have idea?<br><br>the log is :<br>ffmpeg -loglevel debug -f video4linux2 -r 30 -s 640x480 -input_format h264 -i <br>/dev/video1 -f alsa -ar 48000 -ac 2 -i hw:0 -vcodec copy -acodec wmav1 <a href="http://l">http://l</a><br>
ocalhost:8090/feed1.ffm <br>ffmpeg version 2.0 Copyright (c) 2000-2013 the FFmpeg developers<br> built on Jul 31 2013 14:26:37 with gcc 4.4.5-1.5.5p4 (GCC)<br> configuration: --enable-cross-compile --cross-prefix=sdk-linux- --arch=mips --target-os=linux --disable<br>
-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-mips32r2 --dis<br>able-ffplay --disable-postproc --disable-runtime-cpudetect --disable-swscale-alpha --disable-mipsdspr1 --d<br>isable-mipsdspr2 --disable-mipsfpu --enable-small --prefix=/ffmpeg-2.0/romfs --bindir=/ffmpeg-2.0/romfs --disable-bsfs --disable-filters --enable-gpl --enab<br>
le-libfaac --enable-nonfree --enable-libx264 --extra-cflags=-I/ShareLib_Install/bin/../include --extra-libs='-L/ShareLib_Install/bin/../lib -lx264' --enable<br>-filter='aformat,aresample,copy,format,fps,framestep,resample' --disa libavutil 52. 38.100 / 52. 38.<br>
100<br> libavcodec 55. 18.102 / 55. 18.102<br> libavformat 55. 12.100 / 55. 12.100<br> libavdevice 55. 3.100 / 55. 3.100<br> libavfilter 3. 79.101 / 3. 79.101<br> libswscale 2. 3.100 / 2. 3.100<br>
libswresample 0. 17.102 / 0. 17.102<br>Splitting the commandline.<br>Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.<br>Reading option '-f' ... matched as option 'f' (force format) with argument 'video4linux2'.<br>
Reading option '-r' ... matched as option 'r' (set frame rate (Hz value, fraction or abbreviation)) with a<br>rgument '30'.<br>Reading option '-s' ... matched as option 's' (set frame size (WxH or abbreviation)) with argument '640x48<br>
0'.<br>Reading option '-input_format' ... matched as AVOption 'input_format' with argument 'h264'.<br>Reading option '-i' ... matched as input file with argument '/dev/video1'.<br>
Reading option '-f' ... matched as option 'f' (force format) with argument 'alsa'.<br>Reading option '-ar' ... matched as option 'ar' (set audio sampling rate (in Hz)) with argument '48000'.<br>
Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '2'.<br>Reading option '-i' ... matched as input file with argument 'hw:0'.<br>Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with a<br>
rgument 'copy'.<br>Reading option '-acodec' ... matched as option 'acodec' (force audio codec ('copy' to copy stream)) with a<br>rgument 'wmav1'.<br>Reading option '<a href="http://localhost:8090/feed1.ffm">http://localhost:8090/feed1.ffm</a>' ... matched as output file.<br>
Finished splitting the commandline.<br>Parsing a group of options: global .<br>Applying option loglevel (set logging level) with argument debug.<br>Successfully parsed a group of options.<br>Parsing a group of options: input file /dev/video1.<br>
Applying option f (force format) with argument video4linux2.<br>Applying option r (set frame rate (Hz value, fraction or abbreviation)) with argument 30.<br>Applying option s (set frame size (WxH or abbreviation)) with argument 640x480.<br>
Successfully parsed a group of options.<br>Opening an input file: /dev/video1.<br>[video4linux2,v4l2 @ 0x71ed30] fd:3 capabilities:4000001<br>[video4linux2,v4l2 @ 0x71ed30] Current input_channel: 0, input_name: Camera 1<br>
[video4linux2,v4l2 @ 0x71ed30] Setting time per frame to 1/30<br>[h264 @ 0x71f990] Frame num gap 9 7<br>[video4linux2,v4l2 @ 0x71ed30] All info found<br>Input #0, video4linux2,v4l2, from '/dev/video1':<br> Duration: N/A, start: 147.060000, bitrate: N/A<br>
Stream #0:0, 8, 1/1000000: Video: h264, yuv420p, 640x480, 1/2000000, -5 kb/s, 30 fps, 30 tbr, 1000k tb<br>n, 2000k tbc<br>Successfully opened the file.<br>Parsing a group of options: input file hw:0.<br>Applying option f (force format) with argument alsa.<br>
Applying option ar (set audio sampling rate (in Hz)) with argument 48000.<br>Applying option ac (set number of audio channels) with argument 2.<br>Successfully parsed a group of options.<br>Opening an input file: hw:0.<br>
Guessed Channel Layout for Input Stream #1.0 : stereo<br>Input #1, alsa, from 'hw:0':<br> Duration: N/A, start: 1375284807.118875, bitrate: 1536 kb/s<br> Stream #1:0, 1, 1/1000000: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s<br>
Successfully opened the file.<br>Parsing a group of options: output file <a href="http://localhost:8090/feed1.ffm">http://localhost:8090/feed1.ffm</a>.<br>Applying option vcodec (force video codec ('copy' to copy stream)) with argument copy.<br>
Applying option acodec (force audio codec ('copy' to copy stream)) with argument wmav1.<br>Successfully parsed a group of options.<br>Opening an output file: <a href="http://localhost:8090/feed1.ffm">http://localhost:8090/feed1.ffm</a>.<br>
[ffm @ 0x7f2ff0] Format ffm probed with size=2048 and score=101<br>[AVIOContext @ 0x7f7590] Statistics: 4096 bytes read, 0 seeks<br>Wed Jul 31 15:33:27 2013 127.0.0.1 - - [GET] "/feed1.ffm HTTP/1.1" 200 4175<br>
Successfully opened the file.<br>detected 1 logical cores<br>[graph 0 input from stream 1:0 @ 0x7f3440] Setting 'time_base' to value '1/48000'<br>[graph 0 input from stream 1:0 @ 0x7f3440] Setting 'sample_rate' to value '48000'<br>
[graph 0 input from stream 1:0 @ 0x7f3440] Setting 'sample_fmt' to value 's16'<br>[graph 0 input from stream 1:0 @ 0x7f3440] Setting 'channel_layout' to value '0x3'<br>[graph 0 input from stream 1:0 @ 0x7f3440] tb:1/48000 samplefmt:s16 samplerate:48000 chlayout:0x3<br>
[audio format for output stream 0:0 @ 0x79c700] Setting 'sample_fmts' to value 'fltp'<br>[audio format for output stream 0:0 @ 0x79c700] Setting 'sample_rates' to value '48000'<br>[audio format for output stream 0:0 @ 0x79c700] Setting 'channel_layouts' to value '0x3'<br>
[audio format for output stream 0:0 @ 0x79c700] auto-inserting filter 'auto-inserted resampler 0' between <br>the filter 'Parsed_anull_0' and the filter 'audio format for output stream 0:0'<br>[AVFilterGraph @ 0x812790] query_formats: 4 queried, 9 merged, 3 already done, 0 delayed<br>
[auto-inserted resampler 0 @ 0x811210] ch:2 chl:stereo fmt:s16 r:48000Hz -> ch:2 chl:stereo fmt:fltp r:480<br>00Hz<br>Output #0, ffm, to '<a href="http://localhost:8090/feed1.ffm">http://localhost:8090/feed1.ffm</a>':<br>
Metadata:<br> creation_time : now<br> encoder : Lavf55.12.100<br> Stream #0:0, 0, 1/1000000: Audio: wmav1, 48000 Hz, stereo, fltp, 128 kb/s<br> Stream #0:1, 0, 1/1000000: Video: h264, yuv420p, 640x480, 1/30, q=2-31, -5 kb/s, 30 fps, 1000k tbn, 30<br>
tbc<br>Stream mapping:<br> Stream #1:0 -> #0:0 (pcm_s16le -> wmav1)<br> Stream #0:0 -> #0:1 (copy)<br>Press [q] to stop, [?] for help<br>[alsa @ 0x8174e0] ALSA buffer xrun.<br> Last message repeated 1 times Last message repeated 2 times Last message repeated 3 times<br>