Possible to screen cast with Flatpaks (VLC)?

Hi folks, I know this isn’t at all a Silverblue question but as Flatpak enthusiasts I’m hoping someone here has run into, and solved, the same issue I’m facing today: streaming through Flatpaks!

Ok, so with the VLC .rpm I can play a video and cast it to my TV - great! But I want to live in a world of Flatpak now, and when I try the same through the VLC flatpak, I get a chromecast error: (main stream output error: stream chain failed for `chromecast{ip=xxx.xxx.x.xx,port=8009}’).

As far as I know, Flatseal doesn’t have any permissions to tweak firewall or enable ports, so I’m not sure how to get this working, or if at all possible in the wonderful world of Flatpak? Anyone have any thoughts on this?

Hello @blue-hat ,
Welcome to discussion.:fedora:.org!
Flatpak run has some options available to you. I think you will need to expose the port explicitly. I think Flatseal can do this for you, as well as doing it via the `flatpak run …’ command.

1 Like

Thanks for the welcome!
Any idea how to expose the port either in Flatseal or through the command line? I couldn’t find anything about that in their documentation so wasn’t sure it could be done. I’m also not super techy and didn’t have any luck trying to happen across any settings myself.

Are you talking about something like the syncplay extension? Or are you just referring to the streaming option?

Just referring to a casting option. When you’re watching a video in VLC you can go to ‘Playback’ → ‘Renderer’ and choose a device to stream the content on. In my case, I’m looking to stream to my TV via a chromecast device. It works for the .rpm VLC but not sure how to enable the appropriate ports to get it working in VLC. The option is there but it just fails when trying to connect, presumably because the Flatpak can’t get access to the required ports.

These are the ones I had to configure in my firewall settings for the .rpm VLC package, but just can’t get the same working with the Flatpak:

TCP Ports: 8008-9000
UDP Ports: 1900, 5353

Flatseal may be of some help for you. Essentially you will need to map the ports I would think, I took a quick look at my VLC flatpak with flatseal and it has more than the normal permissions from what I see already. I don’t screen cast though, suppose I could try though.
Possibly try to run it from the cli with flatpak run --share network org.videolan.VLC to see if that works.

Just wanted to say thanks for your help. I ended up reporting this as an issue on the VLC Flathub git page and turns out VLC wasn’t built for chromecast support in Flatpak. Someone just submitted a PR that seems to fix it though, so should be enabled next time they push an update.