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 gives invalid argument error #5767

Closed
illumilore opened this issue May 21, 2015 · 6 comments
Closed

youtube-dl gives invalid argument error #5767

illumilore opened this issue May 21, 2015 · 6 comments

Comments

@illumilore
Copy link

@illumilore illumilore commented May 21, 2015

It seems to be caused by how it calls ffmpeg?

$ youtube-dl -vf 137+bestaudio https://www.youtube.com/watch?v=vOreqez4v9Y
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-vf', u'137+bestaudio', u'https://www.youtube.com/watch?v=vOreqez4v9Y']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.05.15
[debug] Python version 2.7.8 - Linux-3.16.7-21-desktop-x86_64-with-SuSE-13.2-x86_64
[debug] exe versions: ffmpeg 2.6.2, ffprobe 2.6.2
[debug] Proxy map: {}
[youtube] vOreqez4v9Y: Downloading webpage
[youtube] vOreqez4v9Y: Extracting video information
[youtube] vOreqez4v9Y: Downloading DASH manifest
[debug] Invoking downloader on 'https://r3---sn-qxo7sn7l.googlevideo.com/videoplayback?id=bceadea9ecf8bfd6&itag=137&source=youtube&requiressl=yes&pl=17&ms=au&mv=m&mm=31&ratebypass=yes&mime=video/mp4&gir=yes&clen=79396471&lmt=1432133772301353&dur=168.042&sver=3&signature=08EF9F5BA30D6A280E38E07DD7831D01054BAA5B.6419C0F2E572CE377576CDBDE0619B94FE423C93&upn=fGHZfzQDT70&fexp=916724,930827,9405975,9406715,9406838,9407641,9407664,9407715,9408142,9408292,9408710,9408941,9412526,9412708,9412773,9412857,9415081,945137,948124,952612,952637,952642&mt=1432169077&key=dg_yt0&ip=71.222.215.10&ipbits=0&expire=1432190775&sparams=ip,ipbits,expire,id,itag,source,requiressl,pl,ms,mv,mm,ratebypass,mime,gir,clen,lmt,dur'
[download] Forget _ Pogo-vOreqez4v9Y.f137.mp4 has already been downloaded
[download] 100% of 75.72MiB
[debug] Invoking downloader on 'https://r3---sn-qxo7sn7l.googlevideo.com/videoplayback?id=bceadea9ecf8bfd6&itag=141&source=youtube&requiressl=yes&pl=17&ms=au&mv=m&mm=31&ratebypass=yes&mime=audio/mp4&gir=yes&clen=5360407&lmt=1432133647549956&dur=168.112&sver=3&signature=240D44742EBCF1C83E3BC91F707E74F8E1B9E4DD.1AE7F7CDC201A9EBD539EA1A177D78D374057C10&upn=fGHZfzQDT70&fexp=916724,930827,9405975,9406715,9406838,9407641,9407664,9407715,9408142,9408292,9408710,9408941,9412526,9412708,9412773,9412857,9415081,945137,948124,952612,952637,952642&mt=1432169077&key=dg_yt0&ip=71.222.215.10&ipbits=0&expire=1432190775&sparams=ip,ipbits,expire,id,itag,source,requiressl,pl,ms,mv,mm,ratebypass,mime,gir,clen,lmt,dur'
[download] Forget _ Pogo-vOreqez4v9Y.f141.m4a has already been downloaded
[download] 100% of 5.11MiB
[ffmpeg] Merging formats into "Forget _ Pogo-vOreqez4v9Y.mp4"
[debug] ffmpeg command line: ffmpeg -y -i 'Forget _ Pogo-vOreqez4v9Y.f137.mp4' -i 'Forget _ Pogo-vOreqez4v9Y.f141.m4a' -c copy -map 0✌️0 -map 1🅰️0 'Forget _ Pogo-vOreqez4v9Y.temp.mp4'
ERROR: Forget _ Pogo-vOreqez4v9Y.temp.mp4: Invalid argument
Traceback (most recent call last):
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1529, in post_process
files_to_delete, info = pp.run(info)
File "/usr/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 590, in run
self.run_ffmpeg_multiple_files(info['__files_to_merge'], temp_filename, args)
File "/usr/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 148, in run_ffmpeg_multiple_files
raise FFmpegPostProcessorError(msg)
FFmpegPostProcessorError

ffmpeg version 2.6.2 Copyright (c) 2000-2015 the FFmpeg developers

@illumilore
Copy link
Author

@illumilore illumilore commented May 21, 2015

This seems to happen on 2 different computers
$ youtube-dl --version
2014.08.10
$ youtube-dl --version
2015.05.15

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented May 21, 2015

Can you run the following command and paste the output?

ffmpeg -y -i 'Forget _ Pogo-vOreqez4v9Y.f137.mp4' -i 'Forget _ Pogo-vOreqez4v9Y.f141.m4a' -c copy -map 0:v:0 -map 1:a:0 'Forget _ Pogo-vOreqez4v9Y.temp.mp4'
@illumilore
Copy link
Author

@illumilore illumilore commented May 21, 2015

$ ffmpeg -y -i 'Forget _ Pogo-vOreqez4v9Y.f137.mp4' -i 'Forget _ Pogo-vOreqez4v9Y.f141.m4a' -c copy -map 0✌️0 -map 1🅰️0 'Forget _ Pogo-vOreqez4v9Y.temp.mp4'
ffmpeg version 2.6.2 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.8 (SUSE Linux)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include/ffmpeg --extra-cflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g' --optflags='-fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g' --enable-pic --disable-stripping --enable-shared --disable-static --enable-runtime-cpudetect --enable-gpl --disable-openssl --enable-frei0r --enable-gnutls --enable-libcdio --enable-libdc1394 --enable-libfreetype --enable-libgsm --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-pic --enable-pthreads --enable-vaapi --enable-vdpau --enable-x11grab --disable-encoders --disable-decoders --disable-muxers --disable-demuxers --enable-encoder='flac,gif,jpegls,libopenjpeg,libtheora,libvorbis,libvpx,png' --enable-decoder='flac,gif,jpegls,ljpeg,libopenjpeg,libtheora,libvpx,png,vorbis,vp3,vp5,vp6,vp6a,vp6f,vp8,vp9,webp' --enable-muxer='flac,gif,image2,image2pipe,matroska,matroska_audio,null,webm' --enable-demuxer='flac,gif,image2,image2pipe,matroska'
libavutil 54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 25.101 / 56. 25.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. 11.102
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Forget _ Pogo-vOreqez4v9Y.f137.mp4':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6avc1mp41
creation_time : 2015-05-20 14:56:03
Duration: 00:02:48.04, start: 0.000000, bitrate: 3779 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 3776 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc (default)
Metadata:
creation_time : 2015-05-20 14:56:03
handler_name : VideoHandler
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'Forget _ Pogo-vOreqez4v9Y.f141.m4a':
Metadata:
major_brand : dash
minor_version : 0
compatible_brands: iso6mp41
creation_time : 2015-05-20 14:53:58
Duration: 00:02:48.11, start: 0.000000, bitrate: 255 kb/s
Stream #1:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, 2 channels, 253 kb/s (default)
Metadata:
creation_time : 2015-05-20 14:53:58
handler_name : SoundHandler
[NULL @ 0x104a7e0] Unable to find a suitable output format for 'Forget _ Pogo-vOreqez4v9Y.temp.mp4'
Forget _ Pogo-vOreqez4v9Y.temp.mp4: Invalid argument

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented May 21, 2015

Due to the --disable-muxers and --enable-muxer='flac,gif,image2,image2pipe,matroska,matroska_audio,null,webm' in configuration flags, mp4 as the output format is not supported. There are several options:

  1. As a temporary workaround, add --merge-output-format mkv to youtube-dl to force matroska format
  2. Change the compilation flags. If you are using the official version of ffmpeg, try to contact the package maintainer of SuSE.
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented May 21, 2015

I'm closing the issue, follow one of the options posted by @yan12125.

@jaimeMF jaimeMF closed this May 21, 2015
@illumilore
Copy link
Author

@illumilore illumilore commented May 21, 2015

Since it is apparently an official ffmpeg build, would it be a good idea to have youtube-dl detect when ffmpeg has this problem and give better feedback than "ERROR: xxx.mp4: Invalid argument"?

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
3 participants
You can’t perform that action at this time.