[FFmpeg-user] ffmpeg latency and lag combining audio and video on Raspberry Pi

Lou lou at lrcd.com
Fri Jun 12 20:43:40 CEST 2015


On Fri, Jun 12, 2015, at 04:32 AM, Neik wrote:
> I am trying to stream combined audio and video from a Raspberry Pi.
> 
> To capture video alone I use:
> 
> raspivid -o - -t 0 -n -w 1280 -h 720 -fps 25 | ffmpeg -thread_queue_size 
> 1024 -y -f h264 -framerate 25 -i - -vcodec copy -f mpegts 
> udp://44.0.0.95:1234

Console output missing.

> It takes 6 seconds for the streaming status line to appear. The video 
> then lags reality by about 2.3 seconds
> 
> Why does this delay occur? How can I reduce it to zero?
> 
> To combine video and audio I use:
> 
> raspivid -o - -t 0 -n -w 1280 -h 720 -fps 25 | ffmpeg -thread_queue_size 
> 1024 -y -f h264 -framerate 25 -i - -thread_queue_size 512 -f alsa -ac 1 
> -i hw:1 -vcodec copy -acodec mp3 -f mpegts udp://44.0.0.95:1234
> 
> The output is

Complete console output missing. This is required information.


More information about the ffmpeg-user mailing list