我在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
}
发布于 2020-07-09 04:39:45
根据文档,目前不支持dash_variant。如果你想使用dash_variant,你可以用this模块构建nginx,它是实际模块的增强版本。
https://stackoverflow.com/questions/61390771
复制相似问题