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
132.18k stars 10.02k forks source link

Accented character in output filename causes error #2452

Closed mr-brunes closed 9 years ago

mr-brunes commented 10 years ago

Hi

I've just started using youtube-dl on Windows 7 but ran into problems e.g.

E:\downloads>youtube-dl http://culturebox.francetvinfo.fr/sons-dhiver-20 14-pere-ubu-147937 [culturebox.francetvinfo.fr] sons-dhiver-2014-pere-ubu-147937: Downloading webpa ge [culturebox.francetvinfo.fr] EV_6886: Downloading XML config [download] Destination: Sons d'hiver 2014 - PÞre Ubu-EV_6886.mp4 ERROR: m3u8 download detected but ffmpeg or avconv could not be found

So I then googled for ffmpeg and downloaded it from http://ffmpeg.zeranoe.com/builds/. I copied the ffmpeg exe into the E:|downloads folder and ran youtube-dl again. It gets slightly further but still an error:

E:\downloads>youtube-dl http://culturebox.francetvinfo.fr/sons-dhiver-20 14-pere-ubu-147937 [culturebox.francetvinfo.fr] sons-dhiver-2014-pere-ubu-147937: Downloading webpa ge [culturebox.francetvinfo.fr] EV_6886: Downloading XML config [download] Destination: Sons d'hiver 2014 - PÞre Ubu-EV_6886.mp4 Traceback (most recent call last): File "main.py", line 18, in File "youtube_dlinit.pyo", line 805, in main File "youtube_dlinit.pyo", line 795, in _real_main File "youtube_dl\YoutubeDL.pyo", line 982, in download File "youtube_dl\YoutubeDL.pyo", line 510, in extract_info File "youtube_dl\YoutubeDL.pyo", line 539, in process_ie_result File "youtube_dl\YoutubeDL.pyo", line 763, in process_video_result File "youtube_dl\YoutubeDL.pyo", line 953, in process_info File "youtube_dl\YoutubeDL.pyo", line 929, in dl File "youtube_dl\downloader\common.pyo", line 290, in download File "youtube_dl\downloader\hls.pyo", line 29, in real_download File "subprocess.pyo", line 524, in call File "subprocess.pyo", line 711, in init File "subprocess.pyo", line 948, in _execute_child UnicodeEncodeError: 'ascii' codec can't encode character u'\xe8' in position 213 : ordinal not in range(128)

What now?

mr-brunes commented 10 years ago

FWIW youtube seems to download fine:

E:\downloads>youtube-dl http://www.youtube.com/watch?v=1hYqvtHzr48 [youtube] Setting language [youtube] 1hYqvtHzr48: Downloading webpage [youtube] 1hYqvtHzr48: Downloading video info webpage [youtube] 1hYqvtHzr48: Extracting video information [download] Destination: Pere Ubu, 'Breath'-1hYqvtHzr48.mp4 [download] 100% of 10.62MiB in 00:01

mr-brunes commented 10 years ago

OK I found the problem - it looks to be a character in the output filename (maybe the accented e in "Pere" which gets changed to "PÞre"). If I change that via:

E:\downloads>youtube-dl http://culturebox.francetvinfo.fr/sons-dhiver-2014-pere-ubu-147937 -o %(uploader)s

then it downloads fine.

dstftw commented 9 years ago

This will be fixed in the next version. Thanks for the report.

phihag commented 9 years ago

I believe this issue to be fixed in youtube-dl 2015.02.02.2. See our FAQ if you need help updating.