ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.41k stars 10.04k forks source link

bestvideo+bestaudio, webm+m4a problem #4906

Closed mati8 closed 9 years ago

mati8 commented 9 years ago

Hi,

(there is already a post here about it: https://github.com/rg3/youtube-dl/issues/4886#issuecomment-73402243 )

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:v:0 -map 1:a: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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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

clb92 commented 9 years ago

Wouldn't the audio format be .m4a?

dstftw commented 9 years ago

@clb92 yes, correct.

vladosfi commented 9 years ago

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

vladosfi commented 9 years ago

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?