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

scripts/lb-wrapper: Try yt-dlp with "--format best --format-sort 'tbr~1000'" [testing shows need for URL validation, clearly communicated, for users who accidentally request the impossible after clicking "Download to IIAB" > "Start"] #63

Merged
merged 3 commits into from
Dec 9, 2023

Conversation

@holta
Copy link
Member Author

holta commented Dec 9, 2023

@deldesir @EMG70 please consider testing this alternative alongside:

Start by testing these same 4 URL's ?

@holta
Copy link
Member Author

holta commented Dec 9, 2023

@EMG70 explanation is emerging at:

(If this explanation contains shortcomings, please shout with your suggestions!)

@EMG70
Copy link

EMG70 commented Dec 9, 2023

Latest test
Screenshot from 2023-12-09 09-58-50
Screenshot from 2023-12-09 10-05-58

@EMG70
Copy link

EMG70 commented Dec 9, 2023

Screenshot from 2023-12-09 10-12-23

@EMG70
Copy link

EMG70 commented Dec 9, 2023

Screenshot from 2023-12-09 11-13-54

@holta
Copy link
Member Author

holta commented Dec 9, 2023

MKV Results may not yet be 100% ideal, but perhaps good enough for now?

  • Overall bit rate 737 kbit/s

  • Width 1920

  • Height 1080

Binary Search Algorithm in 100 Seconds
https://www.youtube.com/watch?v=MFhxShGxHWc

IMG-20231209-WA0007~3

@EMG70
Copy link

EMG70 commented Dec 9, 2023

4 Things all great listeners know-Ted Ed
Screenshot from 2023-12-09 11-25-14

@EMG70
Copy link

EMG70 commented Dec 9, 2023

Successful download of mp4 video but server crushed after refreshing.(403 Forbidden)
Screenshot from 2023-12-09 14-00-35
Screenshot from 2023-12-09 13-58-14
Screenshot from 2023-12-09 13-56-40
Screenshot from 2023-12-09 13-56-22
Screenshot from 2023-12-09 13-56-02
Screenshot from 2023-12-09 13-54-37
Screenshot from 2023-12-09 13-54-22
Screenshot from 2023-12-09 13-56-40

@EMG70
Copy link

EMG70 commented Dec 9, 2023

Screenshot from 2023-12-09 14-06-08

@EMG70
Copy link

EMG70 commented Dec 9, 2023

502 Bad Gateway upon entering http://ip/books
Screenshot from 2023-12-09 14-09-28

@EMG70
Copy link

EMG70 commented Dec 9, 2023

Screenshot from 2023-12-09 15-22-34
Screenshot from 2023-12-09 15-21-37
Screenshot from 2023-12-09 15-21-09
Screenshot from 2023-12-09 14-20-49

@EMG70
Copy link

EMG70 commented Dec 9, 2023

Screenshot from 2023-12-09 15-27-14

@EMG70
Copy link

EMG70 commented Dec 9, 2023

Screenshot from 2023-12-09 15-32-26

@EMG70
Copy link

EMG70 commented Dec 9, 2023

pastebinit -b sprunge.us//var/log/xklb.log
http://sprunge.us/BT3ZHs?en

pastebinit -b sprunge.us/var/log/calibre-web.log
http://sprunge.us/ohha35?en

@holta
Copy link
Member Author

holta commented Dec 9, 2023

pastebinit -b sprunge.us//var/log/xklb.log
http://sprunge.us/BT3ZHs?en

@deldesir can you help us understand why Line 86 is very different from the others?

86 2023-12-09 13:49:03 - Running command: lb tubeadd /library/downloads/calibre-web/survey.db https://yt-dlp --format "bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4]" https://www.youtube.com/watch?v=sOE8Slo3Pqw" --verbose && lb dl /library/downloads/calibre-web/survey.db --prefix /library/downloads/calibre-web --write-thumbnail -f best -S 'tbr~1000' --video https://yt-dlp --format "bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4]" https://www.youtube.com/watch?v=sOE8Slo3Pqw" --verbose

@EMG70
Copy link

EMG70 commented Dec 9, 2023

pastebinit -b sprunge.us//var/log/xklb.log
http://sprunge.us/BT3ZHs?en

@deldesir can you help us understand why Line 86 is very different from the others?

86 2023-12-09 13:49:03 - Running command: lb tubeadd /library/downloads/calibre-web/survey.db https://yt-dlp --format "bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4]" https://www.youtube.com/watch?v=sOE8Slo3Pqw" --verbose && lb dl /library/downloads/calibre-web/survey.db --prefix /library/downloads/calibre-web --write-thumbnail -f best -S 'tbr~1000' --video https://yt-dlp --format "bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4]" https://www.youtube.com/watch?v=sOE8Slo3Pqw" --verbose

CLARIFICATION****
Could Line 86 be a result of my error?I copied the following url from my Mp4 downloads yt-dlp -f “bestvideo[ext=mp4]+bestaudio[ext=m4a]” "https://www.youtube.com/watch?v=1xhlg9WkPQg."
I initially forgot to strip the yt-dlp prefix in calibre Download.This download however failed.I then noticed the error and stripped it correctly as and downloaded successfully as mp4 on Calibre.Apologies.

I thought the link was corrupted so tried another one yt-dlp --format "bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4]" https://www.youtube.com/watch?v=sOE8Slo3Pqw"
I realized this was 3.5hr video and immediately cancelled in Tasks.
Apologies for sending you on a wild chase but result was successful mp4 download 2min video though system later crushed after playing the video and could not refresh .

@holta
Copy link
Member Author

holta commented Dec 9, 2023

Thanks @EMG70 for clarifying:

@deldesir can we learn anything from this?

(ASIDE: Certainly we need much stronger URL validation — when people click on "Download to IIAB" — so the front-end makes 100% clear telling them exactly what the back-end is and is not capable of, i.e. based on the URL they request!)

@holta holta changed the title scripts/lb-wrapper: Try yt-dlp with "-f best -S 'tbr~1000'" scripts/lb-wrapper: Try yt-dlp with "-f best -S 'tbr~1000'" [testing show need for URL validation, clearly communicated, for users who request the impossible after clicking "Download to IIAB" > "Start"] Dec 9, 2023
@holta holta changed the title scripts/lb-wrapper: Try yt-dlp with "-f best -S 'tbr~1000'" [testing show need for URL validation, clearly communicated, for users who request the impossible after clicking "Download to IIAB" > "Start"] scripts/lb-wrapper: Try yt-dlp with "-f best -S 'tbr~1000'" [testing shows need for URL validation, clearly communicated, for users who request the impossible after clicking "Download to IIAB" > "Start"] Dec 9, 2023
@holta holta changed the title scripts/lb-wrapper: Try yt-dlp with "-f best -S 'tbr~1000'" [testing shows need for URL validation, clearly communicated, for users who request the impossible after clicking "Download to IIAB" > "Start"] scripts/lb-wrapper: Try yt-dlp with "-f best -S 'tbr~1000'" [testing shows need for URL validation, clearly communicated, for users who accidentally request the impossible after clicking "Download to IIAB" > "Start"] Dec 9, 2023
@holta
Copy link
Member Author

holta commented Dec 9, 2023

@EMG70 advised me to go ahead and merge this after his extensive testing today:

Huge Thanks to him for his very hard work, confirming this PR is generally very solid i.e. an earnest real step forward helping schools/parents/kids getting the very manageable/tolerable codecs they need in offline and low-income communities!

@holta holta changed the title scripts/lb-wrapper: Try yt-dlp with "-f best -S 'tbr~1000'" [testing shows need for URL validation, clearly communicated, for users who accidentally request the impossible after clicking "Download to IIAB" > "Start"] scripts/lb-wrapper: Try yt-dlp with "--format best --format-sort 'tbr~1000'" [testing shows need for URL validation, clearly communicated, for users who accidentally request the impossible after clicking "Download to IIAB" > "Start"] Dec 9, 2023
@holta holta merged commit 887d45a into iiab:master Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants