[FFmpeg-user] How to make hls muxer set codec information in master playlist when stream codecs are copied

dogan yazar doganyazar at gmail.com
Thu Sep 23 14:50:14 EEST 2021


ffmpeg hls muxer has the option to set master playlist but the created
playlist is missing the important codec information.

Example:
ffmpeg -hide_banner -i <input> -c copy -f hls -master_pl_name
master.m3u8  stream.m3u8

Expected master playlist:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=77595,RESOLUTION=1280x720,CODECS="avc1.64001f,mp4a.40.2"
stream.m3u8

Instead getting this:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=77595,RESOLUTION=1280x720
stream.m3u8

Is there a way to make ffmpeg set the codec info in playlist from the
input source? It works as expected if I encode the input using libx264
but I do not want to do any expensive encoding but copy the codecs
from the input.


More information about the ffmpeg-user mailing list