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

download youtube embed video can't exit normally #26694

Closed
Jokertion opened this issue Sep 24, 2020 · 6 comments
Closed

download youtube embed video can't exit normally #26694

Jokertion opened this issue Sep 24, 2020 · 6 comments

Comments

@Jokertion
Copy link

@Jokertion Jokertion commented Sep 24, 2020

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2020.09.20
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

>>> [youtube] wtTk6KzmhDM: Downloading webpage
[youtube] wtTk6KzmhDM: Looking for automatic captions
[youtube] wtTk6KzmhDM: Downloading MPD manifest
[info] Writing video subtitles to: Q&A - Bioweapons... for Dummies Evaluating the Threat of Rogue Biohacking-wtTk6KzmhDM.en.vtt
[info] Writing video description metadata as JSON to: Q&A - Bioweapons... for Dummies Evaluating the Threat of Rogue Biohacking-wtTk6KzmhDM.info.json
[dashsegments] Total fragments: 175
[download] Destination: Q&A - Bioweapons... for Dummies Evaluating the Threat of Rogue Biohacking-wtTk6KzmhDM.f137.mp4
[download] 100% of 283.86MiB in 04:30
[dashsegments] Total fragments: 187
[download] Destination: Q&A - Bioweapons... for Dummies Evaluating the Threat of Rogue Biohacking-wtTk6KzmhDM.f140.m4a
[download] 100% of 14.09MiB in 01:20
[ffmpeg] Merging formats into "Q&A - Bioweapons... for Dummies Evaluating the Threat of Rogue Biohacking-wtTk6KzmhDM.mp4"
Deleting original file Q&A - Bioweapons... for Dummies Evaluating the Threat of Rogue Biohacking-wtTk6KzmhDM.f137.mp4 (pass -k to keep)
Deleting original file Q&A - Bioweapons... for Dummies Evaluating the Threat of Rogue Biohacking-wtTk6KzmhDM.f140.m4a (pass -k to keep)
[ffmpeg] Converting subtitles
Deleting original file Q&A - Bioweapons... for Dummies Evaluating the Threat of Rogue Biohacking-wtTk6KzmhDM.en.vtt (pass -k to keep)

Description

url1 = 'https://www.youtube.com/embed/wtTk6KzmhDM?feature=oembed&hd=1'
url2 = 'https://www.youtube.com/embed/W-b2n5cUVYU?feature=oembed&hd=1'
url3 = 'https://www.youtube.com/embed/NjhSgxsOOlU?feature=oembed&hd=1'

url11 = 'https://www.youtube.com/watch?v=wtTk6KzmhDM'
url22 = 'https://www.youtube.com/watch?v=W-b2n5cUVYU'
url33 = 'https://www.youtube.com/watch?v=NjhSgxsOOlU'

import os
url = u1

cmd1 = f"""youtube-dl -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" --write-auto-sub --write-info-json --sub-lang en --convert-subs srt {url}"""  
msg = f"cmd1: {cmd1}"
print(msg)
os.system(cmd1)

The url1 to url3 are youtube embedded links, which crawled from <iframe> tag in a website.
When I run the code using url1, at the end, the srt subtitle, video and info json has been download successful, but the process didn't exit normally, just stop there.
But the same video_id, when I run the code with url11, it do download and exit normally.
WHY?
I wonder if the youtube-dl has a bug when downloading the youtube embedded url.

Looking forward to your reply.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Sep 24, 2020

The log indicates no issues.

@Jokertion
Copy link
Author

@Jokertion Jokertion commented Sep 24, 2020

The log indicates no issues.

The log ensure no problem, but process didn't exit, just stop there!!!

@Jokertion Jokertion changed the title download youtube embed videl can't exit normally download youtube embed video can't exit normally Sep 24, 2020
@Jokertion
Copy link
Author

@Jokertion Jokertion commented Sep 24, 2020

When I download the youtube url without embed, it's OK, exit normally.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Sep 24, 2020

You must provide clear evidence of that.

@Jokertion
Copy link
Author

@Jokertion Jokertion commented Sep 24, 2020

This is the code, you should run it, then you'll believe me.

url1 = 'https://www.youtube.com/embed/wtTk6KzmhDM?feature=oembed&hd=1'
url2 = 'https://www.youtube.com/embed/W-b2n5cUVYU?feature=oembed&hd=1'
url3 = 'https://www.youtube.com/embed/NjhSgxsOOlU?feature=oembed&hd=1'

url11 = 'https://www.youtube.com/watch?v=wtTk6KzmhDM'
url22 = 'https://www.youtube.com/watch?v=W-b2n5cUVYU'
url33 = 'https://www.youtube.com/watch?v=NjhSgxsOOlU'

import os
url = url1

cmd = f"""youtube-dl -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" --write-auto-sub --write-info-json --sub-lang en --convert-subs srt {url}"""  
msg = f"cmd1: {cmd1}"
print(msg)
os.system(cmd)
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Sep 24, 2020

No one cares about your code.

> py -3.7 .\youtube_dl\__main__.py -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" --write-auto-sub --write-info-json --sub-lang en --convert-subs srt "https://www.youtube.com/embed/wtTk6KzmhDM?feature=oembed&hd=1"
[youtube] wtTk6KzmhDM: Downloading webpage
[youtube] wtTk6KzmhDM: Looking for automatic captions
[youtube] wtTk6KzmhDM: Downloading MPD manifest
[info] Writing video subtitles to: Q&A - Bioweapons... for Dummies Evaluating the Threat of Rogue Biohacking-wtTk6KzmhDM.en.vtt
[info] Writing video description metadata as JSON to: Q&A - Bioweapons... for Dummies Evaluating the Threat of Rogue Biohacking-wtTk6KzmhDM.info.json
[dashsegments] Total fragments: 175
[download] Destination: Q&A - Bioweapons... for Dummies Evaluating the Threat of Rogue Biohacking-wtTk6KzmhDM.f137.mp4
[download] 100% of 283.86MiB in 03:05
[dashsegments] Total fragments: 187
[download] Destination: Q&A - Bioweapons... for Dummies Evaluating the Threat of Rogue Biohacking-wtTk6KzmhDM.f140.m4a
[download] 100% of 14.09MiB in 00:12
[ffmpeg] Merging formats into "Q&A - Bioweapons... for Dummies Evaluating the Threat of Rogue Biohacking-wtTk6KzmhDM.mp4"
Deleting original file Q&A - Bioweapons... for Dummies Evaluating the Threat of Rogue Biohacking-wtTk6KzmhDM.f137.mp4 (pass -k to keep)
Deleting original file Q&A - Bioweapons... for Dummies Evaluating the Threat of Rogue Biohacking-wtTk6KzmhDM.f140.m4a (pass -k to keep)
[ffmpeg] Converting subtitles
Deleting original file Q&A - Bioweapons... for Dummies Evaluating the Threat of Rogue Biohacking-wtTk6KzmhDM.en.vtt (pass -k to keep)

>echo %ERRORLEVEL%
0

that proves youtube-dl exits normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.