Download media 404
Several hours ago, downloading media files started resulting in 404 errors. The update list is still working fine. The system has been functioning properly for several months prior to this issue. I've confirmed that there's sufficient quota remaining for the apk key. Youcast 2.24. August 9, 2024
My downloads have also started 404'ing since this morning. Feeds update fine, it's just the downloads that don't work anymore... @i3arnon I think youtube explode will need to be updated. V6.4 was released at the end of July https://github.com/Tyrrrz/YoutubeExplode/releases
@dirkschut new release won't help, read an issue in YoutubeExplode project.
For YouCast to work properly it should allow passing either browser login cookie like yt-dlp --cookies-from-browser does or any other way to authenticate with youtube.
That sounds like a nightmare... And as far as I can see, yt-dlp recommends not sending existing cookies with your requests because they van have your accounts banned or something: https://github.com/yt-dlp/yt-dlp/issues/10085 and https://github.com/yt-dlp/yt-dlp/issues/10108
Thanks for posting this. I thought it was just me.
Hi @i3arnon
Do you kniw if this can be patched ?
Best regards
Looks like YouTube Explode has been updated now https://github.com/Tyrrrz/YoutubeExplode/releases/tag/6.4.2
Looks to me like the best solution would be to authenticate with OAuth to download the videos. Unfortunately, Youtube Explode doesn't currently support this, but from what I've read it can be done with yt-dlp (which is a console application) with this wrapper to use it in C#: https://github.com/Bluegrams/YoutubeDLSharp . That way we can still use the old explode code to get the feeds, but pass the downloads over to DLSharp to download the video, then pass that over to the client... Kinda cumbersome, but probably the easiest solution that currently exists...
Edit: I'll see if I can patch together a prototype over the weekend... Edit2: Unfortunately I've been confined to my bead because of a concussion so I haven't been able to play around with this yet...
YouTube's new anti-bot shit is easily bypassed by not being in the USA as far as I can tell. I've mostly only tried accessing videos from Bolivia so I don't know where all works. My guess is that YouTube only cares about the most "valuable" users so I would imagine the blocking is active in much of western Europe as well, unless EU rules are actually making them behave like a respectable company in this respect.
Obviously, travel is expensive, but all that is actually checked is an IP address.
So, I've been working on a fix for this and I've got something that works a bit. I've got YouCast now downloading videos and converting them to mp4 and then it can be sent to the client. There are a couple of problems that I still need to fix:
- The download request can time out because it takes a while. You can try again later because I made it so YouCast saves the file.
- YouCast saves the videos, so over time you can fill up a lot of hard drive space. You can of course manually delete them (they are in the folder called output)
- For some reason videos that are more than about 250mb just don't get sent or don't arrive to the client. I haven't been able to find a fix for this and debugging is annoying because YouCast doesn't attach to the debugger properly and doesn't ave a proper logging functionality.
- You can only download in 720p at the moment. I also haven't touched audio only downloads yet.
You can see my work at https://github.com/dirkschut/youcast and you can download my update here: YouCast YTDLS.zip
Note: If you do run my update, it will download a couple more executable to do some of the heavy lifting.
Also, you have to make a folder called output. It works on my machine was just happening when I tried to start it on my server instead of my dev machine :D
EDIT: Also also, the conversion to MP4 can take quite a while, especially on computers with a slower CPU. I might see about just forwarding the webm videos instead...
I fixed a couple of issues:
- It no longer crashes all the time
- It can now handle videos that take up more than 250mb
- It now downloads videos in 1080p
- I have added a log file (log.txt) so if you have any issues you can attach that file to reports :)
List of current issues:
- Download requests time out because youcast first has to download the video and then pass it to the client. I'm still thinking about a system to pass the videos on to the client immediately or keep the client engaged somehow.
- The output folder can get big really quick. I'm thinking of a way to clean up the folder, perhaps let the user set a max size and delete the oldest videos or something.
- You still need to manually create the output folder
- If the video is in MP4, it is still saved as a webm file
- audio downloads haven't been touched, but somehow they do work, but at a speed of about 30kps
EDIT: so, apparently there is another issue with even larger files (1GB-ish plus) that I'll need to look into later...
Thank you!
I think it's broken again