openzim / youtube

Create a ZIM file from a Youtube channel/username/playlist
GNU General Public License v3.0
53 stars 29 forks source link

Use WebP for thumbnails and fix seeking on apple browsers #119

Closed satyamtg closed 4 years ago

satyamtg commented 4 years ago

This allows using WebP for thumbnails with optimization and S3 cache support. Also applies the same CSS tweaks (alongwith webp-hero) and fixes #91 as a result.

This does the following chages -

satyamtg commented 4 years ago

Thanks I think we should reorg code a bit as this method is becoming unreadable.

Added two methods, download_video() and download_thumbnail(), to download those seperately Moved process_thumbnail() to processing.py module

satyamtg commented 4 years ago

Good. Can be simplified a bit (see comments in thumbnail and apply to video as well)

Hm. I wonder why I didn't saw those. Fixed them anyways.

satyamtg commented 4 years ago
Screen Shot 2020-09-15 at 10 25 23

There are multiple left over files (broken JPEG) regarding thumbnails… what's going on?

This was apparently due to the configuration option we pass to youtube_dl, i.e. write_all_thumbnails. Setting it to False did the trick. The rebase is only for fixing merge conflict in CHANGELOG.md

satyamtg commented 4 years ago

I have added a function to download subtitles. Also bumped scraperlib requirement to 1.3.4 because it requires https://github.com/openzim/python_scraperlib/pull/65 to correctly handle thumbnails which are often downloaded with wrong extensions by youtube_dl.