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

bestvideo+bestaudio, webm+m4a problem #4906

Closed
mati8 opened this issue Feb 8, 2015 · 8 comments
Closed

bestvideo+bestaudio, webm+m4a problem #4906

mati8 opened this issue Feb 8, 2015 · 8 comments

Comments

@mati8
Copy link

@mati8 mati8 commented Feb 8, 2015

Hi,

  • the problem: when using bestvideo+bestaudio, somtimes a webm file is downloaded, that can't be merged with a m4a.
  • how it could be fixed: a filter to download just the best "mp4".
  • my proposed solution would be something like: youtube-dl https://www.youtube.com/watch?v=-da2L9wY-rc -f bestvideo[format=mp4]+bestaudio

(there is already a post here about it: #4886 (comment) )

OUTPUT when I encounter this error:
[root@M youtubemt]# youtube-dl https://www.youtube.com/watch?v=-da2L9wY-rc -f bestvideo+bestaudio -v
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['https://www.youtube.com/watch?v=-da2L9wY-rc', '-f', 'bestvideo+bestaudio', '-v']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.02.06
[debug] Python version 2.6.6 - Linux-2.6.32-504.8.1.el6.i686-i686-with-centos-6.6-Final
[debug] exe versions: ffmpeg N-69617-gf05efd4-syslint, ffprobe present
[debug] Proxy map: {}
[youtube] -da2L9wY-rc: Downloading webpage
[youtube] -da2L9wY-rc: Extracting video information
[youtube] -da2L9wY-rc: Downloading DASH manifest
[debug] Invoking downloader on 'https://r19---sn-hpa7enee.googlevideo.com/videoplayback?id=f9d6b62fdc18fab7&itag=248&source=youtube&requiressl=yes&pl=20&mm=31&ms=au&mv=u&ratebypass=yes&mime=video/webm&gir=yes&clen=70786311&lmt=1413326274191051&dur=135.433&key=dg_yt0&sver=3&fexp=907263,927622,930676,9405619,9405975,9406817,943917,947225,948124,949429,952302,952605,952612,952901,955301,957201,959701&mt=1423418732&signature=5E5BE4B8589E29AD1D5BFD1EAA0476E8A61537A2.4A3516E6AE7AB0C34A59628904556F7BEEBC508B&upn=eZNNLsMW3h8&ip=5.249.137.176&ipbits=0&expire=1423440489&sparams=ip,ipbits,expire,id,itag,source,requiressl,pl,mm,ms,mv,ratebypass,mime,gir,clen,lmt,dur'
[download] Destination: GoPro Hero3 Silver Edition 1080p 30fps--da2L9wY-rc.f248.webm
[download] 100% of 67.51MiB in 00:01
[debug] Invoking downloader on 'https://r19---sn-hpa7enee.googlevideo.com/videoplayback?id=f9d6b62fdc18fab7&itag=141&source=youtube&requiressl=yes&pl=20&mm=31&ms=au&mv=u&ratebypass=yes&mime=audio/mp4&gir=yes&clen=4324017&lmt=1387951441332228&dur=135.604&key=dg_yt0&sver=3&fexp=907263,927622,930676,9405619,9405975,9406817,943917,947225,948124,949429,952302,952605,952612,952901,955301,957201,959701&mt=1423418732&signature=78546D1C5EAA8C1A3156BBD8399CA6104CAE07D5.1755AFC10C792C8593D23A89A78AA00258579395&upn=eZNNLsMW3h8&ip=5.249.137.176&ipbits=0&expire=1423440489&sparams=ip,ipbits,expire,id,itag,source,requiressl,pl,mm,ms,mv,ratebypass,mime,gir,clen,lmt,dur'
[download] Destination: GoPro Hero3 Silver Edition 1080p 30fps--da2L9wY-rc.f141.m4a
[download] 100% of 4.12MiB in 00:00
[ffmpeg] Merging formats into "GoPro Hero3 Silver Edition 1080p 30fps--da2L9wY-rc.webm"
[debug] ffmpeg command line: ffmpeg -y -i 'GoPro Hero3 Silver Edition 1080p 30fps--da2L9wY-rc.f248.webm' -i 'GoPro Hero3 Silver Edition 1080p 30fps--da2L9wY-rc.f141.m4a' -c copy -map 0✌️0 -map 1🅰️0 'GoPro Hero3 Silver Edition 1080p 30fps--da2L9wY-rc.webm'
ERROR: Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Traceback (most recent call last):
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1391, in post_process
keep_video_wish, info = pp.run(info)
File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 545, in run
self.run_ffmpeg_multiple_files(info['__files_to_merge'], filename, args)
File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 103, in run_ffmpeg_multiple_files
raise FFmpegPostProcessorError(msg)
FFmpegPostProcessorError

Thank you!

dstftw added a commit that referenced this issue Feb 8, 2015
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 8, 2015

String based format property filtering will be available in the next version. To download mp4 video of the best quality you can specify filter as follows: -f bestvideo[ext=mp4]+bestaudio.

@clb92
Copy link

@clb92 clb92 commented Feb 20, 2015

String based format property filtering will be available in the next version. To download mp4 video of the best quality you can specify filter as follows: -f bestvideo[ext=mp4]+bestaudio.

I can confirm that this works in current version 2015.02.19.3.

@vladosfi
Copy link

@vladosfi vladosfi commented Apr 3, 2015

I have the same problem and this fix "-f bestvideo[ext=mp4]+bestaudio" doesn't help for version 2015.04.03. On windows 7 64bit system and Youtube-dl create file that can't be deleted!

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Apr 3, 2015

Try -f bestvideo[ext=mp4]+bestaudio[ext=m4a].

@dstftw dstftw closed this Apr 3, 2015
@clb92
Copy link

@clb92 clb92 commented Apr 3, 2015

Wouldn't the audio format be .m4a?

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Apr 3, 2015

@clb92 yes, correct.

@vladosfi
Copy link

@vladosfi vladosfi commented Apr 3, 2015

I've try this right now and still no success!

@vladosfi
Copy link

@vladosfi vladosfi commented Apr 4, 2015

I'm sorry the container format that I specify was not correct. When i use mp4 container there is no problem. But is this option "-f bestvideo[ext=mp4]+bestaudio[ext=m4a]" valid for all clips?

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