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 ffprobe shell call on windows uses wrong quotes, causes error. #7997

Closed
zet4 opened this issue Dec 24, 2015 · 4 comments
Closed

youtube-dl ffprobe shell call on windows uses wrong quotes, causes error. #7997

zet4 opened this issue Dec 24, 2015 · 4 comments

Comments

@zet4
Copy link

@zet4 zet4 commented Dec 24, 2015

So I was having an issue on windows with youtube-dl, here is debug output below,
I found the problem is most likely related to windows stuff, but when ydl executes ffprobe, it uses wrong quotation resulting in erroneous output from ffprobe. (ie. ffprobe ... 'path: ...' which is bad, should be ffprobe ... "path: ..."

I would fix it locally but then I'd have to get all dependencies and stuff.

Z:\Music>ydl -x --audio-format mp3 -v -o "Zoeys Music/%(title)s.%(ext)s" https://www.youtube.com/playlist?list= Private Playlist
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-x', u'--audio-format', u'mp3', u'-v', u'-o', u'Zoeys Music/%(title)s.%(ext)s', u'https://www.youtube.com/playlist?list=...']
[debug] Encodings: locale cp1257, fs mbcs, out cp775, pref cp1257
[debug] youtube-dl version 2015.12.23
[debug] Python version 2.7.10 - Windows-8-6.2.9200
[debug] exe versions: ffmpeg N-77137-gff6dd58, ffprobe N-77137-gff6dd58
[debug] Proxy map: {}
[youtube:playlist] ... : Downloading webpage
[download] Downloading playlist: Stuff - current
...
[youtube:playlist] playlist Stuff - current: Downloading 446 videos
[download] Downloading video 1 of 446
[youtube] 9QoK0If7LCg: Downloading webpage
[youtube] 9QoK0If7LCg: Downloading video info webpage
[youtube] 9QoK0If7LCg: Extracting video information
[youtube] 9QoK0If7LCg: Downloading DASH manifest
[youtube] 9QoK0If7LCg: Downloading DASH manifest
[debug] Invoking downloader on u'https://r6---sn-p11p-gpme.googlevideo.com/videoplayback?id=f50a0ad087fb2c28&itag=141&source=youtube&requiressl=yes&mn=sn-p11p-gpme&mm=31&pl=21&mv=m&ms=au&ratebypass=yes&mime=audio/mp4&gir=yes&clen=7413317&lmt=1391743512965107&dur=232.501&fexp=9407196,9407535,9413279,9416126,9416495,9419887,9420452,9422147,9422596,9423662,9423924,9424448&signature=85637DBD6C596D341AF015FDB5BBB8B7877D48B1.6485FDB7B25A1A23A84CC82A682A2726F3E0B72F&sver=3&key=dg_yt0&mt=1450967337&upn=MhyHhg2nob4&ip=NO_IP&ipbits=0&expire=1450989018&sparams=ip,ipbits,expire,id,itag,source,requiressl,mn,mm,pl,mv,ms,ratebypass,mime,gir,clen,lmt,dur'
[download] Zoeys Music\Arven - Black is the Colour.m4a has already been downloaded
[download] 100% of 7.07MiB
[ffmpeg] Correcting container in "Zoeys Music\Arven - Black is the Colour.m4a"
[debug] ffmpeg command line: ffmpeg -y -i 'file:Zoeys Music\Arven - Black is the Colour.m4a' -c copy -f mp4 'file:Zoeys Music\Arven - Black is the Colour.temp.m4a'
[debug] ffmpeg command line: ffprobe -show_streams 'file:Zoeys Music\Arven - Black is the Colour.m4a'
ERROR: WARNING: unable to obtain file audio codec with ffprobe
Traceback (most recent call last):
  File "youtube_dl\YoutubeDL.pyo", line 1723, in post_process
  File "youtube_dl\postprocessor\ffmpeg.pyo", line 218, in run
PostProcessingError
Z:\Music>ffprobe -show_streams 'file:Zoeys Music\Arven - Black is the Colour.m4a'
ffprobe version N-77137-gff6dd58 Copyright (c) 2007-2015 the FFmpeg developers
  built with gcc 5.2.0 (GCC)
  configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 10.100 / 55. 10.100
  libavcodec     57. 17.100 / 57. 17.100
  libavformat    57. 19.100 / 57. 19.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 20.100 /  6. 20.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Argument 'Music\Arven' provided as input filename, but ''file:Zoeys' was already specified.
Z:\Music>ffprobe -show_streams "file:Zoeys Music\Arven - Black is the Colour.m4a"
ffprobe version N-77137-gff6dd58 Copyright (c) 2007-2015 the FFmpeg developers
  built with gcc 5.2.0 (GCC)
  configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
  libavutil      55. 10.100 / 55. 10.100
  libavcodec     57. 17.100 / 57. 17.100
  libavformat    57. 19.100 / 57. 19.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 20.100 /  6. 20.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file:Zoeys Music\Arven - Black is the Colour.m4a':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf57.19.100
  Duration: 00:03:52.50, start: 0.000000, bitrate: 254 kb/s
    Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 253 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[STREAM]
index=0
codec_name=aac
codec_long_name=AAC (Advanced Audio Coding)
profile=LC
codec_type=audio
codec_time_base=1/44100
codec_tag_string=mp4a
codec_tag=0x6134706d
sample_fmt=fltp
sample_rate=44100
channels=2
channel_layout=stereo
bits_per_sample=0
id=N/A
r_frame_rate=0/0
avg_frame_rate=0/0
time_base=1/44100
start_pts=0
start_time=0.000000
duration_ts=10253312
duration=232.501406
bit_rate=253588
max_bit_rate=253588
bits_per_raw_sample=N/A
nb_frames=10013
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=1
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
TAG:language=und
TAG:handler_name=SoundHandler
[/STREAM]
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Dec 24, 2015

It has nothing to do with single quotes:

> youtube-dl -x --audio-format mp3 -v -o "Zoeys Music/%(title)s.%(ext)s" 9QoK0If7LCg
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-x', u'--audio-format', u'mp3', u'-v', u'-o', u'Zoeys Music/%(title)s.%(ext)s', u'9QoK0If7LCg']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2015.12.23
[debug] Python version 2.7.10 - Windows-8-6.2.9200
[debug] exe versions: ffmpeg N-77137-gff6dd58, ffprobe N-77137-gff6dd58
[debug] Proxy map: {}
[youtube] 9QoK0If7LCg: Downloading webpage
[youtube] 9QoK0If7LCg: Downloading video info webpage
[youtube] 9QoK0If7LCg: Extracting video information
[youtube] 9QoK0If7LCg: Downloading DASH manifest
[youtube] 9QoK0If7LCg: Downloading DASH manifest
[debug] Invoking downloader on u'https://r2---sn-ug5onuxaxjvh-v8cl.googlevideo.com/videoplayback?id=f50a0ad087fb2c28&itag=141&source=youtube
&requiressl=yes&pl=24&mm=31&mn=sn-ug5onuxaxjvh-v8cl&mv=m&ms=au&ratebypass=yes&mime=audio/mp4&gir=yes&clen=7413317&lmt=1391743512965107&dur=2
32.501&signature=590E7ABF50F77F77F43B397CF7CF6AD4567B1A3E.6D33DD8150D3E160E0E90C256E6E05A13EF509F8&upn=wroH_b-LJQc&fexp=9413139,9415950,9416
126,9418184,9420452,9421585,9422596,9423662,9423715,9424436,9425255,9425620,9426127&mt=1450971743&key=dg_yt0&sver=3&ip=PRIVATE&ipbits=
0&expire=1450993421&sparams=ip,ipbits,expire,id,itag,source,requiressl,pl,mm,mn,mv,ms,ratebypass,mime,gir,clen,lmt,dur'
[download] Destination: Zoeys Music\Arven - Black is the Colour.m4a
[download] 100% of 7.07MiB in 00:02
[ffmpeg] Correcting container in "Zoeys Music\Arven - Black is the Colour.m4a"
[debug] ffmpeg command line: ffmpeg -y -i 'file:Zoeys Music\Arven - Black is the Colour.m4a' -c copy -f mp4 'file:Zoeys Music\Arven - Black
is the Colour.temp.m4a'
[debug] ffmpeg command line: ffprobe -show_streams 'file:Zoeys Music\Arven - Black is the Colour.m4a'
[ffmpeg] Destination: Zoeys Music\Arven - Black is the Colour.mp3
[debug] ffmpeg command line: ffmpeg -y -i 'file:Zoeys Music\Arven - Black is the Colour.m4a' -vn -acodec libmp3lame -q:a 5 'file:Zoeys Music
\Arven - Black is the Colour.mp3'
Deleting original file Zoeys Music\Arven - Black is the Colour.m4a (pass -k to keep)
@zet4
Copy link
Author

@zet4 zet4 commented Dec 24, 2015

@dstftw did you try that on windows or linux?
On windows I get

Z:\Music>ydl  -x --audio-format mp3 -v -o "Zoeys Music/%(title)s.%(ext)s" 9QoK0If7LCg
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-x', u'--audio-format', u'mp3', u'-v', u'-o', u'Zoeys Music/%(title)s.%(ext)s', u'9QoK0If7LCg']
[debug] Encodings: locale cp1257, fs mbcs, out cp775, pref cp1257
[debug] youtube-dl version 2015.12.23
[debug] Python version 2.7.10 - Windows-8-6.2.9200
[debug] exe versions: ffmpeg N-77137-gff6dd58, ffprobe N-77137-gff6dd58
[debug] Proxy map: {}
[youtube] 9QoK0If7LCg: Downloading webpage
[youtube] 9QoK0If7LCg: Downloading video info webpage
[youtube] 9QoK0If7LCg: Extracting video information
[youtube] 9QoK0If7LCg: Downloading DASH manifest
[youtube] 9QoK0If7LCg: Downloading DASH manifest
[debug] Invoking downloader on u'https://r6---sn-p11p-gpme.googlevideo.com/videoplayback?id=f50a0ad087fb2c28&itag=141&source=youtube&requiressl=yes&mv=m&ms=au&mm=31&mn=sn-p11p-gpme&pl=21&ratebypass=yes&mime=audio/mp4&gir=yes&clen=7413317&lmt=1391743512965107&dur=232.501&key=dg_yt0&signature=2AB5C025ECEE192943A4B723C9DF9A8F43042D48.1B381716FC97E5F5DCD302E9834FCD7C1718D58D&sver=3&mt=1450973773&fexp=9412858,9416126,9416179,9417703,9418222,9418400,9420452,9421525,9422596,9422971,9423390,9423662,9423860,9424214,9425000,9426149&upn=reI0vDdJrv4&ip=no&ipbits=0&expire=1450995509&sparams=ip,ipbits,expire,id,itag,source,requiressl,mv,ms,mm,mn,pl,ratebypass,mime,gir,clen,lmt,dur'
[download] Zoeys Music\Arven - Black is the Colour.m4a has already been downloaded
[download] 100% of 7.07MiB
[ffmpeg] Correcting container in "Zoeys Music\Arven - Black is the Colour.m4a"
[debug] ffmpeg command line: ffmpeg -y -i 'file:Zoeys Music\Arven - Black is the Colour.m4a' -c copy -f mp4 'file:Zoeys Music\Arven - Black is the Colour.temp.m4a'
[debug] ffmpeg command line: ffprobe -show_streams 'file:Zoeys Music\Arven - Black is the Colour.m4a'
ERROR: WARNING: unable to obtain file audio codec with ffprobe
Traceback (most recent call last):
  File "youtube_dl\YoutubeDL.pyo", line 1723, in post_process
  File "youtube_dl\postprocessor\ffmpeg.pyo", line 218, in run
PostProcessingError
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Dec 24, 2015

I did it on exactly same configuration, see log.

@zet4
Copy link
Author

@zet4 zet4 commented Dec 24, 2015

Yes but I have an error on mine, and I am on windows, I updated my comment with log.

@zet4 zet4 closed this Jan 21, 2019
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.