VLC fails network stream in Ubuntu 22.04
https://askubuntu.com/questions/1560218/vlc-fails-network-stream-in-ubuntu-22-04
I use VLC to monitor a DVR via RTSP. Suddenly it stopped connecting. I have tried everything I can find, but it still fails to connect.
VLC version is 3.0.16 Vetinari. It used to work, then about a week ago, it started to fail, giving:
"Your input can't be opened: VLC is unable to open the MRL
rtsp://192.168.1.195:554/ch04/0. Check the log for details."
I have tried removing and reinstalling, both with Symantic and sudo apt install, which I think means snap. I tried sudo apt-get install, but it makes no difference. I have a log output, very long, but I cannot understand what it is telling. I can post it if it would help.
This first started on my daily-use Desktop, for a day the backup laptop worked, then it also failed. I assume there was some kind of update that borked it. The laptop has 3.0.20 Vetinari.
EDIT
I followed the instructions in Sotirov's answer, but it did not solve the problem. After doing exactly what I was told, the command: vlc rtsp://192.168.1.195:554/ch04/0 led to the usual hint as to how to get 'help', and also it opened vlc with, again, the same fault as before.
Rebooting made no difference. I am thinking of seeing if I can install an earlier version of vlc, to see if that helps.
I think this is 'editing my question post'. If not, I can only apologise.
Results:
david@desktop-2:~$ which vlc
/usr/bin/vlc
david@desktop-2:~$ vlc rtsp://192.168.1.195:554/ch04/0
VLC media player 3.0.16 Vetinari (revision 3.0.13-8-g41878ff4f2)
VLC media player 3.0.16 Vetinari
Command Line Interface initialized. Type `help' for help.
and it waited for input.
This time, it did not launch vlc, which it did before.
Results from just now:
david@desktop-2:~$ sudo apt remove vlc
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'vlc' is not installed, so not removed
0 to upgrade, 0 to newly install, 0 to remove and 11 not to upgrade.
david@desktop-2:~$ sudo apt autoremove
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 11 not to upgrade.
david@desktop-2:~$ sudo snap install vlc
snap "vlc" is already installed, see 'snap help refresh'
david@desktop-2:~$ snap refresh
All snaps up to date.
david@desktop-2:~$ vlc rtsp://192.168.1.195:554/ch04/0
VLC media player 3.0.16 Vetinari (revision 3.0.13-8-g41878ff4f2)
VLC media player 3.0.16 Vetinari Command Line Interface initialized.
Type `help' for help.
I rebooted, and then did the same command:
david@desktop-2:~$ vlc rtsp://192.168.1.195:554/ch04/0
VLC media player 3.0.16 Vetinari (revision 3.0.13-8-g41878ff4f2)
VLC media player 3.0.16 Vetinari
Command Line Interface initialized. Type `help' for help.
I just repeated the whole list of commands again, including: sudo snap install vlc. Then rebooted. Output of next attempt:
david@desktop-2:~$ which vlc
/usr/bin/vlc
david@desktop-2:~$ vlc rtsp://192.168.1.195:554/ch04/0
VLC media player 3.0.16 Vetinari (revision 3.0.13-8-g41878ff4f2)
VLC media player 3.0.16 Vetinari Command Line Interface initialized.
Type `help' for help.
It did not laucnch vlc.
I returned to the original question, and then went to the first Edit I could find below that. Otherwise I don't know where to add information.
Result of latest instruction:
"/snap/bin/vlc rtsp://192.168.1.195:554/ch04/0
".
There was no response, it's till just sitting there waiting for something. It only changed when I stopped it with Cntrl-C.
"/snap/bin/vlc" does nothing, cursor sits there flashing.
So, yes, it seems that the snap version is not being installed despite the vommand to do so being correct. Is there another way to install it? A snap-store, or similar?
But I jst checked with Navigator, and the file /snap/bin/vlc exists. Curiouser and curiouser.
I tried something else.
- Using Synaptic, I removed everthing vlc.
- Back at the terminal, I then did this:
david@desktop-2:~$ sudo snap install vlc
[sudo] password for david:
snap "vlc" is already installed, see 'snap help refresh'
david@desktop-2:~$
david@desktop-2:~$ sudo snap refresh
All snaps up to date.
david@desktop-2:~$ sudo snap remove vlc
vlc removed (snap data snapshot saved)
david@desktop-2:~$ sudo snap install vlc
vlc 3.0.20-1-g2617de71b6 from VideoLAN✓ installed
david@desktop-2:~$ /snap/bin/vlc rtsp://192.168.1.195:554/ch04/0
^C {NO ACTION}.
david@desktop-2:~$ vlc
bash: /usr/bin/vlc: No such file or directory
david@desktop-2:~$ cd /snap/bin
david@desktop-2:/snap/bin$ ls
firefox get-iplayer.get-iplayer-cgi
firefox.geckodriver snap-store
geckodriver snap-store.ubuntu-software
get-iplayer snap-store.ubuntu-software-local-file
get_iplayer vlc
get_iplayer.cgi zoom-client
firefox get-iplayer.get-iplayer-cgi
firefox.geckodriver snap-store
geckodriver snap-store.ubuntu-software
get-iplayer snap-store.ubuntu-software-local-file
get_iplayer vlc
get_iplayer.cgi zoom-client
Is there any point in removing vlc from /snap/bin, and then re-installing? At he moment, vlc is said to be installed, but does not open. /snap/bin/vlc exists, but does not launch.