[FFmpeg-user] Very high latency of RTMP laptop webcam
Moritz Barsnick
barsnick at gmx.net
Fri Dec 9 15:59:13 EET 2016
On Fri, Dec 09, 2016 at 15:26:01 +0500, Syed Hamid Rasool wrote:
> ffmpeg -rtbufsize *500M* -r 30 -f dshow -s 640x360 -i video="HP Truevision
> HD" -vcodec *h264* -b:a *300k* -f flv "rtmp://10.3.93.118:1935/transcode/key"
> Also even though I have tried setting -b:a option to around 600k, the
> transmitted rate of produced frames are in the range of 2500-4000 kbps.
As noted on StackOverflow, you are trying to set the *audio* bitrate.
That won't restrict the video bitrate. Use "-b:v" for video.
> I even added -tune zerolatency and -preset ultrafast/basic options but in
> all cases I am getting 8-10 seconds delay in LOCAL network.
Have you read
https://trac.ffmpeg.org/wiki/StreamingGuide#Latency
??
The very first paragraph is certainly of interest: Reduce the size of a
GOP (group of pictures), i.e. the interval between I-frames. x264
defaults to 250 (I believe), you may want to use "-g 25" or something
like that.
And there's an important paragraph in there regarding "-rtbufsize":
more buffer means more delay, of course!
Please let us know whether this helps.
Moritz
More information about the ffmpeg-user
mailing list