0

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)

dravit
  • 553
  • 6
  • 16

1 Answers1

0

Based on the spec document both hls.js plugin and also the bitmovin player supports HEVC HLS format. You didn't mention about the browsers that you've tested. Based on my understanding, you can only playback HEVC/fmp4 HLS stream on safari browser. Worth testing that as well.

Djlynux
  • 91
  • 1
  • 7
  • I've tested this on both Chrome and Safari. On Chrome, they both throw errors. On Safari, while we do not get any errors, the players are still not able to play the streams. – dravit Jul 15 '21 at 19:56
  • If you can share your HLS link, I can take a look at the manifest and also the segments. I would also suggest you to run your hls output in [mediastreamvalidator](https://developer.apple.com/documentation/http_live_streaming/about_apple_s_http_live_streaming_tools) tool that will give you valuable insight. – Djlynux Jul 16 '21 at 03:02
  • I actually did that as well. Raised another question here with output from mediastreamvalidator https://superuser.com/q/1661921/1084556. – dravit Jul 16 '21 at 05:18