【发布时间】:2020-04-23 15:18:14
【问题描述】:
我在 nginx 中的 dash 应用程序遇到了一个奇怪的问题。如果我不在下面的代码中包含 dash_variant 行,一切正常。第二次我取消注释,nginx 配置失败,unknown directive "dash_variant"。我正在寻找添加dash_variant 指令,以便我可以根据用户带宽/连接的质量拥有不同的比特率流。任何帮助将不胜感激!提前致谢!
application dash {
allow play all;
live on;
#record all;
record off;
record_path videos;
record_unique on;
#allow publish <your_sender_ip_here>;
#allow publish 127.0.0.1;
#deny publish all;
meta copy;
wait_key on;
wait_video on;
idle_streams off;
# Dash settings and pushing towards repeaters
dash on;
dash_nested on;
dash_path /tmp/dash;
dash_fragment 3;
dash_playlist_length 20;
dash_cleanup on;
#dash_clock_compensation http_head;
#dash_clock_helper_uri https://localhost/time;
dash_variant _low bandwidth="500000" width="640" height="360";
dash_variant _med bandwidth="1500000" width="1280" height="720";
dash_variant _high bandwidth="5000000" width="1920" height="1080" max;
#push rtmp://localhost/hls/hls; // it goes to generate a HLS streaming
}
【问题讨论】: