'ffmpeg hls muxer is missing codec info in master playlist when codecs are copied from input
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:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=77595,RESOLUTION=1280x720,CODECS="avc1.64001f,mp4a.40.2"
stream.m3u8
Instead I get 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.
Solution 1:[1]
That is because of -c copy; tell ffmpeg about video & audio CODECs and stream rates using -tag:v:0 hvc1 -b:v:0 2000k and -tag:a:0 mp4a -b:a:0 128k.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Bobesko |
