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 doesn't work for some videos [recorded streams] #1735

Closed
hpirsiav opened this issue Nov 7, 2013 · 9 comments
Closed

Youtube-dl doesn't work for some videos [recorded streams] #1735

hpirsiav opened this issue Nov 7, 2013 · 9 comments

Comments

@hpirsiav
Copy link

@hpirsiav hpirsiav commented Nov 7, 2013

Hi,

Youtube-dl doesn't work for some videos like:
youtube-dl http://www.youtube.com/watch?v=Y4ARBzok9aU

I am copying the result as well as the version of my ffmpeg. I use Ubuntu 12.04, 64bit. I have recently updated my ubuntu by "sudo apt-get update"

I would appreciate if you can help me download this video.

Thanks.

$ ffmpeg -version
ffmpeg version 0.8.8-4:0.8.8-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
built on Oct 22 2013 12:31:55 with gcc 4.6.3
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
ffmpeg 0.8.8-4:0.8.8-0ubuntu0.12.04.1
libavutil 51. 22. 1 / 51. 22. 1
libavcodec 53. 35. 0 / 53. 35. 0
libavformat 53. 21. 1 / 53. 21. 1
libavdevice 53. 2. 0 / 53. 2. 0
libavfilter 2. 15. 0 / 2. 15. 0
libswscale 2. 1. 0 / 2. 1. 0
libpostproc 52. 0. 0 / 52. 0. 0

$ youtube-dl http://www.youtube.com/watch?v=Y4ARBzok9aU --verbose
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['http://www.youtube.com/watch?v=Y4ARBzok9aU', '--verbose']
[debug] youtube-dl version 2013.11.06.1
[debug] Python version 2.7.3 - Linux-3.2.0-55-generic-x86_64-with-Ubuntu-12.04-precise
[debug] Proxy map: {}
[youtube] Setting language
[youtube] Y4ARBzok9aU: Downloading video webpage
[youtube] Y4ARBzok9aU: Downloading video info webpage
[youtube] Y4ARBzok9aU: Extracting video information
[youtube] Y4ARBzok9aU: Downloading formats manifest
[download] Destination: Diving - Men 10m Final - London 2012 Olympic Games-Y4ARBzok9aU.mp4
ffmpeg version 0.8.8-4:0.8.8-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
built on Oct 22 2013 12:31:55 with gcc 4.6.3
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[applehttp @ 0x11ba7a0] Estimating duration from bitrate, this may be inaccurate
Input #0, applehttp, from 'http://www.youtube.com/api/manifest/hls_playlist/id/638011073a24f5a5/itag/96/source/youtube/ratebypass/yes/pfa/1/pbr/yes/hls_chunk_host/www.youtube.com/gir/yes/clen/4932922720/lmt/1347749901647320/dur/7044.840/playlist_type/DVR/maudio/1/pmbypass/yes/cp/U0hXSFhRTl9ISkNON19QS1JIOlM2R1B3SXZtVzVX/sver/3/fexp/935612,916604,906946,904831,902561,916611,924616,907231/upn/Ro0PlWRIplA/ip/2001:470:8b2d:834:b10c:52d7:d3ba:ad2a/ipbits/48/expire/1383860730/sparams/ip,ipbits,expire,id,itag,source,ratebypass,pfa,pbr,hls_chunk_host,gir,clen,lmt,dur,playlist_type,maudio,pmbypass,cp/signature/94BC16D29AACA7F25F75ABC7092331DD83BC5F43.32F211EBC82FE9797052D6A52DCFCC872D6F35E4/key/dg_yt0/file/index.m3u8':
Duration: 01:47:27.00, start: 51725.592178, bitrate: N/A
Stream #0.0: Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 25 tbr, 90k tbn, 50 tbc
Stream #0.1: Audio: aac, 48000 Hz, stereo, s16
[buffer @ 0x1d12620] w:1920 h:1080 pixfmt:yuv420p
encoder 'aac' is experimental and might produce bad results.
Add '-strict experimental' if you want to use it.

ERROR: ffmpeg exited with code 1
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/bin/youtube-dl/main.py", line 18, in
youtube_dl.main()
File "/usr/bin/youtube-dl/youtube_dl/init.py", line 766, in main
_real_main(argv)
File "/usr/bin/youtube-dl/youtube_dl/init.py", line 719, in _real_main
retcode = ydl.download(all_urls)
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 715, in download
videos = self.extract_info(url)
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 363, in extract_info
return self.process_ie_result(ie_result, download, extra_info)
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 444, in process_ie_result
for r in ie_result['entries']
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 388, in process_ie_result
return self.process_video_result(ie_result)
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 477, in process_video_result
self.process_info(info_dict)
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 688, in process_info
success = self.fd._do_download(filename, info_dict)
File "/usr/bin/youtube-dl/youtube_dl/FileDownloader.py", line 429, in _do_download
return self._download_m3u8_with_ffmpeg(filename, url)
File "/usr/bin/youtube-dl/youtube_dl/FileDownloader.py", line 398, in _download_m3u8_with_ffmpeg
self.report_error(u'ffmpeg exited with code %d' % retval)
File "/usr/bin/youtube-dl/youtube_dl/FileDownloader.py", line 172, in report_error
self.ydl.report_error(_args, *_kargs)
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 235, in report_error
self.trouble(error_message, tb)
File "/usr/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 202, in trouble
tb_data = traceback.format_list(traceback.extract_stack())

@hpirsiav hpirsiav mentioned this issue Nov 7, 2013
@hpirsiav
Copy link
Author

@hpirsiav hpirsiav commented Nov 8, 2013

Can someone please help me download this video?
http://www.youtube.com/watch?v=Y4ARBzok9aU

Thanks,

@ghost
Copy link

@ghost ghost commented Nov 9, 2013

We need to add '-strict -2' to ffmpeg options.

[aac @ 0xa95ec40] The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.
@hpirsiav
Copy link
Author

@hpirsiav hpirsiav commented Nov 9, 2013

Thanks, but how should I do that? Sorry, I am not familiar with it.

@jaimeMF jaimeMF closed this in 801dbbd Nov 10, 2013
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 10, 2013

Now we also use avconv for downloading m3u8 manifests, so systems that don't ship with recent versions of ffmpeg and use avconv will work.

@hpirsiav
Copy link
Author

@hpirsiav hpirsiav commented Nov 10, 2013

Sorry, I am confused as I don't still know how to download this video. Can you please help me more with a little more details? How can I open this issue again? I ran the following commands, but didn't work:

sudo youtube-dl -U

youtube-dl http://www.youtube.com/watch?v=Y4ARBzok9aU

but got the following error:

$ youtube-dl http://www.youtube.com/watch?v=Y4ARBzok9aU
[youtube] Setting language
[youtube] Y4ARBzok9aU: Downloading video webpage
[youtube] Y4ARBzok9aU: Downloading video info webpage
[youtube] Y4ARBzok9aU: Extracting video information
[youtube] Y4ARBzok9aU: Downloading formats manifest
[download] Destination: Diving - Men 10m Final - London 2012 Olympic Games-Y4ARBzok9aU.mp4
ffmpeg version 0.10.9-7:0.10.9-1precise1 Copyright (c) 2000-2013 the FFmpeg developers
built on Oct 4 2013 06:37:30 with gcc 4.6.3
configuration: --arch=amd64 --disable-stripping --enable-pthreads --enable-runtime-cpudetect --extra-version='7:0.10.9-1
precise1' --libdir=/usr/lib/x86_64-linux-gnu --prefix=/usr --enable-bzlib --enable-libdc1394 --enable-libfreetype --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libopencv --enable-libopenjpeg --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvpx --enable-zlib --enable-gpl --enable-postproc --enable-libcdio --enable-x11grab --enable-libx264 --shlibdir=/usr/lib/x86_64-linux-gnu --enable-shared --disable-static
libavutil 51. 35.100 / 51. 35.100
libavcodec 53. 61.100 / 53. 61.100
libavformat 53. 32.100 / 53. 32.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 61.100 / 2. 61.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100
Input #0, applehttp, from 'http://www.youtube.com/api/manifest/hls_playlist/id/638011073a24f5a5/itag/96/source/youtube/ratebypass/yes/pfa/1/pbr/yes/hls_chunk_host/www.youtube.com/gir/yes/clen/4932922720/lmt/1347749901647320/dur/7044.840/maudio/1/pmbypass/yes/cp/U0hXSVFOVV9ISkNON19JSFlKOkJuR25WZlNoQ2Iy/playlist_type/DVR/fexp/923902,941239,936118,936910,907231,907240/upn/suS3ZuRr4kU/sver/3/ip/2001:470:8b2d:834:ed94:4973:93bc:edf2/ipbits/48/expire/1384137930/sparams/ip,ipbits,expire,id,itag,source,ratebypass,pfa,pbr,hls_chunk_host,gir,clen,lmt,dur,maudio,pmbypass,cp,playlist_type/signature/45B9FD468477B9FC5F4B24FC8A43CBB2FB3F43C3.7A392C47C0A6A2D059901348FA755205B11FD21A/key/dg_yt0/file/index.m3u8':
Duration: 01:47:27.00, start: 51725.592178, bitrate: 1 kb/s
Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 25 tbr, 90k tbn, 50 tbc
Stream #0:1: Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, s16
[buffer @ 0x18ab1e0] w:1920 h:1080 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:
Incompatible sample format 's16' for codec 'aac', auto-selecting format 'flt'
[libx264 @ 0x16b5820] using SAR=1/1
[libx264 @ 0x16b5820] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[libx264 @ 0x16b5820] profile High, level 4.0
[libx264 @ 0x16b5820] 264 - core 120 r2151 a3f4407 - H.264/MPEG-4 AVC codec - Copyleft 2003-2011 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=18 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[NULL @ 0x18ac6e0] Codec is experimental but experimental codecs are not enabled, see -strict -2
Output #0, mp4, to 'Diving - Men 10m Final - London 2012 Olympic Games-Y4ARBzok9aU.mp4.part':
Stream #0:0: Video: h264, yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 90k tbn, 25 tbc
Stream #0:1: Audio: none, 48000 Hz, stereo, flt, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> libx264)
Stream #0:1 -> #0:1 (aac -> aac)
Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height

ERROR: ffmpeg exited with code 1

I also tried
sudo apt-get install libav-tools
to install avconv, but it said it is already installed.

Thanks.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Nov 10, 2013

The version with the fix is not yet available, but you can do the following in the meantime:

  1. youtube-dl http://www.youtube.com/watch?v=Y4ARBzok9aU -g, copy the url that's printed and run this command.
  2. avconv -i 'PASTE_THE_URL_HERE' -f mp4 -c copy -bsf:a aac_adtstoasc video.mp4.
    Sorry for the confussion.
@hpirsiav
Copy link
Author

@hpirsiav hpirsiav commented Nov 10, 2013

Thanks a lot :) This worked for me.

@phihag
Copy link
Contributor

@phihag phihag commented Nov 12, 2013

This change has been integrated into youtube-dl 2013.11.11. You can now simply update and run youtube-dl.

@hpirsiav
Copy link
Author

@hpirsiav hpirsiav commented Nov 12, 2013

Thanks a lot. It works :)

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.