[FFmpeg-trac] #8904(ffmpeg:new): HLS missing CODECS for H.265 streams

FFmpeg trac at avcodec.org
Tue Sep 22 08:09:46 EEST 2020


#8904: HLS missing CODECS for H.265 streams
-------------------------------------+-------------------------------------
             Reporter:  command_tab  |                     Type:
                                     |  enhancement
               Status:  new          |                 Priority:  normal
            Component:  ffmpeg       |                  Version:
                                     |  unspecified
             Keywords:  hls          |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 When encoding media using ffmpeg for multiple HLS streams, the master
 playlist does not include the CODECS attribute for H.265 videos, but it
 ''does'' for H.264 videos. Here's a contrived command I'm running:

 {{{
 ffmpeg \
 -i INPUT.mov \
 -i INPUT.mov \
 -i INPUT.mov \
 -i INPUT.mov \
 -s:v:0 1920x1080 -c:a:0 aac -b:a 192k -c:v:0 libx265 -b:v:0 4000k \
 -s:v:1 1280x720 -c:a:1 aac -b:a 160k -c:v:1 libx265 -b:v:1 2000k \
 -s:v:2 854x480 -c:a:2 aac -b:a 160k -c:v:2 libx264 -b:v:2 1000k \
 -s:v:3 640x360 -c:a:3 aac -b:a 128k -c:v:3 libx264 -b:v:3 600k \
 -map 0:a \
 -map 0:v \
 -map 1:a \
 -map 1:v \
 -map 2:a \
 -map 2:v \
 -map 3:a \
 -map 3:v \
 -var_stream_map "v:0,a:0 v:1,a:1 v:2,a:2 v:3,a:3" \
 -threads 0 \
 -f hls \
 -movflags frag_keyframe \
 -hls_flags single_file \
 -hls_segment_type mpegts \
 -hls_list_size 0 \
 -hls_time 2 \
 -hls_allow_cache 1 \
 -master_pl_name index.m3u8 \
 -y \
 master_%v.m3u8
 }}}

 After the command runs successfully, index.m3u8 contains:

 {{{
 #EXTM3U
 #EXT-X-VERSION:4
 #EXT-X-STREAM-INF:BANDWIDTH=4540800,RESOLUTION=1920x1080
 master_0.m3u8

 #EXT-X-STREAM-INF:BANDWIDTH=2340800,RESOLUTION=1280x720
 master_1.m3u8

 #EXT-X-STREAM-
 INF:BANDWIDTH=1240800,RESOLUTION=854x480,CODECS="avc1.64001e,mp4a.40.2"
 master_2.m3u8

 #EXT-X-STREAM-
 INF:BANDWIDTH=800800,RESOLUTION=640x360,CODECS="avc1.64001e,mp4a.40.2"
 master_3.m3u8
 }}}

 The H.264 streams have a CODECS attribute, but the H.265 streams do not.
 According to [Apple's documentation
 https://developer.apple.com/documentation/http_live_streaming/example_playlists_for_http_live_streaming/creating_a_master_playlist],
 the CODECS attribute is not required, but is recommended.

 Since the logic for producing the attribute is already present for H.264
 streams, could it be enabled for H.265 streams as well?

 I've observed the current behavior with ffmpeg 4.3.1 under macOS Catalina
 10.15.6 (19G2021).
 {{{
 configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1 --enable-shared
 --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-
 cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl
 --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame
 --enable-libopus --enable-librav1e --enable-librubberband --enable-
 libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora
 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp
 --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid
 --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r
 --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb
 --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr
 --enable-videotoolbox --disable-libjack --disable-indev=jack
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8904>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list