如果我使用以下ffmpeg命令爲加密的HLS流創建三個輸出,我如何能夠創建master.m3u8變體播放列表(帶有正確的BANDWIDTH)?如何爲我的加密子播放列表創建主m3u8播放列表(使用ffmpeg創建)?
./ffmpeg -re -i Test_1080p.mp4 \
-c:a aac -b:a 128k -c:v libx264 -s 1920x1080 -g 48 -keyint_min 48 -sc_threshold 0 -bf 3 -b_strategy 2 -b:v 7800k -maxrate 8600k -bufsize 7800k -f hls -hls_time 6 -hls_list_size 0 -hls_key_info_file enc.keyinfo ./1080p/index.m3u8 \
-c:a aac -b:a 128k -c:v libx264 -s 1280x720 -g 48 -keyint_min 48 -sc_threshold 0 -bf 3 -b_strategy 2 -b:v 4500k -maxrate 5000k -bufsize 4500k -f hls -hls_time 6 -hls_list_size 0 -hls_key_info_file enc.keyinfo ./720p/index.m3u8 \
-c:a aac -b:a 64k -c:v libx264 -s 640x360 -g 48 -keyint_min 48 -sc_threshold 0 -bf 3 -b_strategy 2 -b:v 730k -maxrate 800k -bufsize 730k -f hls -hls_time 6 -hls_list_size 0 -hls_key_info_file enc.keyinfo ./360p/index.m3u8
這是我發現的一些例子,但我認爲BANDWIDTH-Value對我的輸出文件不正確。我如何計算正確的帶寬?
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=150000,RESOLUTION=640x360
http://example.com/360p/index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=240000,RESOLUTION=1280x720
http://example.com/720p/index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=640000,RESOLUTION=1920x1080
http://example.com/1080p/index.m3u8
從蘋果variantplaylistcreator工具不會在這種情況下工作,因爲我需要的.plist文件,ffmpeg的不生成這些文件。
我想的ffmpeg不能創建生成的輸出文件master.m3u8播放列表..
你知道了嗎?我需要創建一個主.plist文件,但我也不能使用variantplaylistcreator:/ –