What I want to do?
Generate HVEC (h265
) HLS of a mp4
file.
What I already have tried?
I came across this post https://superuser.com/a/1416549/1084556. It first asks to convert h264
video to h265
format and then do the HLS packaging`.
So I ran
ffmpeg -hide_banner -y -i "original.mp4" -c:v libx265 -c:a copy -y -movflags +faststart -tag:v hvc1 "h265.mp4"
Above command is good enough to generate a h265
encoded video which is working on QuickTime Player on macOS.
Next I
ffmpeg -y -i h265.mp4 -c copy \
-hls_segment_type fmp4 -hls_time 6 -hls_list_size 10 \
-hls_flags delete_segments+append_list+split_by_time \
-hls_playlist_type vod hls.m3u8
Above command generated a few m4s
along with hls.m3u8
and init.mp4
files, which seems to be the expected behaviour but when I host the files and try to play it in any online media player, it doesn't work, and throws error
A media error occurred: bufferIncompatibleCodecsError
Player used (https://hls-js.netlify.app/demo/, https://bitmovin.com/demos/stream-test)