- #FFMPEG LIBRARY FOR RSO DDL HOW TO#
- #FFMPEG LIBRARY FOR RSO DDL FULL#
- #FFMPEG LIBRARY FOR RSO DDL PASSWORD#
f hls -hls_time 4 -hls_playlist_type event stream.m3u8 Putting all arguments together (the order of the parameters is important first the input stuff, then the encodings and at the end the output format information) will create the following statement. This contains a list of all available segments and is the main file for the player. Stream.m3u8 is the name of the playlist file. This gives the user the option to go back in the stream (DVR/re-live) or to pause the live stream. Using this command no segments are deleted. Older segments are automatically deleted. Usually the HLS livestream contains only the last x segments. hls_playlist_type event tells HLS to not remove old segments. Apple recommends a duration of 6 seconds. The default value in FFmpeg is 2 seconds. hls_time 4 slices the video and audio into segments with a duration of 4 seconds. We’d like to have HLS as the output format. ac 2 specifies the number of audio channels. 128k is also the default value for AAC if you don’t specify one. This parameter enforces a constant bitrate for the audio stream. Later we will support mp3 as additional audio stream for backwards compatibility. Similar to the video encoding we start with one audio stream. For ondemand content you should choose a slower preset.Īll x264 options on FFmpeg are documented under: Audio Encoding All presets are listed in this wiki article. Since we’re producing a livestream here veryfast or superfast is a good choice. A faster preset produces larger files but ist faster. preset veryfast tells the encoder to prefer a fast encoding instead of better video compression. Here you need to decide between video quality and file size (lower value = better quality = larger files) Here we use the x264 codec to have a h264 output format. HLS can dynamically switch between different qualities based on the available bandwidth of the client. Later it should be extended to support also lower resolutions.
#FFMPEG LIBRARY FOR RSO DDL FULL#
In the first step, I just want to have a full HD video feed. Now our server receives the stream so it’s time to start encoding our video. Link to documentation of the RTMP source: Video Encoding
#FFMPEG LIBRARY FOR RSO DDL PASSWORD#
usename and password login or defining a different port. There are a lot of other useful options for the rtmp protocol e.g. In our case it’s a rtmp source defined with our domain and a stream name. listen 1 tells FFmpeg to use the RTMP protocol as a server and wait for incoming connections So we’re starting with our fist parameters of the FFmpeg command: -listen 1 -i rtmp:///stream01 RTMP is a common used protocol for this and it’s supported by most of the streaming clients.
#FFMPEG LIBRARY FOR RSO DDL HOW TO#
h264, aac, mp3) and to know, how to use a command line. To be a able to follow my this article with using FFmpeg you should have basic knowledge about audio and video, the difference between container format (e.g. So be sure, that you use a fresh release. During the next steps I will use features that are only available since version 4.0. Requirementsįirst of all a new version of FFmpeg is required. Some things might have changed and might not be up to date. This article contains all my personal experience with HLS in FFmpeg. The data is delivered over a HTTP/HTTPS connection, so it can be also perfectly cached on server side or used in combination with an CDN. You can split audio and video into separate files, multiple audio and video streams for different formats and qualities are possible, easy to read and built in support on Apple devices (iOS, MacOS and tvOS). HLS itself is very awesome protocol for live streams. My goal was to setup my own streaming server that provides a video livestream using the HLS protocol ( Apple HTTP Live Streaming). Follow the link here to get an overview over all articles.