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

Error downloading videos in playlist #14578

Closed
ExoticScarf opened this issue Oct 24, 2017 · 1 comment
Closed

Error downloading videos in playlist #14578

ExoticScarf opened this issue Oct 24, 2017 · 1 comment
Labels

Comments

@ExoticScarf
Copy link

@ExoticScarf ExoticScarf commented Oct 24, 2017

So im attempting to download a playlist and when i have download set to True it downloads a file with the name of the video's id but with 'webm' appended to it and with the file extension '.f248' ("6GJO_RpBnEgwebm.f248") another file with the same name is downloaded but with the extension '.f251' ("6GJO_RpBnEgwebm.f251") and finally before returning an error it merges the 2 files into "6GJO_RpBnEgwebm.webm"

I am using this code:

import youtube_dl

ytdl = youtube_dl.YoutubeDL({'outtmpl': '%(id)s%(ext)s'})

ytdl.extract_info("https://www.youtube.com/watch?v=6GJO_RpBnEg&index=1&list=PLZlppmGv_GIKfcd4t6odoAB9a7aUBMBZi", download=True)

And this is the full log from when i run it:

[youtube:playlist] Downloading playlist PLZlppmGv_GIKfcd4t6odoAB9a7aUBMBZi - add --no-playlist to just download video 6GJO_RpBnEg
[youtube:playlist] PLZlppmGv_GIKfcd4t6odoAB9a7aUBMBZi: Downloading webpage
[download] Downloading playlist: Life Is Strange
[youtube:playlist] playlist Life Is Strange: Downloading 15 videos
[download] Downloading video 1 of 15
[youtube] 6GJO_RpBnEg: Downloading webpage
[youtube] 6GJO_RpBnEg: Downloading video info webpage
[youtube] 6GJO_RpBnEg: Extracting video information
[youtube] 6GJO_RpBnEg: Downloading MPD manifest
[download] 6GJO_RpBnEgwebm.f248 has already been downloaded

[download] 100% of 11.43MiB
[download] 6GJO_RpBnEgwebm.f251 has already been downloaded

[download] 100% of 6.54MiB
[ffmpeg] Merging formats into "6GJO_RpBnEgwebm.webm"
ERROR: Could not write header for output file #0 (incorrect codec parameters ?): Error number -22 occurred
Traceback (most recent call last):
File "C:\Users\adam\AppData\Local\Programs\Python\Python36-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 2031, in post_process
files_to_delete, info = pp.run(info)
File "C:\Users\adam\AppData\Local\Programs\Python\Python36-32\lib\site-packages\youtube_dl\postprocessor\ffmpeg.py", line 479, in run
self.run_ffmpeg_multiple_files(info['__files_to_merge'], temp_filename, args)
File "C:\Users\adam\AppData\Local\Programs\Python\Python36-32\lib\site-packages\youtube_dl\postprocessor\ffmpeg.py", line 204, in run_ffmpeg_multiple_files
raise FFmpegPostProcessorError(msg)
youtube_dl.postprocessor.ffmpeg.FFmpegPostProcessorError: Could not write header for output file #0 (incorrect codec parameters ?): Error number -22 occurred

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\adam\Desktop\Programs\YouTube_MusicDownloader\Main.py", line 5, in
ytdl.extract_info("https://www.youtube.com/watch?v=6GJO_RpBnEg&index=1&list=PLZlppmGv_GIKfcd4t6odoAB9a7aUBMBZi", download=True)
File "C:\Users\adam\AppData\Local\Programs\Python\Python36-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 795, in extract_info
return self.process_ie_result(ie_result, download, extra_info)
File "C:\Users\adam\AppData\Local\Programs\Python\Python36-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 991, in process_ie_result
extra_info=extra)
File "C:\Users\adam\AppData\Local\Programs\Python\Python36-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 856, in process_ie_result
extra_info=extra_info)
File "C:\Users\adam\AppData\Local\Programs\Python\Python36-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 795, in extract_info
return self.process_ie_result(ie_result, download, extra_info)
File "C:\Users\adam\AppData\Local\Programs\Python\Python36-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 849, in process_ie_result
return self.process_video_result(ie_result, download=download)
File "C:\Users\adam\AppData\Local\Programs\Python\Python36-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 1619, in process_video_result
self.process_info(new_info)
File "C:\Users\adam\AppData\Local\Programs\Python\Python36-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 1966, in process_info
self.post_process(filename, info_dict)
File "C:\Users\adam\AppData\Local\Programs\Python\Python36-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 2033, in post_process
self.report_error(e.msg)
File "C:\Users\adam\AppData\Local\Programs\Python\Python36-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 612, in report_error
self.trouble(error_message, tb)
File "C:\Users\adam\AppData\Local\Programs\Python\Python36-32\lib\site-packages\youtube_dl\YoutubeDL.py", line 582, in trouble
raise DownloadError(message, exc_info)
youtube_dl.utils.DownloadError: ERROR: Could not write header for output file #0 (incorrect codec parameters ?): Error number -22 occurred

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 25, 2017

Carefully read new issue template and provide all requested information.

@dstftw dstftw closed this Oct 25, 2017
@dstftw dstftw added the incomplete label Oct 25, 2017
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.