如何通过ffmpeg生成多速率mpeg-dash流 [英] How to generate multi rate mpeg-dash stream by ffmpeg
本文介绍了如何通过ffmpeg生成多速率mpeg-dash流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想创建具有多比特率的破折号流并将其提供. 我也想使用dash.js播放器的质量选择器. 就像图片一样:
I want to create dash stream with multi-bitrate and serve it. I also want to use the quality selector of dash.js player. like the picture:
生成.mpd文件需要什么标志和配置?
what flags and configuration I need for generating .mpd file?
推荐答案
使用以下命令,创建两个流,然后,可以将它们放入采用集而不是单独的流:
With the following command, you create two streams and after that, you can put them into adoption sets instead of seperate streams:
ffmpeg -i $INPUT.mp4 \
-map 0:v:0 -map 0:a:0 -map 0:v:0 -map 0:a:0 \
-b:v:0 250k -filter:v:0 "scale=-2:240" -profile:v:0 baseline \
-b:v:1 750k -filter:v:1 "scale=-2:480" -profile:v:1 main \
-use_timeline 1 -use_template 1 -window_size 5 \
-adaptation_sets "id=0,streams=v id=1,streams=a" -f dash $OUTPUT.mpd
这篇关于如何通过ffmpeg生成多速率mpeg-dash流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文