<div dir="ltr"><div><div><div><div>Hi All,<br><br></div>I use ffmpeg + ffserver to support a stream server.<br></div>but there is a big problem when Audio + video.<br></div>both audio and video are use "stream copy" option. <br>
</div><div>I can use ffplay to play the rtp stream  by the url "rtsp://<a href="http://192.168.1.254:5554/test1-rtsp.mpg">192.168.1.254:5554/test1-rtsp.mpg</a>"<br><br></div>the conf of ffserver is :<br><br><Stream test1-rtsp.mpg><br>
Feed feed2.ffm<br>Format rtp<br>AVOptionVideo flags +global_header<br>VideoSize 1280x720<br>VideoFrameRate 30<br>VideoCodec libx264<br><br>AVOptionAudio flags +global_header<br>AudioCodec pcm_s16be<br>AudioChannels 2<br>AudioSampleRate 48000<br>
</Stream><br><div><div><div><br></div><div>the ffmpeg command is :<br>ffmpeg -sn -f video4linux2 -r 30 -s 1280x720 -input_format h264 -i /dev/video1 -f alsa -ar 48000 -ac 2 -i hw:0 -vcodec copy -acodec copy -map 0:0 -map 1:0 <a href="http://localhost:8090/feed2.ffm">http://localhost:8090/feed2.ffm</a><br>
<br></div><div>Audio is played earlier than video about 3~5 seonds or more than 5 seconds.<br></div><div>why Audio will be playied for a few seconds?<br><br></div><div>I can see , ffmpeg capture the data from USB webcam and USB sound card by interleaved<br>
</div><div>Is there any option can be used for fine tune ?<br></div><div>Any input is very appreciated!!!<br></div><div><br></div><div><br><br><br></div></div></div></div>