使用 VLC 托管无限视频循环流 [英] Using VLC to host a stream of an infinite video loop
问题描述
我想将带有 VLC 播放器的电脑通过 WIFI 网络提供给智能手机的视频流,以进行回归测试.视频在智能手机上完成后应自动从头开始.
I want to offer a video stream from my pc with a VLC player trough a WIFI network to smartphones for regression testing. The video should automatically restart at the beginning after being finished on the smartphone.
我目前使用 rtsp 作为协议和循环选项,但这不是强制性的.问题是,每次视频重新启动时都需要新的 rtsp 握手.由于我测试的大多数智能手机应用程序不支持完成后自动重新连接流,我希望只有一次握手始终有效.
I'm currently using rtsp as protocol and the loop option, but this is no mandatory. The problem is, that every time the video restarts a new rtsp handshake is necessary. Since most of the smartphone apps I tested don't support reconnecting the stream automatically after being finished, I want to have only one handshake being valid all over the time.
vlc mypath\myvideo.mp4 sout=#transcode{vcodec=h264,acodec=none}:rtp{sdp=rtsp://:8554/} --loop
谢谢
推荐答案
你需要使用 --sout-keep
保持流输出打开(默认禁用)
you need to use --sout-keep
which keeps the stream output open (disabled by default)
如果文件使用不同的编码,则使用 gather:std
和转码选项,以便输入更改不会有任何明显的中断.
and use gather:std
and transcode option if the files use different encoding so that there wouldn't be any noticeable interruption on input change.
见:
2:https://wiki.videolan.org/Documentation:Modules/gather/
这篇关于使用 VLC 托管无限视频循环流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!