

RTMP, the Real-Time Messaging Protocol, defines the fundamentals of most internet video streaming. In this tutorial, you will learn how to configure the Nginx web server to host an independent RTMP video stream that can be linked and viewed in different applications. While these platforms are very powerful, in some cases you may want to be able to host a stream that does not rely on other service providers. Service providers such as Twitch are very popular for handling the web discovery and community management aspects of streaming, and free software such as OBS Studio is widely used for combining video overlays from multiple different stream sources in real time. It looks like it works and the different players I've tried play the output video correctly, but of course it feels suboptimal: it takes a lot of time and the use of concat seem to be very artificial.There are many use cases for streaming video. So I end up by using filter_complex with concat: ffmpeg -i in.mkv -filter_complex ' concat=n=1:v=1:a=1 ' -map '' -map '' -f hls out.m3u8 My guess is that there is something wrong with -c copy (but frankly I don't quite understand what I'm doing). My next idea was to first convert in.mkv to in_tmp.mkv with only one audio stream and then use the gist above: ffmpeg -i in.mkv -map 0:v:0 -map -0:a:0 -c copy in_tmp.mkvįfmpeg -i in_tmp.mkv -c copy -f hls out.m3u8īut the result was identical to my previous attempt. I'm not sure why this solution doesn't work but depending on players and input files the video is not playing correctly (for example with hls.js the absence of the image is surrounded by only occasional sounds). I've then tried: ffmpeg -i in.mkv -map 0:v:0 -map -0:a:0 -c copy -f hls out.m3u8 I've tried different solutions with ffmpeg but non of them seem to be ideal.įor example ffmpeg -i in.mkv -codec: copy -f hls out.m3u8 from this gist works only if in.mkv has one audio stream (at least this is my understanding). I'm trying to convert some videos (in the different formats, e.g., mp4, mkv, avi) with multiple audio streams to HLS with only one audio.
