Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's all fun and games 'til you learn that YouTube's terms don't allow you to embed their player in any way that disables/hides their UI and logos.

Source: A similar project I made like 8 years ago.

Edit: But don't get me wrong, I like it nonetheless!



I guess that's when you double down and just scrape Invidious[1] for the audio files.

edit: The Firefox extension "Privacy Redirect"[2] also uses Invidious to automatically redirect all youtube links, and does similar things for pages like reddit and twitter to their respective "mirrors".

[1]: https://docs.invidious.io/Invidious-Instances.md

[2]: https://addons.mozilla.org/en-US/firefox/addon/privacy-redir...


For anyone else wondering "what the heck is invidious?", from their github[1]: "Invidious is an alternative front-end to YouTube." Cool!

But man, classic open source: the front page of those docs says nothing about what the heck the project is, just a list of URLs to visit, and the main website[2] is just an under-construction page with a link to the github repo.

1 - https://github.com/iv-org/invidious

2 - https://invidious.io/


Remaining somewhat illegible probably helps the project survive for the benefit of the cognoscenti.


... and they say security by obscurity doesn't work! /s


Check https://redirect.invidious.io/ and try another Invidious instance.


Wow, I had no idea about Invidious. This perfectly solves my use case of needing a REST API to get MP3 urls for YouTube videos. I was looking into building or finding a REST API for youtube-dl, but this seems a lot easier.


The mirrors frequently go offline from being blocked though, so it may be easier to rely on youtube-dl depending on how likely it is that you will be rate-limited.

You could of course also try and set up your own, private Invidious instance and see what mileage you get from that.


Yep! I do that and just hand the URL to friends.


yep, I was trying to make some recreations of DVD menus a few years ago and decided to host on youtube so it could be easily added to.

Iirc my hack to hide the UI was replacing pausing videos with an infinite loop of a millisecond (which was buggy as hell). VideoJS with the youtube plugin was able to hide most everything else.


Do we need YouTube if we can host media (in this case MP3 and animations) ourselves (and through CDNs)?


No, you don't need YouTube. In fact, you almost never need YouTube.

If you just want to host some files (like mp3s and animations) you can toss them on a CDN.

If you need a bit more advanced features, like easy embedding, a premade player, etc. you might wanna use Vimeo.

*HOWEVER* YouTube is fast, easy and takes care of pretty much everything for you. This is not to be underestimated.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: