Using VLC to host an endless loop video stream

I want to offer a video stream from my computer with a VLC player through a WIFI network for smartphones for regression testing. The video will automatically restart at the beginning after the completion of work on the smartphone.

I am currently using rtsp as the protocol and loop option, but this is optional. The problem is that every time the video is reloaded, a new rtsp handshake is needed. Since most of the smartphone apps I tested do not support reconnecting the stream automatically after completion, I want only one handshake at a time.

vlc mypath\myvideo.mp4 sout=#transcode{vcodec=h264,acodec=none}:rtp{sdp=rtsp://:8554/} --loop 

thanks

+5
source share
2 answers

you need to use --sout-keep , which disables stream output (disabled by default)

and use the gather:std parameter and transcoding if the files use a different encoding so that there is no noticeable interruption when making changes.

cm

1: https://wiki.videolan.org/Documentation:Streaming_HowTo/Command_Line_Examples/#Keeping_the_stream_open

2: https://wiki.videolan.org/Documentation:Modules/gather/

0
source

Thanks for using tousez for free!

The gather:std setup worked fine for me. Below is the command line for RTSP with a playlist.

 cvlc --random --loop /var/www/html/files/test.xspf :sout=#gather:rtp{sdp=rtsp://:8554/} :network-caching=1500 :sout-all :sout-keep 

This is a streaming playlist randomly in an infinite loop. Hope this helps others.

0
source

Source: https://habr.com/ru/post/1201746/


All Articles