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

Can't download live broadcast video with m3u8! #15950

Closed
llwmagic opened this issue Mar 22, 2018 · 3 comments
Closed

Can't download live broadcast video with m3u8! #15950

llwmagic opened this issue Mar 22, 2018 · 3 comments
Labels

Comments

@llwmagic
Copy link

@llwmagic llwmagic commented Mar 22, 2018

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.03.20. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2018.03.20

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

F:\videopro_win\VideoPro\release\youtube>youtube-dl --proxy http://127.0.0.1:1080 -v -f best --prefer-ffmpeg --ffmpeg-location
F:\videopro_win\VideoPro\release --hls-use-mpegts https://www.youtube.com/watch?v=yd9U27JlO-c
[debug] Override config: ['--proxy', 'http://127.0.0.1:1080', '-v', '-f', 'best', '--prefer-ffmpeg', '--ffmpeg-location'
, 'F:\\videopro_win\\VideoPro\\release', '--hls-use-mpegts', 'https://www.youtube.com/watch?v=yd9U27JlO-c']
[debug] Encodings: locale cp936, fs mbcs, out cp936, pref cp936
[debug] youtube-dl version 2018.03.20
[debug] Git HEAD: d0f3730a
[debug] Python version 3.4.0 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-88125-g79f980bb6f, ffprobe N-88125-g79f980bb6f
[debug] Proxy map: {'http': 'http://127.0.0.1:1080', 'https': 'http://127.0.0.1:1080'}
[youtube] yd9U27JlO-c: Downloading webpage
[youtube] yd9U27JlO-c: Downloading video info webpage
[youtube] yd9U27JlO-c: Extracting video information
[youtube] yd9U27JlO-c: Downloading m3u8 information
[youtube] yd9U27JlO-c: Downloading MPD manifest
[debug] Invoking downloader on 'https://manifest.googlevideo.com/api/manifest/hls_playlist/id/yd9U27JlO-c.0/itag/300/sou
rce/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/cmbypass/yes/goi/160/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3
Dyes%3Bitag%3D298/hls_chunk_host/r6---sn-oguesnzl.googlevideo.com/force_finished/1/playlist_type/CLEAN/gcr/jp/ei/T0qzWoS
zF9nxqQHovoaICQ/initcwndbps/15110/mm/32/mn/sn-oguesnzl/ms/lv/mv/m/pl/19/dover/10/keepalive/yes/mt/1521699311/ip/54.92.34
.214/ipbits/0/expire/1521721007/sparams/ip,ipbits,expire,id,itag,source,requiressl,ratebypass,live,cmbypass,goi,sgoap,sg
ovp,hls_chunk_host,force_finished,playlist_type,gcr,ei,initcwndbps,mm,mn,ms,mv,pl/signature/4401FC741F72363AFC9F91C7AA8F
A80CF8BD974F.2A3244E2EA07D8E1775493DEF9FD1F2FAF33E4A4/key/dg_yt0/playlist/index.m3u8'
[download] Destination: 【荒野行動】クロスボウ縛りのルームマッチやるぞw【視聴者参加型】-yd9U27JlO-c.mp4
[debug] ffmpeg command line: "F:\videopro_win\VideoPro\release\ffmpeg" -y -loglevel verbose -headers "Accept-Language: e
n-us,en;q=0.5
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0 (Chrome)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
" -i "https://manifest.googlevideo.com/api/manifest/hls_playlist/id/yd9U27JlO-c.0/itag/300/source/yt_live_broadcast/requ
iressl/yes/ratebypass/yes/live/1/cmbypass/yes/goi/160/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3Dyes%3Bitag%3D298/hls_chun
k_host/r6---sn-oguesnzl.googlevideo.com/force_finished/1/playlist_type/CLEAN/gcr/jp/ei/T0qzWoSzF9nxqQHovoaICQ/initcwndbp
s/15110/mm/32/mn/sn-oguesnzl/ms/lv/mv/m/pl/19/dover/10/keepalive/yes/mt/1521699311/ip/54.92.34.214/ipbits/0/expire/15217
21007/sparams/ip,ipbits,expire,id,itag,source,requiressl,ratebypass,live,cmbypass,goi,sgoap,sgovp,hls_chunk_host,force_f
inished,playlist_type,gcr,ei,initcwndbps,mm,mn,ms,mv,pl/signature/4401FC741F72363AFC9F91C7AA8FA80CF8BD974F.2A3244E2EA07D
8E1775493DEF9FD1F2FAF33E4A4/key/dg_yt0/playlist/index.m3u8" -c copy -f mpegts "file:【荒野行動】クロスボウ縛りのルームマ
ッチやるぞw【視聴者参加型】-yd9U27JlO-c.mp4.part"
ffmpeg version N-88125-g79f980bb6f Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.0 (i686-posix-dwarf-rev2, Built by MinGW-W64 project)
  configuration: --cc=gcc --arch=x86 --target-os=mingw32 --disable-debug --disable-doc --enable-amd3dnow --enable-amd3dn
owext --enable-mmx --enable-mmxext --enable-sse --enable-sse2 --enable-sse3 --enable-ssse3 --enable-sse4 --enable-sse42
--x86asmexe=yasm --enable-shared --prefix=/d/PROJECT/OpenSource/6.3.0/ffmpeg-3.4_dvd_RELEASE --enable-gpl --enable-versi
on3 --enable-nonfree --enable-pthreads --disable-w32threads --disable-sdl2 --enable-dxva2 --enable-libmfx --enable-nvenc
 --enable-libbs2b --disable-bzlib --enable-libass --enable-libbs2b --enable-libcdio --enable-libfreetype --enable-libfri
bidi --enable-libvorbis --enable-libfdk-aac --enable-libkvazaar --enable-libgsm --enable-libilbc --enable-libmp3lame --e
nable-libopencore-amrnb --enable-libfontconfig --enable-libopencore-amrwb --enable-libx264 --enable-libflite --enable-li
bvo-amrwbenc --enable-libspeex --enable-libsoxr --enable-libvpx --enable-libxvid --enable-libx265 --enable-libwebp --ena
ble-libwavpack --enable-libtheora --enable-libtwolame --enable-libshine --enable-libsnappy --enable-libxavs --enable-lib
opus --enable-libvidstab --extra-cflags='-fPIC -DKVZ_STATIC_LIB -DLIBTWOLAME_STATIC -I/d/PROJECT/OpenSource/6.3.0/includ
e -I/d/PROJECT/OpenSource/6.3.0/inc' --extra-ldflags='-L/d/PROJECT/OpenSource/6.3.0/lib -L/d/PROJECT/OpenSource/6.3.0/x8
6/mingw/staticlib' --extra-libs='-fopenmp -lwinmm -ldvdnav -ldvdread -ldvdcss'
  libavutil      56.  0.100 / 56.  0.100
  libavcodec     58.  0.100 / 58.  0.100
  libavformat    58.  0.100 / 58.  0.100
  libavdevice    58.  0.100 / 58.  0.100
  libavfilter     7.  0.100 /  7.  0.100
  libswscale      5.  0.100 /  5.  0.100
  libswresample   3.  0.100 /  3.  0.100
  libpostproc    55.  0.100 / 55.  0.100
[hls,applehttp @ 0020ec40] HLS request for url 'https://r6---sn-oguesnzl.googlevideo.com/videoplayback/id/yd9U27JlO-c.0/
itag/300/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/cmbypass/yes/goi/160/sgoap/gir%3Dyes%3Bitag%3D140
/sgovp/gir%3Dyes%3Bitag%3D298/hls_chunk_host/r6---sn-oguesnzl.googlevideo.com/force_finished/1/playlist_type/CLEAN/gcr/j
p/ei/T0qzWoSzF9nxqQHovoaICQ/initcwndbps/15110/mm/32/mn/sn-oguesnzl/ms/lv/mv/m/pl/19/keepalive/yes/mt/1521699311/ip/54.92
.34.214/ipbits/0/expire/1521721007/sparams/ip,ipbits,expire,id,itag,source,requiressl,ratebypass,live,cmbypass,goi,sgoap
,sgovp,hls_chunk_host,force_finished,playlist_type,gcr,ei,initcwndbps,mm,mn,ms,mv,pl/signature/4401FC741F72363AFC9F91C7A
A8FA80CF8BD974F.2A3244E2EA07D8E1775493DEF9FD1F2FAF33E4A4/key/dg_yt0/playlist/index.m3u8/sq/0/goap/clen%3D47811%3Blmt%3D1
521684609936570/govp/clen%3D209269%3Blmt%3D1521684609936572/dur/2.000/file/seg.ts', offset 0, playlist 0
[hls,applehttp @ 0020ec40] Opening 'https://r6---sn-oguesnzl.googlevideo.com/videoplayback/id/yd9U27JlO-c.0/itag/300/sou
rce/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/cmbypass/yes/goi/160/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3
Dyes%3Bitag%3D298/hls_chunk_host/r6---sn-oguesnzl.googlevideo.com/force_finished/1/playlist_type/CLEAN/gcr/jp/ei/T0qzWoS
zF9nxqQHovoaICQ/initcwndbps/15110/mm/32/mn/sn-oguesnzl/ms/lv/mv/m/pl/19/keepalive/yes/mt/1521699311/ip/54.92.34.214/ipbi
ts/0/expire/1521721007/sparams/ip,ipbits,expire,id,itag,source,requiressl,ratebypass,live,cmbypass,goi,sgoap,sgovp,hls_c
hunk_host,force_finished,playlist_type,gcr,ei,initcwndbps,mm,mn,ms,mv,pl/signature/4401FC741F72363AFC9F91C7AA8FA80CF8BD9
74F.2A3244E2EA07D8E1775493DEF9FD1F2FAF33E4A4/key/dg_yt0/playlist/index.m3u8/sq/0/goap/clen%3D47811%3Blmt%3D1521684609936
570/govp/clen%3D209269%3Blmt%3D1521684609936572/dur/2.000/file/seg.ts' for reading
[h264 @ 02d6ea60] Reinit context to 1280x720, pix_fmt: yuv420p
Input #0, hls,applehttp, from 'https://manifest.googlevideo.com/api/manifest/hls_playlist/id/yd9U27JlO-c.0/itag/300/sour
ce/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/cmbypass/yes/goi/160/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3D
yes%3Bitag%3D298/hls_chunk_host/r6---sn-oguesnzl.googlevideo.com/force_finished/1/playlist_type/CLEAN/gcr/jp/ei/T0qzWoSz
F9nxqQHovoaICQ/initcwndbps/15110/mm/32/mn/sn-oguesnzl/ms/lv/mv/m/pl/19/dover/10/keepalive/yes/mt/1521699311/ip/54.92.34.
214/ipbits/0/expire/1521721007/sparams/ip,ipbits,expire,id,itag,source,requiressl,ratebypass,live,cmbypass,goi,sgoap,sgo
vp,hls_chunk_host,force_finished,playlist_type,gcr,ei,initcwndbps,mm,mn,ms,mv,pl/signature/4401FC741F72363AFC9F91C7AA8FA
80CF8BD974F.2A3244E2EA07D8E1775493DEF9FD1F2FAF33E4A4/key/dg_yt0/playlist/index.m3u8':
  Duration: 01:58:52.00, start: 0.000000, bitrate: 3 kb/s
  Program 0
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 0
    Stream #0:1: Video: h264 (Main), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p(left), 1280x720 [SAR 1:1 DAR 16
:9], 60 fps, 60 tbr, 90k tbn, 120 tbc
    Metadata:
      variant_bitrate : 0
[mpegts @ 02f58a40] muxrate VBR, pcr every 9000 pkts, sdt every 200, pat/pmt every 40 pkts
Output #0, mpegts, to 'file:銆愯崚閲庤鍕曘€戙偗銉偣銉溿偊绺涖倞銇儷銉笺儬銉炪儍銉併倓銈嬨仦w銆愯鑱磋€呭弬鍔犲瀷
銆?yd9U27JlO-c.mp4.part':
  Metadata:
    encoder         : Lavf58.0.100
    Stream #0:0: Video: h264 (Main), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p(left), 1280x720 (0x0) [SAR 1:1
DAR 16:9], q=2-31, 60 fps, 60 tbr, 90k tbn, 90k tbc
    Metadata:
      variant_bitrate : 0
    Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 0
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
<end of log>

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.


Description of your issue, suggested solution and other information

Explanation of your issue in arbitrary form goes here. Please make sure the description is worded well enough to be understood. Provide as much context and examples as possible.
If work on your issue requires account credentials please provide them or explain how one can obtain them.

When downloading the Live broadcast video with m3u8, process is seizing up like the log show, ffmpeg is working with 12% cpu resource but no network resource is occupid by it or youtube-dl.
It seems to be youtube did something to refuse the data transmission, it works well 3 months ago;

@shahar603
Copy link

@shahar603 shahar603 commented Mar 22, 2018

I'm experiencing the same issue. With other programs as well (FFmpeg, Streamlink).

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Mar 22, 2018

Update ffmpeg.

@dstftw dstftw closed this Mar 22, 2018
@shahar603
Copy link

@shahar603 shahar603 commented Mar 22, 2018

It did not solve the problem.

  • I updated FFmpeg to version 3.4.2
  • youtube-dl is in version 2018.03.20

I used the --ffmpeg-location to make sure youtube-dl uses the latest FFmpeg 3.4.2.

It seems that youtube-dl (and FFmpeg) reads the livestream in small chunks (150 frames) every 10 seconds or so. It opens a new ts file, downloads 150 frames for one second, hangs for 10 seconds (no netwrok activity) and then it opens a new ts file and download another 150 frames.

Here is an example:
youtube_dl example

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.