Has anyone been able to configure Manjaro KDE to invoke vlc to open a deeplinked timecoded link?

I’m trying to figure out how to get a URI like vlc://path/to/audio.mp3#t=120 (timecoded) to work. Any ideas ?

Edit: typo

Assuming you have read VLC HowTo/Jump to a certain time - VideoLAN Wiki

1 Like

Yes. Thank you. That solution is for the CLI though :frowning:

What is it that you want to do?

Send someone else a time coded link to a media file hosted somewhere
(not on their or your machine)?
What would that have to do with KDE/Plasma?

Why would you assume that the receiver of the link has a particular player (vlc) installed to play back that media file?
(just for example:
I don’t even have vlc installed - the link wouldn’t be useful or working for me no matter whether it was “correct” or not)

2 Likes

@anon33601770 I’m trying to trigger VLC as a link within an application (Joplin). This seems KDE related because I’m tring to associate the vlc:// URI with VLC

I do not understand your explanation.
Someone else might.

(you didn’t actually answer my questions btw … )

This command might do the job:

xdg-mime default vlc.desktop x-scheme-handler/vlc

The information was sourced from: Open Link With Vlc From Browser | Web Peak

Linux Setup

Linux users can register their own protocol handler in the desktop environment:

xdg-mime default vlc.desktop x-scheme-handler/vlc

Once this is registered, apps and browsers understand that vlc:// links must open with VLC.

I can’t test it myself as I don’t have vlc installed on my system, but I can’t see why it wouldn’t work, since most (all?) desktop environments use xdg-open to decide which application should open a certain MIME type.

Done.

Then I ran xdg-open vlc://01%20Title1%20-%20Chapter%2001.mp3 and I get:

qt.qpa.services: Failed to register with host portal QDBusError(“org.freedesktop.portal.Error.Failed”, “Could not register app ID: App info not found for ‘org.kde.’”)

and
Browser opens trying to find http://vlc//01%20Title1%20-%20Chapter%2001.mp3

Try updating your MIME database & then see if xdg-open works for the vlc:// link:

update-mime-database ~/.local/share/mime 
1 Like

Done. Tried again and getting the same response as above :disappointed_face:

I’m stumped. To test the issue & my earlier recommended procedures, I ended up installing vlc and vlc-plugins-all onto my machine.

The good news. Running the xdg-mime default vlc.desktop x-scheme-handler/vlc & update-mime-database ~/.local/share/mime did result in the vlc player opening when I tried a vlc:// link, both via the terminal, and also via a test HTML page I created with vlc:// links for both local & external video files.

And all I get is vlc displaying an error message:

Your input can't be opened:
VLC is unable to open the MRL 'vlc:///home/scotty/Videos/test.mp4'. Check the log for details.

vlc logs its messages to the system log (/var/log/syslog).

The same with external links. I tried formatting the URLs in different ways to see if localhost or anything was needed for local files, and also followed some advice which said external URLs should have both the vlc:// and the http:// included in the URL (eg: vlc://https://download.samplelib.com/mp4/sample-5s.mp4), but that doesn’t work as firefox just removes the second : and vlc or xdg-open also remove the 2nd : when run from a terminal).

That’s about as much help as I can offer. Hopefully someone else in the forum might be able step in & provide more assistance.

The VideoLAN Forums - Forum Home could also provide some help.

3 Likes

I had a quick look before, but couldn’t get it working.

vlc:// doesn’t play files, it results in the error @scotty65 posted. According to the links below, it’s meant for commands for vlc itself but I couldn’t get them working either.

file:// does play, but the timecode doesn’t work.

Closest I could get was vlc --start-time=30 file://... obviously it works with a plain path too.

I couldn’t find much else apart from others trying to make it work and AI references (no useful sources), but the AI did say the timecode should be in this format #t=00:00:30 which didn’t work either.

Where did you get this syntax? Is it possible that it’s an AI hallucination?

2 Likes

Yes, I got it from AI. And it didn’t occur to me that it would be an hallucination.

Thank you and @scotty65 so much for digging into this trying to solve it.

2 Likes

It could be some obscure syntax that isn’t documented well and we’re just missing something - but I think it’s just the AI making stuff up.

I’ve recently seen a few AI hallucinations myself, all I can find is other people trying to make it work and failing. No proper sources.

Always check the AI’s sources, they often don’t mention what the AI claims they do - and sometimes they specifically contradict the AI.

3 Likes