kmfklast.blogg.se

Ffmpeg gui hls
Ffmpeg gui hls











The limitation of size will come from the keyframe settings of the source. No decoding and encoding, just muxing.Īgain, we will keep the segment size down. ts format, and create the manifest m3u8 file. The key to this is to use the copy option -c copy, this will cause ffmpeg to demux, then mux into the new. For storing off say, 3 days of footage, we can also use ffmpeg to turn the rtsp stream into an hls feed, and at almost no cost to the cpu on a pi4 (2%). mostly, sometimes it will miss, and have to wait another 2 seconds for the next key frame.ĭon't need old files, so that is handled by the flag to delete -hls_flags delete_segments.Īll the details for hls and other formats can be found at įfmpeg -i -y -s 640x480 -c:v h264_omx -x264-params keyint=4 -b:v 192000 -r 2 -f hls -hls_time 2 -hls_list_size 5 -hls_delete_threshold 100 -hls_flags delete_segments The example below is 2 fps -r 2, so we update the key frame interval to be 4 -x264-params keyint=4 so every 2 seconds -hls_time 2, we get a key frame, this allows the split time of 2 seconds to work correctly. The default keyframe of ffmpeg for h264 is something like 120 frames. Spliting for ffmpeg encourages there to be a key frame. Going out, we want small files, and, we want them to split often. In this example, the input stream was the lower quality stream from a security camera, which was 640x480, 4fsp, 512K. This uses the hardware acceleration of the PI (wont work on say a PC). Specifically pay attention to the -c:v h264_omx video codec. There will be some delay, but if the files are short that ffmpeg creates, it will aid in scrubing, at the cost of making the manifest larger, and keep delay down within 20 seconds. Reencodeįor accessing on the public internet, the stream probably should not saturate the bandwidth of outbound connection. Service version of the examples are in the systemd folder. There are some key factors to minimuze delay, and prevent playback problems.

ffmpeg gui hls

If you are streaming from a camera, for HLS, at this time, use h264, as h265/hevc support for playback is very poor in most browsers.īut, it works on mobile, and PC, and can be very close to live (30 seconds or so). There is nothing novel about this, but it includes some leasons learned while researching all the information.













Ffmpeg gui hls