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
131.18k stars 9.93k forks source link

[ESPN] ESPN+ "Unable to open key file" and "ffmpeg exited with code 1" #16359

Open toovix opened 6 years ago

toovix commented 6 years ago

Please follow the guide below


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

Before submitting an issue make sure you have:

What is the purpose of your issue?

Not sure if bug or more site support need?

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 ```):

Using site URL

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', '--ffmpeg-location', 'C:\\ffmpeg\\ffmpeg-20180502-e07b191-win32-static\\bin', 'http://www.espn.com/
watch/film/cf950763-9adb-4acf-b04e-425d8676615c/tommy', '-f', '4600', '-o', 'W:\\Work\\ESPNPlus.Test.720p.WEB-DL.x264-YouTube-DL.mkv']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2018.05.01
[debug] Python version 3.4.4 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-90920-ge07b1913fc, ffprobe N-90920-ge07b1913fc, rtmpdump 2.4
[debug] Proxy map: {}
[ESPNArticle] tommy: Downloading webpage
ERROR: Unable to extract video id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  you
tube-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 "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpulhs0gaq\build\youtube_dl\YoutubeDL.py", line 789, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpulhs0gaq\build\youtube_dl\extractor\common.py", line 440, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpulhs0gaq\build\youtube_dl\extractor\espn.py", line 204, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpulhs0gaq\build\youtube_dl\extractor\common.py", line 820, in _search_regex
youtube_dl.utils.RegexNotFoundError: Unable to extract video id; 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.

Using m3u8 URL

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', '--ffmpeg-location', 'C:\\ffmpeg\\ffmpeg-20180502-e07b191-win32-static\\bin', 'https://hlsvod-l3c-c
lt1.media.plus.espn.com/ps01/espn/hls/2018/03/14/855deb02-94a8-4b63-874e-add949b25ab5/1520999867346/master_wired60_s2.m3u8', '-f', '4600', '
-o', 'W:\\Work\\ESPNPlus.Test.720p.WEB-DL.x264-YouTube-DL.mkv']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2018.05.01
[debug] Python version 3.4.4 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-90920-ge07b1913fc, ffprobe N-90920-ge07b1913fc, rtmpdump 2.4
[debug] Proxy map: {}
[generic] master_wired60_s2: Requesting header
[generic] master_wired60_s2: Downloading m3u8 information
[debug] Invoking downloader on 'https://hlsvod-l3c-clt1.media.plus.espn.com/ps01/espn/hls/2018/03/14/855deb02-94a8-4b63-874e-add949b25ab5/15
20999867346/asset_3500k.m3u8'
[download] Destination: W:\Work\ESPNPlus.Test.720p.WEB-DL.x264-YouTube-DL.mkv
[debug] ffmpeg command line: "C:\ffmpeg\ffmpeg-20180502-e07b191-win32-static\bin\ffmpeg" -y -loglevel verbose -headers "Accept-Encoding: gzi
p, deflate
Accept-Language: en-us,en;q=0.5
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
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)
" -i "https://hlsvod-l3c-clt1.media.plus.espn.com/ps01/espn/hls/2018/03/14/855deb02-94a8-4b63-874e-add949b25ab5/1520999867346/asset_3500k.m3
u8" -c copy -f mp4 "-bsf:a" aac_adtstoasc "file:W:\Work\ESPNPlus.Test.720p.WEB-DL.x264-YouTube-DL.mkv.part"
ffmpeg version N-90920-ge07b1913fc Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 7.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-lib
ass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg -
-enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwav
pack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-
libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
--enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth
  libavutil      56. 18.100 / 56. 18.100
  libavcodec     58. 19.100 / 58. 19.100
  libavformat    58. 13.100 / 58. 13.100
  libavdevice    58.  4.100 / 58.  4.100
  libavfilter     7. 21.100 /  7. 21.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
  libpostproc    55.  2.100 / 55.  2.100
[AVIOContext @ 05b37a00] The "user-agent" option is deprecated: use the "user_agent" option instead
[hls,applehttp @ 05b33080] HLS request for url 'https://hlsvod-l3c-clt1.media.plus.espn.com/ps01/espn/hls/2018/03/14/855deb02-94a8-4b63-874e
-add949b25ab5/1520999867346/asset_3500k/00000/asset_3500k_00001.ts', offset 0, playlist 0
[hls,applehttp @ 05b33080] Opening 'https://playback.svcs.plus.espn.com/media/855deb02-94a8-4b63-874e-add949b25ab5/keys/6eb41ad2-a2e3-4ba9-b
b8f-e7e72c19aa56' for reading
[https @ 06c8a980] The "user-agent" option is deprecated: use the "user_agent" option instead
Unable to open key file https://playback.svcs.plus.espn.com/media/855deb02-94a8-4b63-874e-add949b25ab5/keys/6eb41ad2-a2e3-4ba9-bb8f-e7e72c19
aa56
[hls,applehttp @ 05b33080] Opening 'crypto+https://hlsvod-l3c-clt1.media.plus.espn.com/ps01/espn/hls/2018/03/14/855deb02-94a8-4b63-874e-add9
49b25ab5/1520999867346/asset_3500k/00000/asset_3500k_00001.ts' for reading
[https @ 06f7cb40] The "user-agent" option is deprecated: use the "user_agent" option instead
[hls,applehttp @ 05b33080] Error when loading first segment 'https://hlsvod-l3c-clt1.media.plus.espn.com/ps01/espn/hls/2018/03/14/855deb02-9
4a8-4b63-874e-add949b25ab5/1520999867346/asset_3500k/00000/asset_3500k_00001.ts'
https://hlsvod-l3c-clt1.media.plus.espn.com/ps01/espn/hls/2018/03/14/855deb02-94a8-4b63-874e-add949b25ab5/1520999867346/asset_3500k.m3u8: In
valid data found when processing input

ERROR: ffmpeg exited with code 1
  File "__main__.py", line 19, in <module>
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpulhs0gaq\build\youtube_dl\__init__.py", line 471, in main
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpulhs0gaq\build\youtube_dl\__init__.py", line 461, in _real_main
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpulhs0gaq\build\youtube_dl\YoutubeDL.py", line 1993, in download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpulhs0gaq\build\youtube_dl\YoutubeDL.py", line 800, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpulhs0gaq\build\youtube_dl\YoutubeDL.py", line 854, in process_ie_result
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpulhs0gaq\build\youtube_dl\YoutubeDL.py", line 1627, in process_video_result
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpulhs0gaq\build\youtube_dl\YoutubeDL.py", line 1900, in process_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpulhs0gaq\build\youtube_dl\YoutubeDL.py", line 1839, in dl
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpulhs0gaq\build\youtube_dl\downloader\common.py", line 365, in download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpulhs0gaq\build\youtube_dl\downloader\external.py", line 64, in real_download
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpulhs0gaq\build\youtube_dl\downloader\common.py", line 166, in report_error
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpulhs0gaq\build\youtube_dl\YoutubeDL.py", line 617, in report_error
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpulhs0gaq\build\youtube_dl\YoutubeDL.py", line 579, in trouble
<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):

or

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

Is I missing somethings obvious here?

Get "Unable to open key file" and "Error when loading first segment" and "ffmpeg exited with code 1" errors. Whats wrong? Do I needs to pass more informations through CLI ?

ESPN+ video. It's required to have ESPN+. I have account.

ESPN+ has a free trial if an account for testing needing. Just go here: https://plus.espn.com/

Any helps appreciated? Thanks!

PlaceboPRS commented 6 years ago

Same issue for me currently :(

element73 commented 6 years ago

ya, I just made a post about this. Really hard to get a download going for this. I have an account (my account) for testing.

update: figured it out.

yowzyowza commented 6 years ago

@element73 how did you get it to work?

element73 commented 6 years ago

I explained it somewhere. This issue should be closed since it's the same. If you can't find it, post here again.

tp0 commented 6 years ago

@yowzyowza https://github.com/streamlink/streamlink/issues/1636#issuecomment-391792340

thesteveway commented 6 years ago

has anybody gotten that method to work? I can't figure it out to save my life.

mhpob commented 5 years ago

@thesteveway Probably late for you, but just putting all of this together for myself. In Chrome:

  1. Inspect -> Network
  2. Refresh page
  3. Filter for "key"; under "Request Headers" one link will have authorization: followed by a lot of characters. Copy and paste these somewhere.
  4. Filter for "m3u8", copy the link to the m3u8 of choice.
  5. Run the following, inserting the copied key and m3u8 url:
    youtube-dl --add-header "authorization:**pastekeyhere**" "**m3u8URLhere**"
thesteveway commented 5 years ago

@mhpob thank you! I've been using a similar method with streamlink but never found a way with y-dl

mironmizrahi commented 5 years ago

@mhpob Been battling with this all day. First with livestreamer then streamlink now youtube-dl (which seems the most successful thus far).

I followed your tips, got the authorization string and plugged it in. getting mixed results but none good. Sometimes it seems to work but with errors and only downloads a video showing 'commercial break'. when watching the real stream it starts with a couple of seconds of this but then moves on to the real thing. This is what the log below shows. I stopped it after a few seconds otherwise it would have been hundreds of lines.

the other case is when I get this

Unable to open key file https://playback.svcs.plus.espn.com/events/d1c73440-76a6
-4a3f-bb92-03d957503bc1/media/49fac5f4-8fdc-4d71-98cb-50028a962be3/keys/1a3b3f8b
-bc33-4396-af47-cc470200c360

if I use livestreamer I get a more verbose message

[stream.hls][error] Failed to create decryptor: Unable to open URL: https://playback.svcs.plus.espn.com/events/d1c73440-76a6-4a3f-bb92-03d957503bc1/media/49fac5f4-8fdc-4d71-98cb-50028a962be3/keys/1a3b3f8b-bc33-4396-af47-cc470200c360 (hostname 'playback.svcs.plus.espn.com' doesn't match '*.edge.bamgrid.com')

but either way it downloads, just the wrong video with 'commercial break'. another oddity is that it skips significant chunks like so (note how it skips from 30sec to 22min)

frame= 1735 fps= 53 q=-1.0 size=   24789kB time=00:00:28.92 bitrate=7021.4kbits/
frame= 1774 fps= 54 q=-1.0 size=   25366kB time=00:00:29.56 bitrate=7029.3kbits/
[hls,applehttp @ 000000000045cb00] Failed to open segment of playlist 0
    Last message repeated 270 times
frame= 1800 fps= 49 q=-1.0 size=   25725kB time=00:00:30.03 bitrate=7017.2kbits/
frame= 1804 fps= 49 q=-1.0 size=   25860kB time=00:22:58.93 bitrate= 153.6kbits/

anyway, hope someone can help as I am pretty desperate to get this to work (BTW, I do have an ESPN+ paid account)

MAIN LOG

[debug] Encodings: locale cp1252, fs mbcs, out cp1252, pref cp1252
[debug] youtube-dl version 2019.01.30.1
[debug] Python version 3.4.4 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-78559-g2e8ad2d
[debug] Proxy map: {}
[generic] master_desktop_complete_aeng-trimmed: Requesting header
[generic] master_desktop_complete_aeng-trimmed: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'https://hlslive-l3c-clt2.media.plus.espn.com/tok
en=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b6962~data=49fac5f4-8fdc-4d7
1-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036abdd050fe1/ls01/espn/even
t/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_1549144854032/7000K/7000_complet
e_aeng-trimmed.m3u8'
[download] Destination: d:\temp\test.ts
[debug] ffmpeg command line: ffmpeg -y -loglevel verbose -headers "Accept-Encodi
ng: gzip, deflate
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Accept-Language: en-us,en;q=0.5
authorization: eeyJraWQiOiJmMzIxY2I5YS0xZDY5LTExZTgtOWUzNS03ODRmNDM5NmQ2MmEiLCJ0
eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxY2VhMmU1My1mZTA3LTQ4NTEtYTcwNS0yNDR
mNTU0YjY5NjIiLCJuYmYiOjE1NDkzMjc2NDMsInBhcnRuZXJOYW1lIjoiZXNwbiIsImlzcyI6InVybjp
iYW10ZWNoOnNlcnZpY2U6dG9rZW4iLCJjb250ZXh0Ijp7InZlcnNpb24iOiJWMi4wLjAiLCJpZCI6Ijk
5ZDVlMjYwLTI4ZGYtMTFlOS05OTUxLTAyNDJhYzExMDAwOCIsInBhcnRuZXIiOnsibmFtZSI6ImVzcG4
ifSwidHlwZSI6IlJFR0lTVEVSRUQiLCJpcF9hZGRyZXNzIjoiNjMuMTE3LjE0NC4xMiIsImRldmljZSI
6eyJpZCI6IjlkZTk3ZTU4LWY4MTItNGU4Mi04ZGM2LTA2NTlkZDUyNzNiNSIsInBsYXRmb3JtIjoiYnJ
vd3NlciJ9LCJsb2NhdGlvbiI6eyJ0eXBlIjoiWklQX0NPREUiLCJ6aXBfY29kZSI6IjMwMzA5IiwiY29
1bnRyeV9jb2RlIjoidXMiLCJkbWEiOjUyNC4wfSwicHJvZmlsZXMiOlt7ImFjdGl2ZSI6dHJ1ZSwidHl
wZSI6InVybjpiYW10ZWNoOnByb2ZpbGUiLCJpZCI6ImJmMjk5ZDk5LWVjNTEtNDcwMi1iYWYwLTM5ZTA
wYjc3M2M3ZiIsInBhcmVudGFsX2NvbnRyb2xzIjp7ImVuYWJsZWQiOmZhbHNlfX0seyJhY3RpdmUiOmZ
hbHNlLCJ0eXBlIjoidXJuOmJhbXRlY2g6cHJvZmlsZSIsImlkIjoiY2IxZjdiNGEtMjhjNy00YTc1LTk
1NjMtM2QyZjNkYWY1Y2I2IiwicGFyZW50YWxfY29udHJvbHMiOnsiZW5hYmxlZCI6ZmFsc2V9fV0sImd
lbmVyYXRlZF9vbiI6IjIwMTktMDItMDVUMDA6NDc6MjMuNTI2KzAwMDAiLCJ1cGRhdGVkX29uIjoiMjA
xOS0wMi0wNVQwMDo0NzoyMy41MjYrMDAwMCIsImV4cGlyZXNfb24iOiIyMDE5LTAyLTA1VDA0OjQ3OjI
zLjUyNiswMDAwIiwibWVkaWFfcGVybWlzc2lvbnMiOnsiZW50aXRsZW1lbnRzIjpbIkVTUE5fUExVUyJ
dLCJydWxlcyI6eyJwYXNzZWQiOltdfSwiZGF0YSI6e319LCJzdWJzY3JpcHRpb25zIjpbeyJpZCI6InV
ybjpiYW10ZWNobWVkaWE6c3Vic2NyaXB0aW9uLWFwaTpzdWJzY3JpcHRpb246RDJDOkJBTVRFQ0g6ZXN
wbl85NDczNDM2OS01OGNiLTQ5NzQtYjg2NS0xNTJkMmQwYTMzNzVfMTU0OTI0MzkxNDM5NF91cy13ZXN
0LTJfODQwMDE5OTkxMDIwOTkxOTk1MTg5OTAwMCIsImVudGl0bGVtZW50cyI6WyJFU1BOX1BMVVMiXSw
iZXhwaXJlc19vbiI6IjIwMTktMDItMTFUMTM6MzI6MDEuMDMxWiJ9XSwiYmxhY2tvdXRzIjp7InJ1bGV
zIjp7InZpb2xhdGVkIjpbXX0sImRhdGEiOnt9fSwiYWNjb3VudCI6eyJ0eXBlIjoidXJuOmJhbXRlY2g
6YWNjb3VudCIsImlkIjoiMWNlYTJlNTMtZmUwNy00ODUxLWE3MDUtMjQ0ZjU1NGI2OTYyIiwiaG9tZV9
sb2NhdGlvbiI6eyJ0eXBlIjoiVU5LTk9XTiJ9LCJkYXRhIjp7fX0sImxvZ2luX2NvbnRleHQiOnsiaWR
wIjoiaHR0cHM6XC9cL2F1dGhvcml6YXRpb24uZ28uY29tIiwiYWlkIjoie0Y4REIzRkUyLUFDRkItNDU
0Ni05MUI1LUJENjJGNUU4M0NENH0ifSwiYWN0aXZlX3Byb2ZpbGVfaWQiOiJiZjI5OWQ5OS1lYzUxLTQ
3MDItYmFmMC0zOWUwMGI3NzNjN2YifSwic2Vzc2lvbklkIjoiOTlkNWUyNjAtMjhkZi0xMWU5LTk5NTE
tMDI0MmFjMTEwMDA4IiwiZXhwIjoxNTQ5MzQyMDQzLCJlbnYiOiJwcm9kIiwiaWF0IjoxNTQ5MzI3NjQ
zLCJqdGkiOiI5OWQ2MDk3MC0yOGRmLTExZTktOTk1MS0wMjQyYWMxMTAwMDgifQ.B0rSucaogpMer4Vx
s3FaqeTDdDIufE8CJvpLtba8NAw
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
" -i "https://hlslive-l3c-clt2.media.plus.espn.com/token=exp=1549414045~id=1cea2
e53-fe07-4851-a705-244f554b6962~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=f
c55aa4333528b864b4228810df036abdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furma
n_M_Lacrosse_20190203_1549144854032/7000K/7000_complete_aeng-trimmed.m3u8" -c co
py -f mp4 "-bsf:a" aac_adtstoasc "file:d:\temp\test.ts.part"
ffmpeg version N-78559-g2e8ad2d Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.3.0 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --ena
ble-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --
enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-lib
x265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-d
ecklink --enable-zlib
  libavutil      55. 17.103 / 55. 17.103
  libavcodec     57. 24.103 / 57. 24.103
  libavformat    57. 25.100 / 57. 25.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 32.100 /  6. 32.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/00/00_010.ts', offset 0, playlist 0
Unable to open key file https://playback.svcs.plus.espn.com/events/d1c73440-76a6
-4a3f-bb92-03d957503bc1/media/49fac5f4-8fdc-4d71-98cb-50028a962be3/keys/1a3b3f8b
-bc33-4396-af47-cc470200c360
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/00/01_678.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/00/06_683.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/00/11_688.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/00/16_693.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/00/21_698.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/00/26_703.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/00/31_708.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/00/36_713.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/00/41_718.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/00/46_723.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/00/51_728.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/00/56_733.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/01/01_738.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/01/06_743.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/01/11_748.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/01/16_753.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/01/21_758.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/01/26_763.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/01/31_768.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/01/36_773.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/01/41_778.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/01/46_783.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/01/51_788.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/01/56_793.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/02/01_798.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/02/06_803.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/02/11_808.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://hlslive-l3c-clt2
.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a705-244f554b696
2~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b4228810df036a
bdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_20190203_15491448
54032/7000K/034/00/02/16_813.ts', offset 0, playlist 0
[hls,applehttp @ 0000000000462e80] Failed to open segment of playlist 0
[hls,applehttp @ 0000000000462e80] HLS request for url 'https://aeng.svcs.plus.e
spn.com/ts/v1?mode=live&partnr=espn&slttyp=m&asstid=6aa05390-d712-40c3-8e17-1fe3
44a69643&podID=1&brkdur=30&sgmnt=1&chunkdur=5;inaserv=https://aserv-akc-us-east-
1.media.plus.espn.com/v4/aeng/media.ts?partner=espn&bitrate=7000&preset=F2F37D5F
804916915EEFCAB9A6648243&pat=000001&pmt=003C01E100010020A3FC4428&es=1B0F081BDAC0
16012CF2&es=0F0F101BDAC58000EAD3&es=152538CC&es=862530&chunkdur=5', offset 0, pl
aylist 0
[tls @ 0000000002d3eb40] The TLS connection was non-properly terminated.
[hls,applehttp @ 0000000000462e80] Error when loading first segment 'https://hls
live-l3c-clt2.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe07-4851-a70
5-244f554b6962~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4333528b864b
4228810df036abdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_Lacrosse_2019
0203_1549144854032/7000K/034/00/00/00_010.ts'
https://hlslive-l3c-clt2.media.plus.espn.com/token=exp=1549414045~id=1cea2e53-fe
07-4851-a705-244f554b6962~data=49fac5f4-8fdc-4d71-98cb-50028a962be3~hash=fc55aa4
333528b864b4228810df036abdd050fe1/ls01/espn/event/2019/02/03/Duke_vs_Furman_M_La
crosse_20190203_1549144854032/7000K/7000_complete_aeng-trimmed.m3u8: Immediate e
xit requested
Exiting normally, received signal 2.

ERROR: Interrupted by user
^C 
thesteveway commented 5 years ago

what's the full command you're using?

mironmizrahi commented 5 years ago

what's the full command you're using?

youtube-dl.exe -v https://hlslive-l3c-clt2.media.plus.espn.com/token=exp
=1549414045~id=1cea2e53-fe07-4851-a705-244f554b6962~data=49fac5f4-8fdc-4d71-98cb
-50028a962be3~hash=fc55aa4333528b864b4228810df036abdd050fe1/ls01/espn/event/2019
/02/03/Duke_vs_Furman_M_Lacrosse_20190203_1549144854032/master_desktop_complete_
aeng-trimmed.m3u8 --add-header "authorization:......." -o filename
thesteveway commented 5 years ago

try this...

youtube-dl --add-header "authorization:KEY" "M3U8"

the key is the reallyyyyy long string

rautamiekka commented 5 years ago

Especially on Window$, never skip using double quotes around strings that have something else than A-Z, 0-9 or -_\. In the end you'll more likely avoid a problem than get one by doing so.

tml commented 5 years ago

@thesteveway Probably late for you, but just putting all of this together for myself. In Chrome:

  1. Inspect -> Network
  2. Refresh page
  3. Filter for "key"; under "Request Headers" one link will have authorization: followed by a lot of characters. Copy and paste these somewhere.
  4. Filter for "m3u8", copy the link to the m3u8 of choice.
  5. Run the following, inserting the copied key and m3u8 url:
youtube-dl --add-header "authorization:**pastekeyhere**" "**m3u8URLhere**"

They seem to have switched up the mechanism; now the auth key is stored in the HTTP header dss-session-token in a URL that contains the query parameter entitlements

michaelzs1994 commented 4 years ago

@thesteveway可能迟到了,但只是把所有这些都放在一起给自己。在Chrome中:

  1. Inspect -> Network
  2. 刷新页面
  3. 过滤“关键”; 在“请求标题”下,一个链接authorization:后面会跟着很多字符。将它们复制并粘贴到某个地方。
  4. 过滤“m3u8”,将链接复制到所选的m3u8。
  5. 运行以下命令,插入复制的密钥和m3u8 url:
youtube-dl --add-header "authorization:**pastekeyhere**" "**m3u8URLhere**"

他们似乎已经改变了机制; 现在,auth密钥存储在dss-session-token包含查询参数的URL 的HTTP头中entitlements

hi,can you download espn+ video?

tml commented 4 years ago

Yes, I am able to download from ESPN+ following these directions.

roadzy commented 4 years ago

Is this still working?

cwondercheck commented 4 years ago

Is this still working?

no its not

thesteveway commented 4 years ago

Is this still working?

no its not

Works for me

cwondercheck commented 4 years ago

Is this still working?

no its not

Works for me

please help lol been trying all day

cwondercheck commented 4 years ago

@thesteveway can i email you?

thesteveway commented 4 years ago

@thesteveway can i email you?

Yeh np

tml commented 4 years ago

At least for me, this has stopped working because the number of bytes in the request header exceed a compiled in ffmpeg default of 4k; if you get the source code of ffmpeg and change the MAX_URL_SIZE constant in libavformat/internal.h, you can compile an ffmpeg that will once again work.

index 17a6ab07d3..5a6d499813 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -27,7 +27,7 @@
 #include "avformat.h"
 #include "os_support.h"

-#define MAX_URL_SIZE 4096
+#define MAX_URL_SIZE 8192

 /** size of probe buffer, for guessing file type from file contents */
 #define PROBE_BUF_MIN 2048
bdavies26 commented 4 years ago

At least for me, this has stopped working because the number of bytes in the request header exceed a compiled in ffmpeg default of 4k; if you get the source code of ffmpeg and change the MAX_URL_SIZE constant in libavformat/internal.h, you can compile an ffmpeg that will once again work.

index 17a6ab07d3..5a6d499813 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -27,7 +27,7 @@
 #include "avformat.h"
 #include "os_support.h"

-#define MAX_URL_SIZE 4096
+#define MAX_URL_SIZE 8192

 /** size of probe buffer, for guessing file type from file contents */
 #define PROBE_BUF_MIN 2048

I realize this is a basic question but how exactly do I go about doing this?

tml commented 4 years ago

At least for me, this has stopped working because the number of bytes in the request header exceed a compiled in ffmpeg default of 4k; if you get the source code of ffmpeg and change the MAX_URL_SIZE constant in libavformat/internal.h, you can compile an ffmpeg that will once again work.

index 17a6ab07d3..5a6d499813 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -27,7 +27,7 @@
 #include "avformat.h"
 #include "os_support.h"

-#define MAX_URL_SIZE 4096
+#define MAX_URL_SIZE 8192

 /** size of probe buffer, for guessing file type from file contents */
 #define PROBE_BUF_MIN 2048

I realize this is a basic question but how exactly do I go about doing this?

Visit https://github.com/FFmpeg/FFmpeg to get a copy of the source code.

Navigate to the directory libavformat and edit the file internal.h; find the line with the 4096 value, shown above, and change that value to 8192. Then follow the instructions in ffmpeg's source code (e.g., the INSTALL.md file, which is a markdown/text file) for how to compile ffmpeg.

cwondercheck commented 4 years ago

At least for me, this has stopped working because the number of bytes in the request header exceed a compiled in ffmpeg default of 4k; if you get the source code of ffmpeg and change the MAX_URL_SIZE constant in libavformat/internal.h, you can compile an ffmpeg that will once again work.

index 17a6ab07d3..5a6d499813 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -27,7 +27,7 @@
 #include "avformat.h"
 #include "os_support.h"

-#define MAX_URL_SIZE 4096
+#define MAX_URL_SIZE 8192

 /** size of probe buffer, for guessing file type from file contents */
 #define PROBE_BUF_MIN 2048

I realize this is a basic question but how exactly do I go about doing this?

Visit https://github.com/FFmpeg/FFmpeg to get a copy of the source code.

Navigate to the directory libavformat and edit the file internal.h; find the line with the 4096 value, shown above, and change that value to 8192. Then follow the instructions in ffmpeg's source code (e.g., the INSTALL.md file, which is a markdown/text file) for how to compile ffmpeg.

does anybody have a forked version of this that I could use bc I still don't understand lol

ehurdler commented 4 years ago

@thesteveway can i email you?

Yeh np

Are you able to get something from espn+ to work? Can I email you as well to find a solution if yours is still working?

cyanide43 commented 4 years ago

@tml cannot find the dss-session-token HTML header or the 'entitlements' parameter. Any idea where it may have moved?

tml commented 4 years ago

It moves. Look at all the requests immediately after login. Filter it for "entitlement". Look at each header for each of these requests until you find one with the dss-session-token

On Thu, May 28, 2020 at 9:47 PM Cyanide_ notifications@github.com wrote:

@tml https://github.com/tml cannot find the dss-session-token HTML header. Any idea where it may have moved?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ytdl-org/youtube-dl/issues/16359#issuecomment-635741352, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAISTEZDD323LERZY6N6TTRT4V5TANCNFSM4E57Y2FA .

ehurdler commented 4 years ago

I can find the dss-session-token when i filter for "entitlement", however when i put it altogether with youtube-dl --add-header "authorization:" ".m3u8urlHERE" I still get error with full output shown below. Am I doing something wrong? tml, are you able to get things downloaded still? Is my issue ffmpeg?

youtube-dl --add-header "authorization:******LONG STRING OF CHARACTERS" "https://hlsvod-akc-clt1.media.plus.espn.com/ps01/espn/hls/4574ba2c-37c9-4ec6-a798-e3fad250a479/master-ts-desktop-silk-ba043edb-32c1-44c5-8831-5689563bce49-ad133ca2-77bd-4c46-b6fc-37eabacc688a.m3u8"
[generic] master-ts-desktop-silk-ba043edb-32c1-44c5-8831-5689563bce49-ad133ca2-77bd-4c46-b6fc-37eabacc688a: Requesting header
[generic] master-ts-desktop-silk-ba043edb-32c1-44c5-8831-5689563bce49-ad133ca2-77bd-4c46-b6fc-37eabacc688a: Downloading m3u8 information
[download] Destination: NA - sNAeNA - master-ts-desktop-silk-ba043edb-32c1-44c5-8831-5689563bce49-ad133ca2-77bd-4c46-b6fc-37eabacc688a.mp4
ffmpeg version 4.1.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags='-I/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/openjdk-11.0.2.jdk/Contents/Home/include/darwin' --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libmp3lame --enable-libopus --enable-librubberband --enable-libsnappy --enable-libtesseract --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-videotoolbox --disable-libjack --disable-indev=jack --enable-libaom --enable-libsoxr
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
[hls,applehttp @ 0x7ff73b808e00] Opening 'https://playback.svcs.plus.espn.com/silk/v1/obtain-license/8c336367-6da4-4a0e-9c2f-533965c15a9d' for reading
Unable to open key file https://playback.svcs.plus.espn.com/silk/v1/obtain-license/8c336367-6da4-4a0e-9c2f-533965c15a9d
[hls,applehttp @ 0x7ff73b808e00] Opening 'crypto+https://hlsvod-akc-clt1.media.plus.espn.com/ps01/espn/hls/4574ba2c-37c9-4ec6-a798-e3fad250a479/r/2a4a3776-21c4-4e23-94fe-dedc871c0b93/9fcb-MAIN/ccd4275d-5824-4c73-86df-2f9002a8d0fa/00/00/00_000.ts' for reading
[hls,applehttp @ 0x7ff73b808e00] Error when loading first segment 'https://hlsvod-akc-clt1.media.plus.espn.com/ps01/espn/hls/4574ba2c-37c9-4ec6-a798-e3fad250a479/r/2a4a3776-21c4-4e23-94fe-dedc871c0b93/9fcb-MAIN/ccd4275d-5824-4c73-86df-2f9002a8d0fa/00/00/00_000.ts'
https://hlsvod-akc-clt1.media.plus.espn.com/ps01/espn/hls/4574ba2c-37c9-4ec6-a798-e3fad250a479/r/2a4a3776-21c4-4e23-94fe-dedc871c0b93/9fcb-MAIN/ccd4275d-5824-4c73-86df-2f9002a8d0fa/7000_complete.m3u8: Invalid data found when processing input

ERROR: ffmpeg exited with code 1
thesteveway commented 4 years ago

@ehurdler try updating ffmpeg

tml commented 4 years ago

Note that if you build ffmpeg from recent git, I managed to get a patch merged upstream to fix the error being discussed earlier.

https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/d29c42974487d5fa0a5c1b05a09da5c5818ab63e

On Fri, May 29, 2020 at 8:46 AM thesteveway notifications@github.com wrote:

@ehurdler https://github.com/ehurdler try updating ffmpeg

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ytdl-org/youtube-dl/issues/16359#issuecomment-636014062, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAISTHQIEKCY5W46UGPRLLRT7DFTANCNFSM4E57Y2FA .

ehurdler commented 4 years ago

I've updated ffmpeg and I still get the error.

`youtube-dl --add-header "authorization:****longstring***" "https://hlsvod-akc-clt1.media.plus.espn.com/ps01/espn/hls/4574ba2c-37c9-4ec6-a798-e3fad250a479/master-ts-desktop-silk-ba043edb-32c1-44c5-8831-5689563bce49-ad133ca2-77bd-4c46-b6fc-37eabacc688a.m3u8" [generic] master-ts-desktop-silk-ba043edb-32c1-44c5-8831-5689563bce49-ad133ca2-77bd-4c46-b6fc-37eabacc688a: Requesting header [generic] master-ts-desktop-silk-ba043edb-32c1-44c5-8831-5689563bce49-ad133ca2-77bd-4c46-b6fc-37eabacc688a: Downloading m3u8 information [download] Destination: NA - sNAeNA - master-ts-desktop-silk-ba043edb-32c1-44c5-8831-5689563bce49-ad133ca2-77bd-4c46-b6fc-37eabacc688a.mp4 ffmpeg version N-97994-g83fa39eb06 Copyright (c) 2000-2020 the FFmpeg developers built with Apple clang version 11.0.0 (clang-1100.0.33.16) configuration: --prefix=/usr/local --enable-gpl --enable-nonfree --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libopus --enable-libxvid --enable-chromaprint --enable-decklink --samples=fate-suite/ libavutil 56. 49.100 / 56. 49.100 libavcodec 58. 89.100 / 58. 89.100 libavformat 58. 43.100 / 58. 43.100 libavdevice 58. 9.103 / 58. 9.103 libavfilter 7. 83.100 / 7. 83.100 libswscale 5. 6.101 / 5. 6.101 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 [hls @ 0x7fdc9e808200] Skip ('#EXT-X-VERSION:3') [hls @ 0x7fdc9e808200] Skip ('#EXT-X-PROGRAM-DATE-TIME:2017-08-08T00:00:00.000Z') [hls @ 0x7fdc9e808200] Opening 'https://playback.svcs.plus.espn.com/silk/v1/obtain-license/8c336367-6da4-4a0e-9c2f-533965c15a9d' for reading [hls @ 0x7fdc9e808200] Unable to open key file https://playback.svcs.plus.espn.com/silk/v1/obtain-license/8c336367-6da4-4a0e-9c2f-533965c15a9d [hls @ 0x7fdc9e808200] Opening 'crypto+https://hlsvod-akc-clt1.media.plus.espn.com/ps01/espn/hls/4574ba2c-37c9-4ec6-a798-e3fad250a479/r/2a4a3776-21c4-4e23-94fe-dedc871c0b93/9fcb-MAIN/ccd4275d-5824-4c73-86df-2f9002a8d0fa/00/00/00_000.ts' for reading [hls @ 0x7fdc9e808200] Error when loading first segment 'https://hlsvod-akc-clt1.media.plus.espn.com/ps01/espn/hls/4574ba2c-37c9-4ec6-a798-e3fad250a479/r/2a4a3776-21c4-4e23-94fe-dedc871c0b93/9fcb-MAIN/ccd4275d-5824-4c73-86df-2f9002a8d0fa/00/00/00_000.ts' https://hlsvod-akc-clt1.media.plus.espn.com/ps01/espn/hls/4574ba2c-37c9-4ec6-a798-e3fad250a479/r/2a4a3776-21c4-4e23-94fe-dedc871c0b93/9fcb-MAIN/ccd4275d-5824-4c73-86df-2f9002a8d0fa/7000_complete.m3u8: Invalid data found when processing input

ERROR: ffmpeg exited with code 1`

roadzy commented 4 years ago

this works for me

Cntrl+shift+I

Search for shortAuthorize

Locate shortAuthorize?=xxxxxx Under Name Column

Look under Headers -> Request Headers -> Authorization: xxxxx

Ex: Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Search for m3u8

Copy m3u8 url:

Ex: https://content-ause2-up-5.uplynk.com/84a8e5ca2b774ebb854c88ce98e1317e/f.m3u8?oid=xxxxxxxxx

Run the following command

youtube-dl --add-header "authorization:pastekeyhere" "m3u8URLhere"

I've had to reload the page if the authorize doesn't show up.

I have not tried on espn+ but I can confirm this worked on the espn watch video that was marked espn/espn2. I'm assuming espn+ would be the same.

cwondercheck commented 4 years ago

@roadzy what os are you running?

roadzy commented 4 years ago

@cwondercheck youtube-dl is running in linux but I'm grabbing the links from a windows box.

ehurdler commented 4 years ago

youtube-dl --add-header "authorization:pastekeyhere" "m3u8URLhere"

I can get your way to work on ESPN, but the "shortAuthorize" does not appear when in ESPN+. I was able to get a video from ESPN with your method, but ESPN+ seems to have an extra layer of encryption?

mironmizrahi commented 4 years ago

I can get your way to work on ESPN, but the "shortAuthorize" does not appear when in ESPN+. I was able to get a video from ESPN with your method, but ESPN+ seems to have an extra layer of encryption?

I have not tried recently but pre Covid ESPN+ worked fine using this method (youtube-dl --add-header "authorization:pastekeyhere" "m3u8URLhere")

tml commented 4 years ago

The method searching for the dss-session-token key has been working on ESPN+ for me for more than a year, and is still working as of this afternoon; the only tricky part is finding which URL has the header in it, as it seems to change every few months.

cwondercheck commented 4 years ago

The method searching for the dss-session-token key has been working on ESPN+ for me for more than a year, and is still working as of this afternoon; the only tricky part is finding which URL has the header in it, as it seems to change every few months.

What exactly should we be looking for atm?

tml commented 4 years ago

Any HTTP request with the header dss-session-token

On Sat, May 30, 2020 at 9:40 PM cwondercheck notifications@github.com wrote:

The method searching for the dss-session-token key has been working on ESPN+ for me for more than a year, and is still working as of this afternoon; the only tricky part is finding which URL has the header in it, as it seems to change every few months.

What exactly should we be looking for atm?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ytdl-org/youtube-dl/issues/16359#issuecomment-636416005, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAISTAL7IQ6JIVGETWCT7TRUHGRRANCNFSM4E57Y2FA .

ehurdler commented 4 years ago

That is what I have been doing, and I get the error still: `youtube-dl --add-header "authorization:longdss-session-token" "https://hlsvod-akc-clt1.media.plus.espn.com/ps01/espn/hls/4574ba2c-37c9-4ec6-a798-e3fad250a479/master-ts-desktop-silk-ba043edb-32c1-44c5-8831-5689563bce49-ad133ca2-77bd-4c46-b6fc-37eabacc688a.m3u8" [generic] master-ts-desktop-silk-ba043edb-32c1-44c5-8831-5689563bce49-ad133ca2-77bd-4c46-b6fc-37eabacc688a: Requesting header [generic] master-ts-desktop-silk-ba043edb-32c1-44c5-8831-5689563bce49-ad133ca2-77bd-4c46-b6fc-37eabacc688a: Downloading m3u8 information [download] Destination: NA - sNAeNA - master-ts-desktop-silk-ba043edb-32c1-44c5-8831-5689563bce49-ad133ca2-77bd-4c46-b6fc-37eabacc688a.mp4 ffmpeg version N-97994-g83fa39eb06 Copyright (c) 2000-2020 the FFmpeg developers built with Apple clang version 11.0.0 (clang-1100.0.33.16) configuration: --prefix=/usr/local --enable-gpl --enable-nonfree --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libopus --enable-libxvid --enable-chromaprint --enable-decklink --samples=fate-suite/ libavutil 56. 49.100 / 56. 49.100 libavcodec 58. 89.100 / 58. 89.100 libavformat 58. 43.100 / 58. 43.100 libavdevice 58. 9.103 / 58. 9.103 libavfilter 7. 83.100 / 7. 83.100 libswscale 5. 6.101 / 5. 6.101 libswresample 3. 6.100 / 3. 6.100 libpostproc 55. 6.100 / 55. 6.100 [hls @ 0x7f8da4008e00] Skip ('#EXT-X-VERSION:3') [hls @ 0x7f8da4008e00] Skip ('#EXT-X-PROGRAM-DATE-TIME:2017-08-08T00:00:00.000Z') [hls @ 0x7f8da4008e00] Opening 'https://playback.svcs.plus.espn.com/silk/v1/obtain-license/8c336367-6da4-4a0e-9c2f-533965c15a9d' for reading [hls @ 0x7f8da4008e00] Unable to open key file https://playback.svcs.plus.espn.com/silk/v1/obtain-license/8c336367-6da4-4a0e-9c2f-533965c15a9d [hls @ 0x7f8da4008e00] Opening 'crypto+https://hlsvod-akc-clt1.media.plus.espn.com/ps01/espn/hls/4574ba2c-37c9-4ec6-a798-e3fad250a479/r/2a4a3776-21c4-4e23-94fe-dedc871c0b93/9fcb-MAIN/ccd4275d-5824-4c73-86df-2f9002a8d0fa/00/00/00_000.ts' for reading [hls @ 0x7f8da4008e00] Error when loading first segment 'https://hlsvod-akc-clt1.media.plus.espn.com/ps01/espn/hls/4574ba2c-37c9-4ec6-a798-e3fad250a479/r/2a4a3776-21c4-4e23-94fe-dedc871c0b93/9fcb-MAIN/ccd4275d-5824-4c73-86df-2f9002a8d0fa/00/00/00_000.ts' https://hlsvod-akc-clt1.media.plus.espn.com/ps01/espn/hls/4574ba2c-37c9-4ec6-a798-e3fad250a479/r/2a4a3776-21c4-4e23-94fe-dedc871c0b93/9fcb-MAIN/ccd4275d-5824-4c73-86df-2f9002a8d0fa/7000_complete.m3u8: Invalid data found when processing input

ERROR: ffmpeg exited with code 1 ` If this is working for you tml, I guess my issue still is with ffmpeg? I removed ffmpeg, and reinstalled/rebuilt from git. I don't know what I may have done wrong.

cwondercheck commented 4 years ago

for the people who this worked what operating system are you using and what browser? because i've noticed when I would change mine the results would be different

tml commented 4 years ago

I've seen it work in Chrome on Windows and Firefox on Linux.

cwondercheck commented 4 years ago

finally able to get it to work thanks you all

tml commented 4 years ago

@cwondercheck you should indicate what it was that finally made it work in case someone else has the same problem in the future.

cwondercheck commented 4 years ago

I copied what @ehurdler did and it worked

cwondercheck commented 4 years ago

nvm looks like it's not working for me anymore smh

cwondercheck commented 4 years ago

@tml how would you know that a link has the correct token do you use a specific extension?

tml commented 4 years ago

I use Chrome DevTools to search for the phrase "entitlement" in the Network panel.

image

I look through each of these requests until I find one that has the HTTP header "dss-session-token" in the "Request Headers" panel:

image

In all the videos I have archived, I have only ever seen one request with that header per video. I then apply the steps identified earlier using that request header's current value.