gitlab.com

demesisx, to piracy in I made a thing to make playing YouTube videos locally from your browser easier
@demesisx@infosec.pub avatar

Additional pro-tip: you can just launch mpv from the terminal using the YouTube url and it will open a new player.

01189998819991197253, to piracy in I made a thing to make playing YouTube videos locally from your browser easier
@01189998819991197253@infosec.pub avatar

Awesome! Thanks!

Morgikan, to piracy in I made a thing to make playing YouTube videos locally from your browser easier
@Morgikan@lemm.ee avatar

I was curious how you implemented this as it’s pretty much the default YT bypass qutebrowser users use. Then I read the MIME type addition you did and had a good laugh. That’s clever. Always nice to see a fellow Go user, too.

danielquinn,
@danielquinn@lemmy.ca avatar

Is there another way to do this? This hack was the only way I could figure out how to get Firefox to invoke an external binary, but if there’s a more conventional way to do it, I’d like to know 'cause I have another more complicated project in need of a pattern much like this one.

Morgikan,
@Morgikan@lemm.ee avatar

No, the way you did it is the only way I can think you can. Otherwise it opens up things to arbitrary code execution. I’m not exactly sure how qutebrowser gets away with it, but I know it’s built on QT so maybe it just isn’t running sandboxed or had some special method for calling external binaries/scripts. You might take a look at that project and see, but Firefox/qutebrowser is probably like comparing apples and oranges.

danielquinn,
@danielquinn@lemmy.ca avatar

That’s actually very helpful, thanks. I’ve been working on another project to open certain URLs in specific browsers/profiles, and wanted to be sure that I wasn’t missing a more obvious design pattern. The project is here if you’re curious.

qx128, to piracy in I made a thing to make playing YouTube videos locally from your browser easier

You are the best.

zaknenou, to piracy in I made a thing to make playing YouTube videos locally from your browser easier
@zaknenou@lemmy.dbzer0.com avatar

can you please share a video of how it looks like when implemented. I think it is already possible to watch videos using VLC ?

Telorand,

I’ve had a couple videos that wouldn’t load properly in VLC. Rare, but it happens. Alternatives are always welcome.

Contend6248,

My best guess would be that the internal player of Firefox comes to play here.

You can try opening any MP4 with Firefox

danielquinn,
@danielquinn@lemmy.ca avatar

I don’t think I have it in me to put together a video, but I can describe it if you like.

Once you install the extension and follow the setup instructions, you just go to a YouTube page. The extension adds an ugly button to the top-left of the page that says “bypass”. When you click it, Firefox launches yt-dlp [the URL you’re at] -o - | mpv - which basically just downloads the video and streams the output through the mpv video player. So now you’re watching just the video, with no web page necessary.

CoolingJam, to linuxmemes in 01001001 01110100 00100000 01101001 01110011 00100000 01000111 01001110 01010101 00100000 00101011 00100000 01001100 01001001 01001110 01010101 01011000

For the lazy people:

btw I use Arch.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #