Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Failure extracting audio, "TypeError: coercing to Unicode: need string or buffer, NoneType found" #7371
Comments
|
Note that you need to have ffmpeg installed to extract the audio, but it's strange that you have ffprobe available but not ffmpeg. If you can't run |
|
Hi jaime, thanks for the response. I installed ffmpeg and it fixed the issue. I got confused by an error message. Let me show you where that error message was. When I first downloaded youtube-dl and I did not have ffmpeg installed, I got the following result youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=so8V5dAli-Q Knowing that youtube-dl depended on ffmpeg for audio extraction, I read the error message too fast and thought it said ffmpeg, not ffprobe. I installed ffmpeg and got the same result as not having it installed. Thinking I only needed ffprobe, I uninstalled ffmpeg then installed ffprobe. That's how I wound up in the state where I reported the issue. If the error message said that I needed ffmpeg and ffprobe installed I may have been able to avoid the confusion. I don't know if ffmpeg and ffprobe usually come bundled together, in which case my problem would be unusual, but I was installing them (in the laziest way possible) on my mac by copying binaries to /usr/local/bin, and on the websites that ffmpeg.org links to for mac binaries they have separate ones for ffmpeg and ffprobe. Thanks for your hard work, jaime! I'm a huge fan of youtube-dl (: |
youtube-dl -v -x https://www.youtube.com/watch?v=so8V5dAli-Q
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'-x', u'https://www.youtube.com/watch?v=so8V5dAli-Q']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.11.02
[debug] Python version 2.7.6 - Darwin-14.4.0-x86_64-i386-64bit
[debug] exe versions: ffprobe 2.8.1-tessus
[debug] Proxy map: {}
[youtube] so8V5dAli-Q: Downloading webpage
[youtube] so8V5dAli-Q: Downloading video info webpage
[youtube] so8V5dAli-Q: Extracting video information
[youtube] {22} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] {43} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] {18} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] {5} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] {36} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] {17} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] {137} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] {248} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] {136} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] {247} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] {135} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] {244} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] {134} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] {243} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] {133} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] {242} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] {160} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] {278} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] {140} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] {171} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] {249} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] {250} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] {251} signature length 41.43, html5 player new-en_US-vfloMUtOf
[youtube] so8V5dAli-Q: Downloading DASH manifest
[debug] Invoking downloader on u'https://r16---sn-o097znel.googlevideo.com/videoplayback?mt=1446700286&expire=1446721923&nh=IgpwcjAyLnBhbzAzKgkxMjcuMC4wLjE&clen=3623823&requiressl=yes&sparams=clen%2Cdur%2Cgcr%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cnh%2Cpl%2Crequiressl%2Csource%2Cupn%2Cexpire&ipbits=0&itag=251&upn=HXmG_zOdH0Y&fexp=9408710%2C9409129%2C9414764%2C9416126%2C9417683%2C9417707%2C9418401%2C9419541%2C9420238%2C9421544%2C9422596%2C9422618%2C9423625%2C9423644%2C9423663%2C9423667%2C9423793%2C9423940&gcr=us&mv=m&pl=18&id=o-AO6lCdtTTdszA0wciNwTRTtjoATX25mmMqzXqXYK9-rf&ms=au&source=youtube&lmt=1440726237007579&keepalive=yes&dur=213.221&sver=3&ip=76.103.17.144&key=yt6&mm=31&mn=sn-o097znel&initcwndbps=877500&mime=audio%2Fwebm&gir=yes&signature=C3189F6CEF418EA72514E2F25E0BC7A7123F9858.352C92D8FDA19DD426F7DADF2D69EF924A3577B9&ratebypass=yes'
[download] Halsey - Control (Audio)-so8V5dAli-Q.webm has already been downloaded
[download] 100% of 3.46MiB
[debug] None command line: ffprobe -show_streams 'file:Halsey - Control (Audio)-so8V5dAli-Q.webm'
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/bin/youtube-dl/main.py", line 19, in
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 410, in main
File "/usr/local/bin/youtube-dl/youtube_dl/init.py", line 400, in _real_main
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1666, in download
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 672, in extract_info
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 718, in process_ie_result
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1336, in process_video_result
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1648, in process_info
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1712, in post_process
File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 281, in run
TypeError: coercing to Unicode: need string or buffer, NoneType found