Opened 11 days ago

Last modified 9 days ago

#7480 new defect

HEVC codec info string

Reported by: tbucher Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: hls
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


ffmpeg -f lavfi -i testsrc -t 4 -c:v libx265 -tag:v hvc1 -x265-params no-opengop=1:no-scenecut=1:keyint=100:strict-cbr=1 -b:v 3M -bufsize 1500k -vf scale=-2:1080,format=yuv420p -use_timeline 1 -use_template 1 -single_file 0 -adaptation_sets "id=0,streams=0" -seg_duration 4 -hls_playlist 1 -init_seg_name "init_$RepresentationID$.m4s" -media_seg_name "seg_$RepresentationID$_$Number%06d$.m4s" -y -f dash manifest.mpd

should insert proper codec info string for HEVC both into master.m3u8 and manifest.mpd.

However, even though the tag is forced as hvc1, the resulting codec info string is hev1 in both manifest types, which is ignoring the forced tag or generated hvc1 box and it is not complete as specified by ISO, it is missing profile, level, etc.

resulting truncated master.m3u8

resulting truncated manifest.mpd
<Representation id="0" mimeType="video/mp4" codecs="hev1" bandwidth="3000000" width="1440" height="1080" frameRate="25/1">

Especially m3u8 is now problematic since native decoder in Safari is refusing such m3u8 playlist.
Inserting CODECS tag into master.m3u8 playlist is a recently commited feature, removing this tag or replacing the hev1 value with one based on ISO makes the stream in Safari playable again.

Not including FFmpeg log as it is irrelevant.

Change History (4)

comment:1 Changed 10 days ago by tbucher

  • Keywords hls mpeg-dash hevc added

comment:2 Changed 9 days ago by cehoyos

  • Keywords mpeg-dash hevc removed

comment:3 Changed 9 days ago by j_karthic

I have just now sent a patch to include the forced tag hvc1 instead of hev1.

Will the above patch solve this playout issue? Or does it require the profile, level etc., If it requires profile, level could you please point me to relevant spec, so that I can try to implement it.

comment:4 Changed 9 days ago by tbucher

Thank you.

With regards to the rest, yes, Apple apparently requires the whole codec info based on my trial & error attempts as long as native Safari player is involved, playback via MSE in Safari is more lenient.
I've cobbled up the codec info for my succesful playback based on This page lists ISO/IEC 14496-15 as the standard the development should refer to.

Note: See TracTickets for help on using tickets.