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

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 17: ordinal not in range(128) #4775

Closed
gdudau opened this issue Jan 24, 2015 · 6 comments

Comments

@gdudau
Copy link

@gdudau gdudau commented Jan 24, 2015

This is happend when i want to extract audio using this command:
youtube-dl -x --audio-format "mp3" --audio-quality 0 "https://www.youtube.com/watch?v=7kHCOwakEIM"

[debug] System config: ['--prefer-free-formats']
[debug] User config: []
[debug] Command-line args: ['--verbose', '--extract-audio', '--audio-format', 'mp3', '--audio-quality', '0', 'https://www.youtube.com/watch?v=7kHCOwakEIM']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.01.23.4
[debug] Python version 2.7.5 - Linux-3.17.6-200.fc20.x86_64-x86_64-with-fedora-20-Heisenbug
Traceback (most recent call last):
File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/bin/youtube-dl/main.py", line 19, in
File "/usr/bin/youtube-dl/youtube_dl/init.py", line 366, in main
File "/usr/bin/youtube-dl/youtube_dl/init.py", line 335, in _real_main
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 300, in init
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1524, in print_debug_header
File "/usr/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 51, in get_versions
File "/usr/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 51, in
File "/usr/bin/youtube-dl/youtube_dl/utils.py", line 1322, in get_exe_version
File "/usr/lib64/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 17: ordinal not in range(128)

This not happend if i use:
youtube-dl "https://www.youtube.com/watch?v=7kHCOwakEIM"

Only audio extract is affected.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 24, 2015

Post the full output you get when running with --verbose option.

@gdudau
Copy link
Author

@gdudau gdudau commented Jan 24, 2015

i edited

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 24, 2015

Could you also post the output of ffmpeg -version and whereis ffmpeg?

@gdudau
Copy link
Author

@gdudau gdudau commented Jan 24, 2015

path - /bin/ffmpeg
ffmpeg version 2.1.7 Copyright (c) 2000-2014 the FFmpeg developers
built on Jan 3 2015 22:57:36 with gcc 4.8.3 (GCC) 20140911 (Red Hat 4.8.3-7)

FFMPEG it's working standalone:
for vid in *.mp4; do ffmpeg -i "$vid" -vn -acodec libmp3lame "${vid%}.mp3"; done
MP3 is extracted from video.

@gdudau
Copy link
Author

@gdudau gdudau commented Jan 24, 2015

ffmpeg:
/usr/bin/ffmpeg
/usr/share/ffmpeg
/usr/share/man/man1/ffmpeg.1.gz

@gdudau
Copy link
Author

@gdudau gdudau commented Apr 25, 2015

If i add
--prefer-ffmpeg
--ffmpeg-location "/usr/bin/ffmpeg" all are OK.

No error.

youtube-dl --prefer-ffmpeg --ffmpeg-location "/usr/bin/ffmpeg" --extract-audio --audio-format "mp3" --audio-quality 0 "https://www.youtube.com/watch?v=7kHCOwakEIM"

@gdudau gdudau closed this Apr 25, 2015
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.