Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archiving with Youtube-dl does not work #104

Open
kamtschatka opened this issue Mar 26, 2023 · 0 comments
Open

Archiving with Youtube-dl does not work #104

kamtschatka opened this issue Mar 26, 2023 · 0 comments

Comments

@kamtschatka
Copy link

I have succeeded in running shaark in a docker (without docker-compose) and added the installation of youtube-dl and python to it. When I then tried to verify it works correctly in the settings, I got an error.
After some analysis it turns out that youtube-dl was not able to download the video that is used for testing. Youtube-dl received its last update in the end of 2021 (https://github.com/ytdl-org/youtube-dl) and I have another tool running on my NAS, which had a similar issue. The solution is to switch to yt-dlp (https://github.com/yt-dlp/yt-dlp) which still receives regular updates (latest one was 3 weeks ago)
So I downloaded yt-dlp instead and changed the binary path in the settings to use that one instead. Stil didn't work.
Turns out this needs an update of youtube-dl-php, because yt-dlp apparently uses some changed filepaths.
Since there is a major version jump (1.6 is currently used in shaark and 2.1.3 is the newest version), I changed the YoutubeDlProvider.php file.
Then I needed to run composer require norkunas/youtube-dl-php:2.1.3 -W and that made the settings page finally show "Success" when trying the youtube download.

The problem is now, that it still doesn't seem to work for "real" cases. I added a youtube video, clicked edit and then Archive, then Archive as Media and it says "Link is being archived". I don't see any log messages, I don't see any files appear, It just seems to stop.

As an additional information: I am using redis and have put shaark into production mode.

I have attached my updated version of the YoutubeDlProvider.php file(as txt, as github does not support php file extensions). I am not a PHP developer, so take everything I have said so far with a grain of salt, my languages are Java and JavaScript/Typescript ;-)
YoutubeDlProvider.txt

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

No branches or pull requests

1 participant