Q
Q
qq all2019-10-09 07:44:00
Windows
qq all, 2019-10-09 07:44:00

Auto restart VLC stream?

Good afternoon, there are 3 streams vlc
udp://230.1.1.1:1234
udp://230.1.1.2:1235
udp://230.1.1.3:1236
streams pull live video from the Internet (i.e. I have a link to the m3u8 playlist ) after a short work of 6-7 hours, the picture in the vlc stream hangs and does not continue further, if you open the playlist url, then everything works, after restarting the stream it works again for a while, please tell me is it possible to automate the process of starting the stream and restarting after a time interval? tests pass both on win and ubuntu.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Bobylev, 2019-10-17
@ShturmN

Crutch:
Doing a script:

#!/usr/bin/perl
    $test = `/bin/ps xawff |/bin/grep vlc |/bin/grep -v grep| /usr/bin/wc -l`;
    chomp $test;
    `echo $test > /tmp/online.log`;
    if ($test eq "0") {
`<запуск потока>`;
`date >> /var/log/online.log`;
};
exit 0

And pull it on the crown every couple of minutes.
The second option is to run it in the form of a script like this:
#!/usr/bin/perl
    while (1) {
`date >> /var/log/online.log`;
`<запуск потока>`;
    }
exit 0

You can periodically shoot at the crown what you launched inside.
There was a moment, I needed to make an online broadcast of one channel with a multicast at hand with this channel. And urgently and without any resources at hand. Just out of shit and sticks. I did the broadcast in the following way: I clung to the multicast via ffmpeg and squeezed the stream into a lower quality video and audio and broadcast it to the input of isecast2 on a remote server in the hosting world. And from it I already dumped it into the flash player on the site and next to it I put a playlist for vlc. In principle, it turned out pretty stable.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question