

Installing FFmpeg onto your machine will give you all of the aforementioned capabilities, however this article will focus on FFmpeg's Muxers. What is FFmpeg?įFmpeg is a multimedia framework able to " decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created". Ke圜DN helps accelerate HLS live streams by offering an Optimize for HLS option within all Pull Zones.įor those who have MP4 files and want to convert them to HLS, this article covers how to do so using FFmpeg as well as with an alternative software. HLS uses the HTTP protocol which allows users to stream from a regular web server as opposed to specialized streaming servers. 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.HTTP Live Streaming, or HLS, is a popular live-streaming and on demand video technology developed by Apple. 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.
