Skip to content

VLC backend as an additional optional Playback backend - #424

Closed
fridrich wants to merge 14 commits into
linuxmint:masterfrom
fridrich:vlc
Closed

fridrich wants to merge 14 commits into
linuxmint:masterfrom
fridrich:vlc

Conversation

@fridrich

@fridrich fridrich commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

On some video drivers, like for instance nouveau, the MPV backend is disastrous and produces a lot of artifacts. Whereas vlc/libvlc renders the videos just fine.
The only caveat is that libvlc does not have any way to be controlled if it is not by programming the interface oneself. So, I stitched together a simple interface with play/pause button, stop button and a menu/sandwich button allowing us to list and change Audio/Video/Subtitle streams.
The playback_bar has a pause button that is rendered as pause even though the playback is paused. So I just implemented a simple button toggling extracted it and reused in the VLC backend too.

@fridrich
fridrich force-pushed the vlc branch 2 times, most recently from 572c1f4 to 19f7490 Compare August 10, 2026 07:43
@fridrich

Copy link
Copy Markdown
Contributor Author

With the changes to make the mpv backend optional, eventually one can decide to remove completely the in-tree mpv.py file and use the system-wide installed python mpv bindings. One can also decide that either of the two backends will be enough for the application to start. On my system using the nouveau driver, mpv is rather useless, but vlc is working really nice. So, for me, having only vlc backend is just fine. For others, it might be different.

@fridrich

Copy link
Copy Markdown
Contributor Author

Is upstream interesting in this?

@fridrich
fridrich force-pushed the vlc branch 2 times, most recently from 2441ffc to 712d11b Compare October 16, 2026 22:07
@mtwebster

Copy link
Copy Markdown
Member

We don't want to support this - we'll probably be moving away from an embedded window altogether, as the current model isn't supported in Wayland sessions except by forcing it to run with its x11 backend.

@mtwebster mtwebster closed this Oct 19, 2026
@fridrich

Copy link
Copy Markdown
Contributor Author

Understood, thanks for the explanation. Both backends here rely on wid/XID embedding, so this would only add to a model you're planning to drop.

What do you have in mind as the replacement? If the goal is native Wayland while keeping the video inside the main window, mpv's render API could do it: render into a Gtk.GLArea instead of passing an XID, the way Celluloid does it. The bundled mpv.py already has MpvRenderContext, so no new dependency would be needed. I'd be happy to work on that if it fits your plans.

Some fixes in this PR aren't VLC-specific: hangs and races when switching or stopping channels, stopping a paused stream from the mpv OSD, cursor auto-hide in fullscreen, and the playback bar staying reachable while a channel plays in the background. I can send those as separate small PRs against the current mpv code, if you're interested.

@mtwebster

Copy link
Copy Markdown
Member

I've got a branch using libmpv like Celluloid, and it seems to work great, I'll open a PR with test packages soon. I'm not certain yet if this would be merged for our next Mint release or not.

I ended up getting sidetracked by nouveau - on my machine (~2019 i9-9900k with GeForce GTX 1660 Ti) I didn't get what I'd call tearing, but there was bad stuttering/choppy playback. This wasn't limited to hypnotix/videos, though - on Cinnamon/Muffin it affected most apps (busy spinners, progress bars, glxgears, etc...). I'm not sure what desktop/distro you're on.

It looks like the stuttering is an issue between muffin and the 'zink' - the OpenGL library used for nouveau now. I've got a workaround for it, and it's been reported upstream as a bug:

ref: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/16575

Again, not sure if this is related to the issues you've encountered on nouveau, but if they follow to other programs (glxgears is an easy test) you're likely affected.

Nouveau is quite smooth in Wayland sessions - the issue doesn't manifest there.

re: Other fixes, definitely would be open (though check other existing PRs first) - it's also a lot easier for us to work thru smaller change sets.

@mtwebster

Copy link
Copy Markdown
Member

#442

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants