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

youtube-dl does not download the next format when UnicodeEncodeError: is raised #17813

Closed
sebma opened this issue Oct 6, 2018 · 1 comment
Closed

Comments

@sebma
Copy link

@sebma sebma commented Oct 6, 2018

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.10.05. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2018.10.05

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

Description of your issue, suggested solution and other information

Hi,

I'm using the --add-metadata option and I'm trying to download a youtube video in both webm (43) and mp4 (18) formats :

$ /usr/local/bin/youtube-dl --ignore-config -v -f 43,18 --ignore-errors --prefer-ffmpeg --restrict-filenames -o"%(playlist_title)s/%(title)s__%(format_id)s__%(id)s.%(ext)s" --add-metadata https://www.youtube.com/watch?v=kdmHbcsEJZM
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--ignore-config', '-v', '-f', '43,18', '--ignore-errors', '--prefer-ffmpeg', '--restrict-filenames', '-o%(playlist_title)s/%(title)s__%(format_id)s__%(id)s.%(ext)s', '--add-metadata', 'https://www.youtube.com/watch?v=kdmHbcsEJZM']
[debug] Encodings: locale ANSI_X3.4-1968, fs ascii, out ANSI_X3.4-1968, pref ANSI_X3.4-1968
[debug] youtube-dl version 2018.10.05
[debug] Python version 3.4.3 (CPython) - Linux-4.4.0-135-generic-x86_64-with-Ubuntu-14.04-trusty
[debug] exe versions: avconv 3.4.4-1, avprobe 3.4.4-1, ffmpeg 3.4.4-1, ffprobe 3.4.4-1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] kdmHbcsEJZM: Downloading webpage
[youtube] kdmHbcsEJZM: Downloading video info webpage
[info] kdmHbcsEJZM: downloading video in 2 formats
[debug] Invoking downloader on 'https://r6---sn-4gxx-25gel.googlevideo.com/videoplayback?requiressl=yes&clen=100791232&c=WEB&signature=6A11266BA8091DA89F4E32E77D28C3C5AB35BBF3.11893D1A1A4E9DD61269A747CFB2A3EA6263332D&nh=EAE%2CEAE&ipbits=0&initcwndbps=512500&mime=video%2Fwebm&itag=43&fvip=6&ratebypass=yes&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cnh%2Cpcm2cms%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&expire=1538857137&key=yt6&gir=yes&mn=sn-4gxx-25gel%2Csn-4gxx-25gy&mm=31%2C29&mt=1538835430&id=o-ACAgUSn8wYt1DKhrrjSfczi57fdJEsM0JnOGSzW7O4m7&lmt=1473228356850694&ip=88.168.223.194&pl=23&pcm2cms=yes&dur=0.000&mv=m&source=youtube&ms=au%2Crdu&ei=UcS4W9rbD9WSxgKkh6yQDA'
[download] NA/20160906_TVB_Pearl_Pastor_Joseph_Prince__43__kdmHbcsEJZM.webm has already been downloaded
[download] 100% of 96.12MiB
[ffmpeg] Adding metadata to 'NA/20160906_TVB_Pearl_Pastor_Joseph_Prince__43__kdmHbcsEJZM.webm'
[debug] ffmpeg command line: ffmpeg -y -i file:NA/20160906_TVB_Pearl_Pastor_Joseph_Prince__43__kdmHbcsEJZM.webm -c copy -metadata date=20160906 -metadata 'purl=https://www.youtube.com/watch?v=kdmHbcsEJZM' -metadata 'title=20160906  TVB Pearl  ( / ) Pastor Joseph Prince' -metadata description= -metadata comment= -metadata 'artist=Gary Yeung' file:NA/20160906_TVB_Pearl_Pastor_Joseph_Prince__43__kdmHbcsEJZM.temp.webm
ERROR: 'ascii' codec can't encode characters in position 26-30: ordinal not in range(128)
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/YoutubeDL.py", line 803, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/YoutubeDL.py", line 857, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/YoutubeDL.py", line 1635, in process_video_result
    self.process_info(new_info)
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/YoutubeDL.py", line 1982, in process_info
    self.post_process(filename, info_dict)
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/YoutubeDL.py", line 2047, in post_process
    files_to_delete, info = pp.run(info)
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/postprocessor/ffmpeg.py", line 465, in run
    self.run_ffmpeg_multiple_files(in_filenames, temp_filename, options)
  File "/usr/local/lib/python3.4/dist-packages/youtube_dl/postprocessor/ffmpeg.py", line 199, in run_ffmpeg_multiple_files
    p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
  File "/usr/lib/python3.4/subprocess.py", line 859, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.4/subprocess.py", line 1395, in _execute_child
    restore_signals, start_new_session, preexec_fn)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 26-30: ordinal not in range(128)

$ echo $?
1

Can you help ?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Oct 6, 2018

Setup UTF-8 locale.

@dstftw dstftw closed this Oct 6, 2018
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
2 participants
You can’t perform that action at this time.