I tried converting mp4 video to HLS for online streaming which I have successfully done using FFmpeg.
Command:
ffmpeg -i /var/www/html/file_conversion/heli.mp4 -map 0 -profile:v baseline -level 3.0 -s 640x360 -c:v libx264 -b:v 500k -c:a libfdk_aac -b:a 320k -hls_list_size 0 -start_number 0 -hls_init_time 0 -hls_time 2 -f hls /var/www/html/file_conversion/hlstest2/heli.m3u8
But now I am trying to convert the same video with multiple bitrates for dynamic adaptive streaming.
Any idea how can I achieve this?
I was having the same doubt, and found this article: https://dev.to/nodir_dev/transcode-video-source-to-hls-playlist-format-for-video-on-demand-vod-streaming-3h99
After making transcoding files, just create a *.m3u8 file, with the following content:
now just send this file to the streams.
My HLS folder:
The content of the master file:
I made the transcoding two resolutions: 1280x720 and 640x480
- Author of the article: Nodirbek Sharipov