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

Downloading nbcboston.com's embedded HTML5 video gets HTML. #14978

Open
antdude opened this issue Dec 13, 2017 · 3 comments
Open

Downloading nbcboston.com's embedded HTML5 video gets HTML. #14978

antdude opened this issue Dec 13, 2017 · 3 comments

Comments

@antdude
Copy link

@antdude antdude commented Dec 13, 2017

Example:
$ youtube-dl -v https://www.nbcboston.com/multimedia/Blue-Man-Group_NECN-462598833.html
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.nbcboston.com/multimedia/Blue-Man-Group_NECN-462598833.html']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.12.14
[debug] Python version 3.4.2 - Linux-3.16.0-4-amd64-x86_64-with-debian-8.10
[debug] exe versions: ffmpeg 3.2.5-1, ffprobe 3.2.5-1, rtmpdump 2.4
[debug] Proxy map: {}
[generic] Blue-Man-Group_NECN-462598833: Requesting header
WARNING: Falling back on generic information extractor.
[generic] Blue-Man-Group_NECN-462598833: Downloading webpage
WARNING: URL could be a direct video link, returning it as such.
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'https://www.nbcboston.com/multimedia/Blue-Man-Group_NECN-462598833.html'
[download] Destination: Blue-Man-Group_NECN-462598833-Blue-Man-Group_NECN-462598833.html
[download] 100% of 58.52KiB in 00:00

Thank you in advance. :)

@antdude
Copy link
Author

@antdude antdude commented Dec 17, 2017

Perfect:

$ youtube-dl -v https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/master.m3u8

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-NECN/334/915/Blue_Man_Group_,746611,760226,458322,737686,597288,124179,.mp4.csmil/master.m3u8']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.12.14
[debug] Python version 3.4.2 - Linux-3.16.0-4-amd64-x86_64-with-debian-8.10
[debug] exe versions: ffmpeg 3.2.5-1, ffprobe 3.2.5-1, rtmpdump 2.4
[debug] Proxy map: {}
[generic] master: Requesting header
WARNING: Could not send HEAD request to https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/master.m3u8: HTTP Error 405: Method Not Allowed
[generic] master: Downloading webpage
[generic] master: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/index_1_av.m3u8'
[download] Destination: master-master.mp4
[debug] ffmpeg command line: ffmpeg -y -loglevel verbose -headers 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome)
Cookie: alid=V3ugbvdJGyqot+84sCODvQ==
Accept-Charset: ISO-8859-1,utf-8;q=0.7,;q=0.7
Accept-Language: en-us,en;q=0.5
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,
/*;q=0.8
Accept-Encoding: gzip, deflate
' -i https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/index_1_av.m3u8 -c copy -f mp4 file:master-master.mp4.part
ffmpeg version 3.2.5-1bpo8+1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.9.2 (Debian 4.9.2-10)
configuration: --prefix=/usr --extra-version='1
bpo8+1' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --disable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librubberband --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-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
[hls,applehttp @ 0x55e6f86aed60] HLS request for url 'https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/segment1_1_av.ts', offset 0, playlist 0
[NULL @ 0x55e6f90c7160] non-existing SPS 0 referenced in buffering period
[NULL @ 0x55e6f90c7160] SPS unavailable in decode_picture_timing
[h264 @ 0x55e6f8c121c0] non-existing SPS 0 referenced in buffering period
[h264 @ 0x55e6f8c121c0] SPS unavailable in decode_picture_timing
[h264 @ 0x55e6f8c121c0] Reinit context to 1280x720, pix_fmt: yuv420p
Input #0, hls,applehttp, from 'https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/index_1_av.m3u8':
Duration: 00:02:58.98, start: 0.100511, bitrate: 0 kb/s
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Video: h264 (High), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, left), 1280x720 [SAR 1:1 DAR 16:9], 29.97 tbr, 90k tbn, 59.94 tbc
Metadata:
variant_bitrate : 0
Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp
Metadata:
variant_bitrate : 0
Output #0, mp4, to 'file:master-master.mp4.part':
Metadata:
encoder : Lavf57.56.101
Stream #0:0: Video: h264 (High), 1 reference frame ([33][0][0][0] / 0x0021), yuv420p(tv, bt709, left), 1280x720 (0x0) [SAR 1:1 DAR 16:9], q=2-31, 29.97 tbr, 90k tbn, 90k tbc
Metadata:
variant_bitrate : 0
Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz, stereo
Metadata:
variant_bitrate : 0
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
Automatically inserted bitstream filter 'aac_adtstoasc'; args=''
[hls,applehttp @ 0x55e6f86aed60] HLS request for url 'https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/segment2_1_av.ts', offset 0, playlist 0
[hls,applehttp @ 0x55e6f86aed60] HLS request for url 'https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/segment3_1_av.ts', offset 0, playlist 0
[hls,applehttp @ 0x55e6f86aed60] HLS request for url 'https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/segment4_1_av.ts', offset 0, playlist 0
[hls,applehttp @ 0x55e6f86aed60] HLS request for url 'https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/segment5_1_av.ts', offset 0, playlist 0
[hls,applehttp @ 0x55e6f86aed60] HLS request for url 'https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/segment6_1_av.ts', offset 0, playlist 0
[hls,applehttp @ 0x55e6f86aed60] HLS request for url 'https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/segment7_1_av.ts', offset 0, playlist 0
[hls,applehttp @ 0x55e6f86aed60] HLS request for url 'https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/segment8_1_av.ts', offset 0, playlist 0
[hls,applehttp @ 0x55e6f86aed60] HLS request for url 'https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/segment9_1_av.ts', offset 0, playlist 0
[hls,applehttp @ 0x55e6f86aed60] HLS request for url 'https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/segment10_1_av.ts', offset 0, playlist 0
[hls,applehttp @ 0x55e6f86aed60] HLS request for url 'https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/segment11_1_av.ts', offset 0, playlist 0
[hls,applehttp @ 0x55e6f86aed60] HLS request for url 'https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/segment12_1_av.ts', offset 0, playlist 0
[hls,applehttp @ 0x55e6f86aed60] HLS request for url 'https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/segment13_1_av.ts', offset 0, playlist 0
[hls,applehttp @ 0x55e6f86aed60] HLS request for url 'https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/segment14_1_av.ts', offset 0, playlist 0
[hls,applehttp @ 0x55e6f86aed60] HLS request for url 'https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/segment15_1_av.ts', offset 0, playlist 0
[hls,applehttp @ 0x55e6f86aed60] HLS request for url 'https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/segment16_1_av.ts', offset 0, playlist 0
[hls,applehttp @ 0x55e6f86aed60] HLS request for url 'https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/segment17_1_av.ts', offset 0, playlist 0
[hls,applehttp @ 0x55e6f86aed60] HLS request for url 'https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/segment18_1_av.ts', offset 0, playlist 0
No more output streams to write to, finishing.e=00:02:50.00 bitrate=3036.4kbits/s speed=17.4x
frame= 5363 fps=534 q=-1.0 Lsize= 66534kB time=00:02:58.95 bitrate=3045.7kbits/s speed=17.8x
video:59422kB audio:7025kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.130030%
Input file #0 (https://nbclim-f.akamaihd.net/i/Prod/NBCU_LM_VMS_-_NECN/334/915/Blue_Man_Group__,746611,760226,458322,737686,597288,124179,.mp4.csmil/index_1_av.m3u8):
Input stream #0:0 (video): 5363 packets read (60848247 bytes);
Input stream #0:1 (audio): 7708 packets read (7193964 bytes);
Total: 13071 packets (68042211 bytes) demuxed
Output file #0 (file:master-master.mp4.part):
Output stream #0:0 (video): 5363 packets muxed (60848247 bytes);
Output stream #0:1 (audio): 7708 packets muxed (7193964 bytes);
Total: 13071 packets (68042211 bytes) muxed
[ffmpeg] Downloaded 68130686 bytes
[download] 100% of 64.97MiB

How did you get that URL?

@fnadde42
Copy link

@fnadde42 fnadde42 commented Apr 6, 2019

I would assume he did it this way:

If you have Firefox (similar in Chrome), open up the Inspector. Go to the networks tab and refresh the page. Then...

  1. Identify where the video is fetched from. Small similar chunks or one long one is a good hint of a stream.
  2. Find the beginning of the stream. In this case we have a lot of segments but at the top we have a file called index_0_av.m3u8. That sounds like the file containing all the pieces we need.
  3. Click on that one to inspect it further.

Screenshot from 2019-04-06 18-27-02

  1. Voilá! There we have the URL. You can even paste it into your browser and open the file in a text editor to check that you find the URL to all the pieces there. Once youtube-dl has the URL to this file then the rest is history.

Screenshot from 2019-04-06 18-28-32


Now... If you feel like your question is adequately answered, close the issue ;)

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.