[FFmpeg-user] HTML5 live streaming

Hombibi hombibi at yahoo.com
Wed May 8 07:23:12 CEST 2013


Hi Andrew,

I use the MJPEG codec to select the compressed (mjpeg) stream from my webcam. I believe (...)  it requires a little less cpu and provides a little better picture quality than the raw video stream which is the other option.


On your comment on reducing latency: I see that you have configured the stream to have only two segments, with a length of 1 second. So aims this approach to reduce the available stale data as much as possible? Will try that. Thanks.



________________________________
 From: Andrew Sinclair <ajsinclair at gmail.com>
To: FFmpeg user questions <ffmpeg-user at ffmpeg.org> 
Sent: Wednesday, May 8, 2013 1:16 AM
Subject: Re: [FFmpeg-user] HTML5 live streaming
 

Hi Hombibi,

Why are you using MJPEG as the codec? Would be an unusual codec to find in
an x264 guide.

If you want to stream low latency HLS from a local capture use something
like this which just grabs the desktop:
ffmpeg -f x11grab -s `xdpyinfo | grep ‘dimensions:’|awk ‘{print $2}’` -r 25
-i :0.0 -pix_fmt yuv420p -vcodec libx264 -acodec libfaac -r 25 -profile:v
baseline -b:v 1500k -x264opts keyint=25 -s 640x360 -map 0 -flags
-global_header -f segment -segment_list index_1500.m3u8 -segment_time 1
-segment_format mpeg_ts -segment_list_type m3u8 -segment_list_flags +live
-segment_list_size 2 segment%05d.ts

A


More information about the ffmpeg-user mailing list