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

DASH videos with Unicode titles/filenames prevent final muxing #2792

Open Fironet opened 10 years ago

Fironet commented 10 years ago

Noticed that if Unicode/foreign characters are in the video title the final DASH output files weren't muxing together when using the title as filename, instead the video and audio files are left separate.

If --restrict-filenames is used the files can be muxed, but it would be better if Unicode titles could be preserved by default.

Output using this video:

C:\Program Files (x86)\youtube-dl\youtube-dl.exe -o "C:\Users\Fironet\Desktop\%(title)s.%(ext)s" -f 135+171 -v https://www.youtube.com/watch?v=B0Y9RQo7BiE
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-o', 'C:\\Users\\Fironet\\Desktop\\%(title)s.%(ext)s'
, '-f', '135+171', '-v', 'https://www.youtube.com/watch?v=B0Y9RQo7BiE']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2014.04.13
[debug] Python version 2.7.5 - Windows-8-6.2.9200
[debug] Proxy map: {}
[youtube] Setting language
[youtube] B0Y9RQo7BiE: Downloading webpage
[youtube] B0Y9RQo7BiE: Downloading video info webpage
[youtube] B0Y9RQo7BiE: Extracting video information
[download] Destination: C:\Users\Fironet\Desktop\????? POCARI SWEAT.f135.mp4
[download] 100% of 19.35MiB in 01:12
[download] Destination: C:\Users\Fironet\Desktop\????? POCARI SWEAT.f171.webm
[download] 100% of 3.31MiB in 00:11
[ffmpeg] Merging formats into "C:\Users\Fironet\Desktop\????? POCARI SWEAT.mp4"
[debug] ffmpeg command line: ffmpeg -y -i 'C:\Users\Fironet\Desktop\ POCARI SWEAT.
f135.mp4' -i 'C:\Users\Fironet\Desktop\ POCARI SWEAT.f171.webm' -c copy 'C:\Users\
Fironet\Desktop\ POCARI SWEAT.mp4'
ERROR: C:\Users\Fironet\Desktop\ POCARI SWEAT.f135.mp4: No such file or directory
Traceback (most recent call last):
  File "youtube_dl\YoutubeDL.pyo", line 1070, in post_process
  File "youtube_dl\postprocessor\ffmpeg.pyo", line 487, in run
  File "youtube_dl\postprocessor\ffmpeg.pyo", line 61, in run_ffmpeg_multiple_fi
les
FFmpegPostProcessorError
PotcFdk commented 9 years ago

I can reproduce this on Windows 7:

E:\YouTube>youtube-dl.exe -U
youtube-dl is up-to-date (2014.09.29.2)

E:\YouTube>youtube-dl.exe https://www.youtube.com/watch?v=4i23UlVgdPY -F
[youtube] Setting language
[youtube] Confirming age
[youtube] 4i23UlVgdPY: Downloading webpage
[youtube] 4i23UlVgdPY: Downloading video info webpage
[youtube] 4i23UlVgdPY: Extracting video information
[info] Available formats for 4i23UlVgdPY:
format code extension resolution  note
140         m4a       audio only  DASH audio , audio@128k (worst)
160         mp4       144p        DASH video , video only
133         mp4       240p        DASH video , video only
134         mp4       360p        DASH video , video only
135         mp4       480p        DASH video , video only
136         mp4       720p        DASH video , video only
137         mp4       1080p       DASH video , video only
100         webm      360p        3D
82          mp4       360p        3D
84          mp4       720p        3D
17          3gp       176x144
36          3gp       320x240
5           flv       400x240
43          webm      640x360
18          mp4       640x360
22          mp4       1280x720    (best)

E:\YouTube>youtube-dl.exe https://www.youtube.com/watch?v=4i23UlVgdPY -f 137+140

[youtube] Setting language
[youtube] Confirming age
[youtube] 4i23UlVgdPY: Downloading webpage
[youtube] 4i23UlVgdPY: Downloading video info webpage
[youtube] 4i23UlVgdPY: Extracting video information
[download] Destination: Canon EOS 60D video test of toys (???????????)-4i23UlVgdPY.f137.mp4
[download] 100% of 8.89MiB in 00:06
[download] Destination: Canon EOS 60D video test of toys (???????????)-4i23UlVgdPY.f140.m4a
[download] 100% of 634.19KiB in 00:00
[ffmpeg] Merging formats into "Canon EOS 60D video test of toys (???????????)-4i23UlVgdPY.mp4"
ERROR: Canon EOS 60D video test of toys ()-4i23UlVgdPY.f137.mp4: No such file or directory

E:\YouTube>ls Canon*
Canon EOS 60D video test of toys (???????????)-4i23UlVgdPY.f137.mp4
Canon EOS 60D video test of toys (???????????)-4i23UlVgdPY.f140.m4a

The actual filenames of the files are correct: screenshot of files