3

When a malformed URL is given to VLC through the "Open network stream" interface, the command like option "--open " or the Lua CLI command "add", the interface locks up and the console spits out the error message

[00007f31355cea20] filesystem stream error: cannot open file /home/paul/c (No such file or directory)
[00007f313c000c40] main input error: Your input can't be opened
[00007f313c000c40] main input error: VLC is unable to open the MRL 'file:///home/paul/c'. Check the log for details.

at a rate of multiple (hundred?) repetitions per second.

I assume the faulty item is added to the playlist and VLC keeps trying to play it back over and over.

How can I make it ignore this error?

My current ideas are hooking into the error to remove the last item added or having a preprocessor check whether VLC can actually open the resulting playlist item. How would I do this? Maybe this is only a configuration issue after all?

Thanks.

0

1 Answer 1

1

I thought this looks like a bug, my VLC (3.0.6) doesn't do that when opening via command line's --open or the gui's "open network stream"... but further testing with looping files or a playlist reveals that I think your vlc is set to loop files, but the only file your trying to open results in an error, so vlc tries the next file, that loops happens to be the same file again...

  • vlc --loop filedoesnotexist caused the same errors you're seeing. (Also trying to "play" a text file like vlc's --help output caused the error too, so even checking if a file exists won't necessarily ensure vlc won't have trouble).

Turning off looping stops the looping errors

  • vlc --no-loop filedoesnotexist only resulted in one error message, and no problems with still using vlc to open other files, etc.

My vlc does not default to looping, but it looks like yours does and it's probably causing the errors even without using the --loop flag. I'm not sure how to change the "default" of looping on/off though, mine just turns off looping if I close it when enabled. vlc -H (warning, it's +300k!) only mentions hot key loop options, and:

-L, --loop, --no-loop          Repeat all
                               (default disabled)
      VLC will keep playing the playlist indefinitely.

I'd argue it might still be a bug if a playlist is full of entries that all cause errors & don't play, but keeps looping through them over and over. If not a bug, at least a "feature request" to stop looping in case everything errors.

If looping can't be stopped, you could monitor vlc's log (might have to enable logging first) and if you (or your script) start seeing the same errors, or the file just starts uncontrollably growing, then kill the vlc process (plain pkill vlc looks effective).


[It appears plain bug reports might be off-topic, but figuring out a work-around for bugs looks on-topic...]

4
  • What platform are you on? I'm on Linux. I remember this bug having existed for about 5 years. I don't know which version of VLC player I'm exactly on, but it's above 3.0. My current workaround is starting it through a script with the CLI interface and immediately sending "stop" when it reads "error" (amazingly, though, it still manages to repeat the error multiple times). I suppose I'll file a bug report when I have the time.
    – Paul
    Commented Mar 11, 2019 at 11:55
  • Linux too, Debian stable (stretch) based MX-Linux. In a terminal vlc's first output line has the version & revision, but it also outputs a lot of extra info with vlc --version (man vlc is very sparse, but vlc --help outputs 20k, and vlc -H outputs 305k!). My vlc is from mx's stretch/main repo, but looks about the same as in debian's regular repo. Just to double-check, I used vlc fake to test from a terminal (with no file named fake). Actually I found an option that causes the "looping" error for me too, unsurprisingly it's --loop, editing into answer with a fix
    – Xen2050
    Commented Mar 11, 2019 at 18:50
  • It'd probably still be nicer for VLC to remove an unplayable item, but at least without looping it doesn't crash and burn. It's so obious in hindsight :D Thanks a lot.
    – Paul
    Commented Mar 15, 2019 at 16:29
  • Definitely, if it's not at least a "feature request" now, it should be. I'm still wondering why your vlc starts looping automatically & mine doesn't, couldn't find a save setting for it anywhere... not even changing looping and then changing another setting in the preferences & saving does it. Anyway, welcome :)
    – Xen2050
    Commented Mar 16, 2019 at 4:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .