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

Chinese title was missing ! #9104

Closed
steveyang331 opened this issue Apr 7, 2016 · 6 comments
Closed

Chinese title was missing ! #9104

steveyang331 opened this issue Apr 7, 2016 · 6 comments

Comments

@steveyang331
Copy link

@steveyang331 steveyang331 commented Apr 7, 2016

root@kangland:/var/www/ydy# youtube-dl -v w0dMz8RBG7g
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'w0dMz8RBG7g']
[debug] Encodings: locale ANSI_X3.4-1968, fs ANSI_X3.4-1968, out ANSI_X3.4-1968, pref ANSI_X3.4-1968
[debug] youtube-dl version 2016.04.01
[debug] Python version 2.7.6 - Linux-2.6.32-042stab113.11-i686-with-Ubuntu-14.04-trusty
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] w0dMz8RBG7g: Downloading webpage
[youtube] w0dMz8RBG7g: Downloading video info webpage
[youtube] w0dMz8RBG7g: Extracting video information
[youtube] {22} signature length 41.43, html5 player en_US-vfli5QvRo
[youtube] w0dMz8RBG7g: Downloading player https://s.ytimg.com/yts/jsbin/player-en_US-vfli5QvRo/base.js
[youtube] {43} signature length 41.43, html5 player en_US-vfli5QvRo
[youtube] {18} signature length 41.43, html5 player en_US-vfli5QvRo
[youtube] {5} signature length 41.43, html5 player en_US-vfli5QvRo
[youtube] {36} signature length 41.43, html5 player en_US-vfli5QvRo
[youtube] {17} signature length 41.43, html5 player en_US-vfli5QvRo
[youtube] {136} signature length 41.43, html5 player en_US-vfli5QvRo
[youtube] {247} signature length 41.43, html5 player en_US-vfli5QvRo
[youtube] {135} signature length 41.43, html5 player en_US-vfli5QvRo
[youtube] {244} signature length 41.43, html5 player en_US-vfli5QvRo
[youtube] {134} signature length 41.43, html5 player en_US-vfli5QvRo
[youtube] {243} signature length 41.43, html5 player en_US-vfli5QvRo
[youtube] {133} signature length 41.43, html5 player en_US-vfli5QvRo
[youtube] {242} signature length 41.43, html5 player en_US-vfli5QvRo
[youtube] {160} signature length 41.43, html5 player en_US-vfli5QvRo
[youtube] {278} signature length 41.43, html5 player en_US-vfli5QvRo
[youtube] {140} signature length 41.43, html5 player en_US-vfli5QvRo
[youtube] {171} signature length 41.43, html5 player en_US-vfli5QvRo
[youtube] {249} signature length 41.43, html5 player en_US-vfli5QvRo
[youtube] {250} signature length 41.43, html5 player en_US-vfli5QvRo
[youtube] {251} signature length 41.43, html5 player en_US-vfli5QvRo
[debug] Invoking downloader on u'https://r2---sn-a8au-vgqe.googlevideo.com/videoplayback?ms=au&mt=1460039622&pl=40&mv=m&key=yt6&pte=yes&mm=31&mn=sn-a8au-vgqe&sver=3&fexp=9407059%2C9416126%2C9416891%2C9420452%2C9422596%2C9423662%2C9426926%2C9427902%2C9428398%2C9432364&ratebypass=yes&ipbits=0&initcwndbps=26957500&expire=1460061513&upn=NhCteH8M5OA&mime=video%2Fmp4&axtags=tx%3D9417362&id=o-AEE-ylzEiNeRWF2HIs5_rsDGUftXqgxkV7V0eUSq7oZ4&dur=214.111&source=youtube&ip=2602%3Aff62%3A104%3Ae6%3A%3A&sparams=axtags%2Cdur%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cpte%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&requiressl=yes&lmt=1458219184364643&itag=22&signature=B1E1AF27412C916392FF49F1D60F0771145BE274.DA5587721204D947940DB57A584188E732C36433'
[download] Destination: Wanting  -  (You Exist In My Song) [Trad. Chinese] [Official Music Video]-w0dMz8RBG7g.mp4
[download] 100% of 32.20MiB in 00:00

root@kangland:/var/www/ydy# locale
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
root@kangland:/var/www/ydy# locale -a
C
C.UTF-8
POSIX
zh_CN.utf8
zh_HK.utf8
zh_TW.utf8

Run : youtube-dl -f 'best[height=360]' --restrict-filenames -i -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' PL1OKxDwI_y_AO1Lb-zO57wYdpWqhk7MUs

Result : [download] _/01 - _.mp4

How to fix chinese title ?

Thank you so much !

@dstftw dstftw closed this Apr 7, 2016
@dstftw dstftw reopened this Apr 7, 2016
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Apr 7, 2016

Remove --restrict-filenames and setup your locale to UTF-8.

@dstftw dstftw closed this Apr 7, 2016
@steveyang331
Copy link
Author

@steveyang331 steveyang331 commented Apr 7, 2016

@dstftw @rg3 @ivan @blackwinter @aurium

Failed while remove --restrict-filenames.

root@kangland:/var/www/yyyy# youtube-dl -f 'best[height=360]' -i -o '%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s' PL1OKxDwI_y_AO1Lb-zO57wYdpWqhk7MUs


[youtube:playlist] PL1OKxDwI_y_AO1Lb-zO57wYdpWqhk7MUs: Downloading webpage
[download] Downloading playlist: 
[youtube:playlist] playlist : Downloading 47 videos
[download] Downloading video 1 of 47
[youtube] FeHGGNSLyTQ: Downloading webpage
[youtube] FeHGGNSLyTQ: Downloading video info webpage
[youtube] FeHGGNSLyTQ: Extracting video information
[youtube] FeHGGNSLyTQ: Downloading MPD manifest


[download] /01 -  ''.mp4 has already been downloaded


[download] 100% of 15.82MiB
[download] Downloading video 2 of 47
[youtube] -AsYYN4pCBQ: Downloading webpage
[youtube] -AsYYN4pCBQ: Downloading video info webpage
[youtube] -AsYYN4pCBQ: Extracting video information
[youtube] -AsYYN4pCBQ: Downloading MPD manifest
[download] /02 - ----.webm has already been downloaded
[download] 100% of 13.09MiB
[download] Downloading video 3 of 47
[youtube] QMSetA5UrEQ: Downloading webpage
[youtube] QMSetA5UrEQ: Downloading video info webpage
[youtube] QMSetA5UrEQ: Extracting video information
[youtube] QMSetA5UrEQ: Downloading MPD manifest
[download] /03 - 2012_03_21   .webm has already been downloaded
[download] 100% of 259.48MiB
[download] Downloading video 4 of 47
[youtube] lv3_I-aSCg8: Downloading webpage
[youtube] lv3_I-aSCg8: Downloading video info webpage
[youtube] lv3_I-aSCg8: Extracting video information
[youtube] lv3_I-aSCg8: Downloading MPD manifest
[download] /04 - -1_5.webm has already been downloaded
[download] 100% of 45.81MiB
[download] Downloading video 5 of 47
[youtube] eJcAQIMSjyw: Downloading webpage
[youtube] eJcAQIMSjyw: Downloading video info webpage
[youtube] eJcAQIMSjyw: Extracting video information
[youtube] eJcAQIMSjyw: Downloading MPD manifest
[download] /05 - -2_5.webm has already been downloaded
[download] 100% of 39.02MiB
[download] Downloading video 6 of 47
[youtube] Vz1Gt9Zq5SI: Downloading webpage
^C
ERROR: Interrupted by user

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Apr 7, 2016

setup your locale to UTF-8.

As @dstftw has said, prepend LC_ALL=zh_CN.utf8 to the command.

@steveyang331
Copy link
Author

@steveyang331 steveyang331 commented Apr 8, 2016

Maybe It's a VPS issues that setup locale to UTF.8 failed.

@phihag
Copy link
Contributor

@phihag phihag commented Apr 8, 2016

If you read closely, you'll see the line

[debug] Encodings: locale ANSI_X3.4-1968, fs ANSI_X3.4-1968, out ANSI_X3.4-1968, pref ANSI_X3.4-1968

in your output. That means that your system is only configured to use ASCII characters. Check your locale. In a shell, you can write something like

export LC_ALL=zh_CN.utf8

to make the whole shell use a Chinese locale, or

LC_ALL=zh_CN.utf8 youtube-dl PL1OKxDwI_y_AO1Lb-zO57wYdpWqhk7MUs

to do that for just one command. Another way to go at it would be to add the --encoding utf8 option to youtube-dl; for example in the youtube-dl configuration file.

It is preferable though to serve your general issue of not having a correct locale.

As an aside, do not run youtube-dl as root! It should be run as a regular user.

@steveyang331
Copy link
Author

@steveyang331 steveyang331 commented Apr 8, 2016

Waooo! It works fine !

Thank you so much @phihag .

I like direct comment more than unclear comment .

The key is the lower utf8 of export LC_ALL=zh_CN.utf8 and LC_ALL=zh_CN.utf8 .

I setup to uppercase 'UTF-8' from locale that was failed .

@steveyang331 steveyang331 changed the title Chinese title was gone ! Chinese title was missing ! Apr 8, 2016
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
4 participants
You can’t perform that action at this time.