ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
131.22k stars 9.93k forks source link

Error when adding metadata #5207

Open RadAd opened 9 years ago

RadAd commented 9 years ago

I keep getting this issue:

[ffmpeg] Adding metadata to '3 Minute Game Design - Episode 5 - Clockwork Game D esign-V_-IrHkpkqk.mp4' Traceback (most recent call last): File "main.py", line 19, in File "youtube_dlinit.pyo", line 403, in main File "youtube_dlinit.pyo", line 393, in _real_main File "youtube_dl\YoutubeDL.pyo", line 1448, in download File "youtube_dl\YoutubeDL.pyo", line 660, in extract_info File "youtube_dl\YoutubeDL.pyo", line 819, in process_ie_result File "youtube_dl\YoutubeDL.pyo", line 713, in process_ie_result File "youtube_dl\YoutubeDL.pyo", line 660, in extract_info File "youtube_dl\YoutubeDL.pyo", line 706, in process_ie_result File "youtube_dl\YoutubeDL.pyo", line 1149, in process_video_result File "youtube_dl\YoutubeDL.pyo", line 1431, in process_info File "youtube_dl\YoutubeDL.pyo", line 1489, in post_process File "youtube_dl\postprocessor\ffmpeg.pyo", line 576, in run WindowsError: [Error 183] Cannot create a file when that file already exists

Seems its the rename here:

574 self.run_ffmpeg(filename, temp_filename, options) 575 os.remove(encodeFilename(filename)) 576 os.rename(encodeFilename(temp_filename), encodeFilename(filename))

The file shouldn't exists because it was just deleted but I'm getting the error still.

dstftw commented 9 years ago

Post the full output you get when running with --verbose option.

RadAd commented 9 years ago

Full log: [debug] System config: [] [debug] User config: [] [debug] Command-line args: ['--verbose', '-c', '--console-title', '--add-metadata', '--download-archive', 'C:\Users\Adam Gates\AppData\Roaming\MyYouTubeDL\Extra Credits.log', '--playlist-end', '5', 'https://www.youtube.com/user/ExtraCreditz'] [debug] Encodings: locale cp1252, fs mbcs, out None, pref cp1252 [debug] youtube-dl version 2015.03.09 [debug] Python version 2.7.8 - Windows-7-6.1.7601-SP1 [debug] exe versions: ffmpeg N-70606-g2e5605f, ffprobe N-70606-g2e5605f, rtmpdump 2.4 [debug] Proxy map: {} [download] Downloading playlist: ExtraCreditz [youtube:user] ExtraCreditz: Downloading video ids from 1 to 51 [youtube:user] playlist ExtraCreditz: Downloading 5 videos [download] Downloading video 1 of 5 [download] Extra History - England: The South Sea Bubble - Ch. 2: Too Big to Fail has already been recorded in archive [download] Downloading video 2 of 5 [youtube] FSjU-7PA5QA: Downloading webpage [youtube] FSjU-7PA5QA: Extracting video information [youtube] FSjU-7PA5QA: Downloading DASH manifest [debug] Invoking downloader on u'https://r6---sn-u2bpouxgoxu-hxal.googlevideo.com/videoplayback?mime=video%2Fmp4&pl=23&ip=60.242.138.70&expire=1426413866&ms=au&source=youtube&dur=187.501&mv=m&id=1528d4fbb3c0e500&key=yt5&mm=31&ipbits=0&fexp=907263%2C927622%2C934954%2C9406983%2C9407103%2C943917%2C948124%2C951511%2C951703%2C952302%2C952612%2C952901%2C955301%2C957201%2C959701&initcwndbps=622500&sver=3&upn=GvEIGmb2dHc&sparams=dur%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmime%2Cmm%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&requiressl=yes&itag=22&mt=1426392233&signature=07B893406B601B8A626DA78FCC957D0221644132.419A710F9F25DB58C7DED0467AFA6EC3C729B6A9&ratebypass=yes' [download] Resuming download at byte 29442517 [download] Destination: James Recommends - Apotheon - Greek Art Comes to Life as a Metroidvania Game-FSjU-7PA5QA.mp4

[download] 50.3% of 55.82MiB at 10.64KiB/s ETA 44:29 [download] 50.3% of 55.82MiB at 31.91KiB/s ETA 14:49 [download] 50.3% of 55.82MiB at 74.47KiB/s ETA 06:21 [download] 50.3% of 55.82MiB at 159.57KiB/s ETA 02:57 [download] 50.4% of 55.82MiB at 180.23KiB/s ETA 02:37 [download] 50.4% of 55.82MiB at 212.12KiB/s ETA 02:13 [download] 50.5% of 55.82MiB at 203.53KiB/s ETA 02:18 [download] 50.8% of 55.82MiB at 185.72KiB/s ETA 02:31 [download] 51.1% of 55.82MiB at 197.81KiB/s ETA 02:21 [download] 51.4% of 55.82MiB at 221.04KiB/s ETA 02:05 [download] 51.9% of 55.82MiB at 245.68KiB/s ETA 01:51 [download] 52.5% of 55.82MiB at 275.53KiB/s ETA 01:38 [download] 53.2% of 55.82MiB at 303.36KiB/s ETA 01:28 [download] 54.0% of 55.82MiB at 340.63KiB/s ETA 01:17 [download] 55.1% of 55.82MiB at 397.01KiB/s ETA 01:04 [download] 56.6% of 55.82MiB at 456.54KiB/s ETA 00:54 [download] 58.2% of 55.82MiB at 502.88KiB/s ETA 00:47 [download] 59.7% of 55.82MiB at 541.14KiB/s ETA 00:42 [download] 61.3% of 55.82MiB at 570.39KiB/s ETA 00:38 [download] 62.7% of 55.82MiB at 596.40KiB/s ETA 00:35 [download] 64.3% of 55.82MiB at 617.11KiB/s ETA 00:33 [download] 65.8% of 55.82MiB at 634.53KiB/s ETA 00:30 [download] 67.3% of 55.82MiB at 650.64KiB/s ETA 00:28 [download] 68.9% of 55.82MiB at 665.07KiB/s ETA 00:26 [download] 70.4% of 55.82MiB at 677.87KiB/s ETA 00:24 [download] 71.9% of 55.82MiB at 687.53KiB/s ETA 00:23 [download] 73.4% of 55.82MiB at 698.72KiB/s ETA 00:21 [download] 75.0% of 55.82MiB at 706.98KiB/s ETA 00:20 [download] 76.5% of 55.82MiB at 715.01KiB/s ETA 00:18 [download] 78.1% of 55.82MiB at 722.64KiB/s ETA 00:17 [download] 79.6% of 55.82MiB at 729.65KiB/s ETA 00:15 [download] 81.2% of 55.82MiB at 735.19KiB/s ETA 00:14 [download] 82.7% of 55.82MiB at 740.64KiB/s ETA 00:13 [download] 84.2% of 55.82MiB at 745.36KiB/s ETA 00:12 [download] 85.7% of 55.82MiB at 751.01KiB/s ETA 00:10 [download] 87.3% of 55.82MiB at 756.14KiB/s ETA 00:09 [download] 88.8% of 55.82MiB at 760.90KiB/s ETA 00:08 [download] 90.4% of 55.82MiB at 764.21KiB/s ETA 00:07 [download] 91.9% of 55.82MiB at 768.75KiB/s ETA 00:06 [download] 93.5% of 55.82MiB at 771.84KiB/s ETA 00:04 [download] 95.0% of 55.82MiB at 774.96KiB/s ETA 00:03 [download] 96.5% of 55.82MiB at 778.00KiB/s ETA 00:02 [download] 98.1% of 55.82MiB at 781.25KiB/s ETA 00:01 [download] 99.6% of 55.82MiB at 783.40KiB/s ETA 00:00 [download] 100.0% of 55.82MiB at 785.41KiB/s ETA 00:00 [download] 100% of 55.82MiB in 00:36
[ffmpeg] Adding metadata to 'James Recommends - Apotheon - Greek Art Comes to Life as a Metroidvania Game-FSjU-7PA5QA.mp4' [debug] ffmpeg command line: ffmpeg -y -i 'James Recommends - Apotheon - Greek Art Comes to Life as a Metroidvania Game-FSjU-7PA5QA.mp4' -c copy -metadata 'comment=Buy Apotheon: http://bit.ly/1AnXxye See what else James Recommmends: http://bit.ly/JRecommends Subscribe for new recommendations every Friday! http://bit.ly/SubToEC

Platforms: PC, Mac, Linux, PS4

Get our full list of recommended games on Steam! http://bit.ly/ECCurator


James Recommends Apotheon, a visually stunning game that brings the style of ancient Grecian urns to life with a 2D side-scrolling platformer. The Metroidvania bones of the game are solid, with a Mount & Blade inspired combat system that feels fresh and fun. The story leans heavily on traditional elements of Greek mythology that'"'"'s unfortunately undercut by poor voice acting, but the surprisingly new and creative idea to use a Greek art style matches traditional platforming gameplay so perfectly that the game still succeeds in creating a compelling world.


Follow us on Twitch! http://bit.ly/ECTwitch Follow us on Twitter! http://bit.ly/ECTweet Follow us on Facebook! http://bit.ly/ECFBPage


Recommended for you!

James Recommends - Dark, Atmospheric Puzzle Platformer The Swapper: http://bit.ly/JRecommends

Design Club - How the Wii Remake Scored a KO The Animation of Punch Out!!: http://bit.ly/1D9fQOs


Get the theme music here! http://bit.ly/1l9KYld


Check for hidden annotations or turn on subtitles for Bonus Facts about Apotheon!' -metadata 'description=Buy Apotheon: http://bit.ly/1AnXxye See what else James Recommmends: http://bit.ly/JRecommends Subscribe for new recommendations every Friday! http://bit.ly/SubToEC

Platforms: PC, Mac, Linux, PS4

Get our full list of recommended games on Steam! http://bit.ly/ECCurator


James Recommends Apotheon, a visually stunning game that brings the style of ancient Grecian urns to life with a 2D side-scrolling platformer. The Metroidvania bones of the game are solid, with a Mount & Blade inspired combat system that feels fresh and fun. The story leans heavily on traditional elements of Greek mythology that'"'"'s unfortunately undercut by poor voice acting, but the surprisingly new and creative idea to use a Greek art style matches traditional platforming gameplay so perfectly that the game still succeeds in creating a compelling world.


Follow us on Twitch! http://bit.ly/ECTwitch Follow us on Twitter! http://bit.ly/ECTweet Follow us on Facebook! http://bit.ly/ECFBPage


Recommended for you!

James Recommends - Dark, Atmospheric Puzzle Platformer The Swapper: http://bit.ly/JRecommends

Design Club - How the Wii Remake Scored a KO The Animation of Punch Out!!: http://bit.ly/1D9fQOs


Get the theme music here! http://bit.ly/1l9KYld


Check for hidden annotations or turn on subtitles for Bonus Facts about Apotheon!' -metadata 'artist=Extra Credits' -metadata 'title=James Recommends - Apotheon - Greek Art Comes to Life as a Metroidvania Game' -metadata date=20150313 -metadata 'purl=https://www.youtube.com/watch?v=FSjU-7PA5QA' 'James Recommends - Apotheon - Greek Art Comes to Life as a Metroidvania Game-FSjU-7PA5QA.temp.mp4' Traceback (most recent call last): File "main.py", line 19, in File "youtube_dlinit.pyo", line 403, in main File "youtube_dlinit.pyo", line 393, in _real_main File "youtube_dl\YoutubeDL.pyo", line 1448, in download File "youtube_dl\YoutubeDL.pyo", line 660, in extract_info File "youtube_dl\YoutubeDL.pyo", line 819, in process_ie_result File "youtube_dl\YoutubeDL.pyo", line 713, in process_ie_result File "youtube_dl\YoutubeDL.pyo", line 660, in extract_info File "youtube_dl\YoutubeDL.pyo", line 706, in process_ie_result File "youtube_dl\YoutubeDL.pyo", line 1149, in process_video_result File "youtube_dl\YoutubeDL.pyo", line 1431, in process_info File "youtube_dl\YoutubeDL.pyo", line 1489, in post_process File "youtube_dl\postprocessor\ffmpeg.pyo", line 576, in run WindowsError: [Error 183] Cannot create a file when that file already exists

RadAd commented 9 years ago

Can we change the order of the operations to avoid the error Im getting. ie:

os.rename(encodeFilename(filename), encodeFilename(temp_filename)) self.run_ffmpeg(temp_filename, filename, options) os.remove(encodeFilename(temp_filename))