[FFmpeg-user] balancing image generator and FFMPEG 'loop'
Henk D. Schoneveld
belcampo at zonnet.nl
Sun Dec 8 11:45:49 CET 2013
On 08 Dec 2013, at 11:38, bino at indoakses-online.com wrote:
> Dear All ...
> I'm trying to get a cam snapshots and stream it out to ustream
> my solution is based on two things
> 1. Snapshot downloader :
> It's based on
> https://github.com/jpmeijers/pisstvbeacon/blob/master/AircamDownload.py ,
> and I make it to send request in loop.
> Currently with this script, new image will be generated each second
You do generate 1 frame every second. So framerate is 1 or in ffmpeg terms “-r 1”
Hope you now understand how to balance or NOT get rushing.
> Each image have a sequence number in it's name : pic01.jpg --> pic99.jpg
> 2. Streamer :
> ffmpeg -re -loop 1 -f image2 \
> -i "/var/run/snapshots/inaxtower/pic%02d.jpg" \
> -r 10 -vcodec libx264 -pix_fmt yuv420p \
> -f flv "rtmp://1.XXX.fme.ustream.tv/ustreamVideo/XXX/USTREAM_KEY
> Currently the result looks like 'rushing'.
> You can check my current result at : http://www.ustream.tv/channel/16636088
> Please put attention on the clock stamp at top-left of the movie, looked
> My Question is :
> How to balance image generation rate (script #1) with the ffmpeg rate ?
> I mean, what number should I put for image generation rate? ,and
> what number should I put for the value of ffmpeg '-r' ?
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
More information about the ffmpeg-user