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
132k stars 10.01k forks source link

PBS, again. Tried with multiple links to the same video. #14867

Open DiagonalArg opened 6 years ago

DiagonalArg commented 6 years ago

$ ~/bin/youtube-dl --version 2017.11.26

Bug report: DL'ing a PBS video. Three URL's for the same video, none of which work:

http://www.pbs.org/independentlens/videos/shadow-world-full-film/ https://video.ket.org/video/3002680390/ https://player.pbs.org/portalplayer/3002680390/

It seems the requests land on this video (see below): https://ga.video.cdn.pbs.org/videos/independent-lens/4421e28a-0b0b-493b-b6fd-11c468583171/2000017706/hd-16x9-mezzanine-1080p/8uzocjp4_inle1902-16x9-1080p-1080p-6500k.m3u8

Using advice found on the web, I made another attempt, changing m3u8 to mp4. When that didn't work, I got a lower resolution and tried the same. It also failed.

[The following long lines are not cut off, but they appear that way in preview and in the post.]

$ ~/bin/youtube-dl -v "http://player.pbs.org/portalplayer/3002680390/" -o PBS.mp4
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'http://player.pbs.org/portalplayer/3002680390/', u'-o', u'PBS.mp4']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.11.26
[debug] Python version 2.7.12 - Linux-4.4.0-101-generic-x86_64-with-Ubuntu-16.04-xenial
[debug] exe versions: avconv 2.8.11-0ubuntu0.16.04.1, avprobe 2.8.11-0ubuntu0.16.04.1, ffmpeg 2.8.11-0ubuntu0.16.04.1, ffprobe 2.8.11-0ubuntu0.16.04.1, rtmpdump 2.4
[debug] Proxy map: {'socks': 'socks://localhost:9999/'}
[debug] Using fake IP 3.61.93.191 (US) as X-Forwarded-For.
[pbs] Downloading JSON metadata
[pbs] 3002680390: Downloading widget/partnerplayer page
[pbs] 3002680390: Downloading portalplayer page
[pbs] 3002680390: Downloading hls-16x9-1080p video url info
[pbs] 3002680390: Downloading m3u8 information
[pbs] 3002680390: Downloading mp4-16x9-720p video url info
[pbs] 3002680390: Downloading hls-16x9-720p video url info
[pbs] 3002680390: Downloading m3u8 information
[pbs] 3002680390: Checking http-2000k video URL
[pbs] 3002680390: http-2000k video URL is invalid, skipping
[pbs] 3002680390: Checking http-6500k video URL
[pbs] 3002680390: http-6500k video URL is invalid, skipping
[pbs] 3002680390: Checking http-4500k video URL
[pbs] 3002680390: http-4500k video URL is invalid, skipping
[pbs] 3002680390: Checking http-3000k video URL
[pbs] 3002680390: Checking http-1100k video URL
[pbs] 3002680390: http-1100k video URL is invalid, skipping
[pbs] 3002680390: Checking http-730k video URL
[pbs] 3002680390: http-730k video URL is invalid, skipping
[pbs] 3002680390: Checking http-730k video URL
[pbs] 3002680390: http-730k video URL is invalid, skipping
[pbs] 3002680390: Checking http-3000k video URL
[pbs] 3002680390: Checking http-2000k video URL
[pbs] 3002680390: http-2000k video URL is invalid, skipping
[pbs] 3002680390: Checking http-1100k video URL
[pbs] 3002680390: http-1100k video URL is invalid, skipping
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on u'https://ga.video.cdn.pbs.org/videos/independent-lens/4421e28a-0b0b-493b-b6fd-11c468583171/2000017706/hd-16x9-mezzanine-1080p/8uzocjp4_inle1902-16x9-1080p-1080p-6500k.m3u8'
[download] Destination: PBS.mp4
[debug] avconv command line: avconv -y -loglevel verbose -headers 'Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
X-Forwarded-For: 3.61.93.191
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome)
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Cookie: pbsol.station=WNET
' -i 'https://ga.video.cdn.pbs.org/videos/independent-lens/4421e28a-0b0b-493b-b6fd-11c468583171/2000017706/hd-16x9-mezzanine-1080p/8uzocjp4_inle1902-16x9-1080p-1080p-6500k.m3u8' -c copy -f mp4 'file:PBS.mp4.part'
ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
  configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
[hls,applehttp @ 0x19da600] HLS request for url 'https://ga.video.cdn.pbs.org/videos/independent-lens/4421e28a-0b0b-493b-b6fd-11c468583171/2000017706/hd-16x9-mezzanine-1080p/8uzocjp4_inle1902-16x9-1080p-1080p-6500k_00001.ts', offset 0, playlist 0
Input #0, hls,applehttp, from 'https://ga.video.cdn.pbs.org/videos/independent-lens/4421e28a-0b0b-493b-b6fd-11c468583171/2000017706/hd-16x9-mezzanine-1080p/8uzocjp4_inle1902-16x9-1080p-1080p-6500k.m3u8':
  Duration: 01:23:07.78, start: 2.050078, bitrate: 0 kb/s
  Program 0 
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Video: h264 (High), 3 reference frames ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 (1920x1088) [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 96 kb/s
[mp4 @ 0x23d5bc0] Codec for stream 0 does not use global headers but container format requires global headers
[mp4 @ 0x23d5bc0] Codec for stream 1 does not use global headers but container format requires global headers
Output #0, mp4, to 'file:PBS.mp4.part':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Video: h264, 1 reference frame ([33][0][0][0] / 0x0021), yuv420p, 1920x1080 (0x0) [SAR 1:1 DAR 16:9], q=2-31, 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc
    Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, 96 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[mp4 @ 0x23d5bc0] Malformed AAC bitstream detected: use the audio bitstream filter 'aac_adtstoasc' to fix it ('-bsf:a aac_adtstoasc' option with ffmpeg)
av_interleaved_write_frame(): Operation not permitted
No more output streams to write to, finishing.
frame=   36 fps=0.0 q=-1.0 Lsize=    1071kB time=00:00:01.16 bitrate=7514.7kbits/s    
video:1070kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.083482%
Input file #0 (https://ga.video.cdn.pbs.org/videos/independent-lens/4421e28a-0b0b-493b-b6fd-11c468583171/2000017706/hd-16x9-mezzanine-1080p/8uzocjp4_inle1902-16x9-1080p-1080p-6500k.m3u8):
  Input stream #0:0 (video): 36 packets read (1095791 bytes); 
  Input stream #0:1 (audio): 1 packets read (256 bytes); 
  Total: 37 packets (1096047 bytes) demuxed
Output file #0 (file:PBS.mp4.part):
  Output stream #0:0 (video): 36 packets muxed (1095791 bytes); 
  Output stream #0:1 (audio): 1 packets muxed (256 bytes); 
  Total: 37 packets (1096047 bytes) muxed
Conversion failed!

ERROR: ffmpeg exited with code 1
  File "/usr/lib/python2.7/runpy.py", line 174, 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 "/home/dev/bin/youtube-dl/__main__.py", line 19, in <module>
    youtube_dl.main()
  File "/home/dev/bin/youtube-dl/youtube_dl/__init__.py", line 465, in main
    _real_main(argv)
  File "/home/dev/bin/youtube-dl/youtube_dl/__init__.py", line 455, in _real_main
    retcode = ydl.download(all_urls)
  File "/home/dev/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1986, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/home/dev/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 795, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/home/dev/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 849, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/home/dev/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1620, in process_video_result
    self.process_info(new_info)
  File "/home/dev/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1893, in process_info
    success = dl(filename, info_dict)
  File "/home/dev/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1832, in dl
    return fd.download(name, info)
  File "/home/dev/bin/youtube-dl/youtube_dl/downloader/common.py", line 361, in download
    return self.real_download(filename, info_dict)
  File "/home/dev/bin/youtube-dl/youtube_dl/downloader/external.py", line 57, in real_download
    self.get_basename(), retval))
  File "/home/dev/bin/youtube-dl/youtube_dl/downloader/common.py", line 163, in report_error
    self.ydl.report_error(*args, **kargs)
  File "/home/dev/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 612, in report_error
    self.trouble(error_message, tb)
  File "/home/dev/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 574, in trouble
    tb_data = traceback.format_list(traceback.extract_stack())
wright546 commented 6 years ago

I came here to report the same problem. Let me know if I can provide any other information that could be helpful.

9:42am ~ >./youtube-dl -v -F "http://www.pbs.org/video/natures-miniature-miracles-c7il7p/" [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: [u'-v', u'-F', u'http://www.pbs.org/video/natures-miniature-miracles-c7il7p/'] [debug] Encodings: locale US-ASCII, fs US-ASCII, out US-ASCII, pref US-ASCII [debug] youtube-dl version 2017.11.26 [debug] Python version 2.7.13 - FreeBSD-10.3-RELEASE-p19-amd64-64bit-ELF [debug] exe versions: ffmpeg 3.3.2, ffprobe 3.3.2 [debug] Proxy map: {} [debug] Using fake IP 3.0.67.224 (US) as X-Forwarded-For. [pbs] Downloading JSON metadata [pbs] natures-miniature-miracles-c7il7p: Downloading webpage [pbs] Downloading widget/partnerplayer page WARNING: Unable to download webpage: HTTP Error 404: Not Found [pbs] Downloading portalplayer page WARNING: Unable to download webpage: HTTP Error 404: Not Found ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last): File "./youtube-dl/youtube_dl/YoutubeDL.py", line 784, in extract_info ie_result = ie.extract(url) File "./youtube-dl/youtube_dl/extractor/common.py", line 437, in extract ie_result = self._real_extract(url) File "./youtube-dl/youtube_dl/extractor/pbs.py", line 589, in _real_extract self._sort_formats(formats) File "./youtube-dl/youtube_dl/extractor/common.py", line 1067, in _sort_formats raise ExtractorError('No video formats found') ExtractorError: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

remitamine commented 6 years ago

@wright546 it's not the same problem, https://github.com/rg3/youtube-dl/issues/14865#issuecomment-347437329.

DiagonalArg commented 6 years ago

@remitamine - any suggestion for a work-around? I'd like to watch this vid, but it will only be around for a few more days. (I have a slow connection. If I want to watch it in decent resolution ...)

gkoelln commented 6 years ago

Have you tried using this link directly in youtube-dl? https://ga.video.cdn.pbs.org/videos/independent-lens/4421e28a-0b0b-493b-b6fd-11c468583171/2000017706/hd-16x9-mezzanine-1080p/8uzocjp4_inle1902-16x9-1080p-1080p-6500k.m3u8

DiagonalArg commented 6 years ago

Thanks. I tried, but neither one works...

gkoelln commented 6 years ago

youtube-dl -v --hls-prefer-native "https://ga.video.cdn.pbs.org/videos/independent-lens/4421e28a-0b0b-493b-b6fd-11c468583171/2000017706/hd-16x9-mezzanine-1080p/8uzocjp4_inle1902-16x9-1080p-1080p-6500k.m3u8" -o PBS.mp4

DiagonalArg commented 6 years ago

@gkoelln - Yes, working. Thanks much. After that, I'll wait for the update.