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

Asian characters restricted in filenames. #5045

Closed
seojoohyun opened this issue Feb 24, 2015 · 10 comments
Closed

Asian characters restricted in filenames. #5045

seojoohyun opened this issue Feb 24, 2015 · 10 comments

Comments

@seojoohyun
Copy link

@seojoohyun seojoohyun commented Feb 24, 2015

Using Windows 7. I was having some problems downloading a video so I did a -U to update to the latest version (2015.02.23.1) to see if that would help, but after the update I no longer get the full file names, specifically east asian characters are being stripped out.
For example on a video like this one:

https://www.youtube.com/watch?v=ouR4nn1G9r4

instead of (하이포, 아이유) I just get (, )

Edit.... I usually use a batch file to run youtube-dl, with something like this in it:

youtube-dl.py -w -f22 -o %%(title)s-%%(id)s-720.%%(ext)s http://www.youtube.com/watch?v=%1

@phihag
Copy link
Contributor

@phihag phihag commented Feb 24, 2015

Can you post the output you get when you add -v to your command line? That output tells us how to reproduce the problem.

@seojoohyun
Copy link
Author

@seojoohyun seojoohyun commented Feb 25, 2015

C:\Videos\ytdl>youtube-dl.py -v -w -f22 -o %(title)s-%(id)s-720.%(ext)s http://www.youtube.com/watch?v=ouR4nn1G9r4
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', '-w', '-f22', '-o', '%(title)s-%(id)s-720.%(ext)s', 'http://www.youtube.com/watch?v=ou
R4nn1G9r4']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2015.02.23.1
[debug] Python version 2.7.6 - Windows-7-6.1.7601-SP1
[debug] exe versions: rtmpdump 2.4
[debug] Proxy map: {}
[youtube] ouR4nn1G9r4: Downloading webpage
[youtube] ouR4nn1G9r4: Extracting video information
[youtube] {22} signature length 40.41, html5 player en_US-vflq_9mxe
[youtube] {43} signature length 40.41, html5 player en_US-vflq_9mxe
[youtube] {18} signature length 40.41, html5 player en_US-vflq_9mxe
[youtube] {5} signature length 40.41, html5 player en_US-vflq_9mxe
[youtube] {36} signature length 40.41, html5 player en_US-vflq_9mxe
[youtube] {17} signature length 40.41, html5 player en_US-vflq_9mxe
[youtube] {137} signature length 40.41, html5 player en_US-vflq_9mxe
[youtube] {248} signature length 40.41, html5 player en_US-vflq_9mxe
[youtube] {136} signature length 40.41, html5 player en_US-vflq_9mxe
[youtube] {247} signature length 40.41, html5 player en_US-vflq_9mxe
[youtube] {135} signature length 40.41, html5 player en_US-vflq_9mxe
[youtube] {244} signature length 40.41, html5 player en_US-vflq_9mxe
[youtube] {134} signature length 40.41, html5 player en_US-vflq_9mxe
[youtube] {243} signature length 40.41, html5 player en_US-vflq_9mxe
[youtube] {133} signature length 40.41, html5 player en_US-vflq_9mxe
[youtube] {242} signature length 40.41, html5 player en_US-vflq_9mxe
[youtube] {160} signature length 40.41, html5 player en_US-vflq_9mxe
[youtube] {140} signature length 40.41, html5 player en_US-vflq_9mxe
[youtube] {171} signature length 40.41, html5 player en_US-vflq_9mxe
[youtube] ouR4nn1G9r4: Downloading DASH manifest
[debug] Invoking downloader on u'https://r4---sn-8xgp1vo-2ias.googlevideo.com/videoplayback?ms=au&ip=84.17.35.33&requir
essl=yes&mime=video%2Fmp4&key=yt5&mt=1424822818&mv=m&sparams=dur%2Cgcr%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmime%2C
mm%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&id=o-AEUuKewraoOmi-vUxX4ZH-sexm4aj4ZAGs0bsfTElDtv&pl
=20&mm=31&itag=22&initcwndbps=1657500&source=youtube&upn=sdTnuEMsHvU&gcr=us&sver=3&ipbits=0&fexp=905657%2C907263%2C92762
2%2C934954%2C936118%2C943917%2C947225%2C947240%2C948124%2C951703%2C952302%2C952605%2C952612%2C952901%2C955301%2C957201%2
C959701&dur=204.335&ratebypass=yes&expire=1424844443&signature=726BB420B0CA4B030480055EABEFECF755D612DC.6F0A9BF66AD13FF9
40445C4685E66BC2FE794189'
[download] Destination: [MV] HIGH4, IU(, ) _ Not Spring, Love, or Cherry Blossoms(,, )-ouR4nn1G9r4-720.mp4
[download] 100% of 35.43MiB in 00:09

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 28, 2015

That's caused by 3a0d2f5 as workaround for #4787 on python2 @ Windows.

@seojoohyun
Copy link
Author

@seojoohyun seojoohyun commented Feb 28, 2015

Do I understand this correctly..... in order to be able to pass the filenames to ffmpeg/ffprobe for post processing, the filenames are stripped of these characters when saved?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 28, 2015

@seojoohyun exactly, or replaced with 'counterparts' according to preferredencoding.

@seojoohyun
Copy link
Author

@seojoohyun seojoohyun commented Mar 3, 2015

I don't have any need for post processing with ffmpeg, but I do want the complete filenames, so I modified my local copy by commenting out those lines added in the workaround. That makes it work for my purposes.
I take it that upgrading to python 3 would eliminate this problem?

It would be nice if there was a command line option to disable it trying to use ffmpeg. For example I don't want the DASH audio files converted to work with itunes or whatever, but it tries to do it automatically and keeps giving me a warning.

@casinero
Copy link

@casinero casinero commented Mar 3, 2015

Another proposal: adding a command-line switch which offers complete filename like old times, and simply stating in the help docs that this switch might conflict with post-processing feature.
So the overall default behavior of youtube-dl doesn't change, and people who do want both post-processing feature and complete filenames like me can always do the following things manually or scriptingly: normally download videos with whatever post-processing features it takes (actually even --restrict-filenames could be used to prevent similar locale/encoding issues), and use --get-filename or -j combined with the aforementioned switch to get the complete filename, then rename by ourselves.

@Steveland
Copy link

@Steveland Steveland commented Mar 6, 2015

Why is youtube-dl.exe still using python version 2? updating to version 3 should solve the issues with unicode.

@dogancelik
Copy link

@dogancelik dogancelik commented Jul 24, 2015

I want to have original filenames when doing -f bestvideo+bestaudio. Is there a solution for this?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented May 29, 2016

Fix for this issue has just landed in youtube-dl 2016.05.30 along with switch to Python 3 for Windows build.

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
6 participants
You can’t perform that action at this time.