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

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

Open
toovix opened this issue May 2, 2018 · 63 comments
Open

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

toovix opened this issue May 2, 2018 · 63 comments

Comments

@toovix
Copy link

@toovix toovix commented May 2, 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.05.01. 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.05.01

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

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
Copy link

@PlaceboPRS PlaceboPRS commented Jul 10, 2018

Same issue for me currently :(

@element73
Copy link

@element73 element73 commented Jul 16, 2018

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
Copy link

@yowzyowza yowzyowza commented Jul 22, 2018

@element73 how did you get it to work?

@element73
Copy link

@element73 element73 commented Jul 23, 2018

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

@thesteveway
Copy link

@thesteveway thesteveway commented Aug 10, 2018

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

@mhpob
Copy link

@mhpob mhpob commented Nov 6, 2018

@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
Copy link

@thesteveway thesteveway commented Nov 6, 2018

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

@mironmizrahi
Copy link

@mironmizrahi mironmizrahi commented Feb 5, 2019

@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
Copy link

@thesteveway thesteveway commented Feb 5, 2019

what's the full command you're using?

@mironmizrahi
Copy link

@mironmizrahi mironmizrahi commented Feb 5, 2019

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
Copy link

@thesteveway thesteveway commented Feb 5, 2019

try this...

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

the key is the reallyyyyy long string

@rautamiekka
Copy link

@rautamiekka rautamiekka commented Feb 5, 2019

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
Copy link

@tml tml commented Aug 28, 2019

@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
Copy link

@michaelzs1994 michaelzs1994 commented Sep 11, 2019

@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
Copy link

@tml tml commented Sep 11, 2019

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

@roadzy
Copy link

@roadzy roadzy commented Apr 20, 2020

Is this still working?

@cwondercheck
Copy link

@cwondercheck cwondercheck commented May 6, 2020

Is this still working?

no its not

@thesteveway
Copy link

@thesteveway thesteveway commented May 6, 2020

Is this still working?

no its not

Works for me

@cwondercheck
Copy link

@cwondercheck cwondercheck commented May 6, 2020

Is this still working?

no its not

Works for me

please help lol been trying all day

@cwondercheck
Copy link

@cwondercheck cwondercheck commented May 6, 2020

@thesteveway can i email you?

@thesteveway
Copy link

@thesteveway thesteveway commented May 6, 2020

@thesteveway can i email you?

Yeh np

@tml
Copy link

@tml tml commented May 7, 2020

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
Copy link

@bdavies26 bdavies26 commented May 8, 2020

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
Copy link

@tml tml commented May 8, 2020

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
Copy link

@cwondercheck cwondercheck commented May 8, 2020

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
Copy link

@ehurdler ehurdler commented May 20, 2020

@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
Copy link

@cyanide43 cyanide43 commented May 29, 2020

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

@roadzy
Copy link

@roadzy roadzy commented May 29, 2020

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
Copy link

@cwondercheck cwondercheck commented May 29, 2020

@roadzy what os are you running?

@roadzy
Copy link

@roadzy roadzy commented May 29, 2020

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

@ehurdler
Copy link

@ehurdler ehurdler commented May 29, 2020

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
Copy link

@mironmizrahi mironmizrahi commented May 30, 2020

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
Copy link

@tml tml commented May 31, 2020

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
Copy link

@cwondercheck cwondercheck commented May 31, 2020

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
Copy link

@tml tml commented May 31, 2020

@ehurdler
Copy link

@ehurdler ehurdler commented May 31, 2020

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
Copy link

@cwondercheck cwondercheck commented Jun 23, 2020

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
Copy link

@tml tml commented Jun 23, 2020

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

@cwondercheck
Copy link

@cwondercheck cwondercheck commented Jul 18, 2020

finally able to get it to work thanks you all

@tml
Copy link

@tml tml commented Jul 18, 2020

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

@cwondercheck
Copy link

@cwondercheck cwondercheck commented Jul 27, 2020

I copied what @ehurdler did and it worked

@cwondercheck
Copy link

@cwondercheck cwondercheck commented Jul 27, 2020

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

@cwondercheck
Copy link

@cwondercheck cwondercheck commented Jul 27, 2020

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

@tml
Copy link

@tml tml commented Jul 27, 2020

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.

@cwondercheck
Copy link

@cwondercheck cwondercheck commented Jul 27, 2020

@tml and how would you go about finding the correct .m3u8

@tml
Copy link

@tml tml commented Jul 27, 2020

I am struggling with how to answer this - it's the .m3u8 that shows up in the Network panel when your video starts playing. It should be painfully obvious which one it is.

@cwondercheck
Copy link

@cwondercheck cwondercheck commented Jul 27, 2020

I am struggling with how to answer this - it's the .m3u8 that shows up in the Network panel when your video starts playing. It should be painfully obvious which one it is.

I know that I'm probably messing obvious something up but with any link I choose I get
Unable to open key file https://playback.svcs.plus.espn.com/events/3c4385e9-5fcd-4a6d-b4d7-965d8ab9b9c4/media/fba9bdb8-7795-4a09-8604-4ed2e2accabb/keys/1a229c57-de66-46c8-b2f3-4ce552102912

@cwondercheck
Copy link

@cwondercheck cwondercheck commented Jul 27, 2020

@tml could you show me an example of a working link?

@tml
Copy link

@tml tml commented Jul 28, 2020

What? Why are you trying to download the "bucketId" URL? That is not something that you should be doing. I have no idea whether it will work or not, but at the least it's not what I'm doing to make this work. You get the "dss-session-header" from the HTTP request, and then you pass it as a header to youtube-dl <your M3U8 URL here>

@cwondercheck
Copy link

@cwondercheck cwondercheck commented Jul 28, 2020

if what you are saying is youtube-dl --add-header "autherization:key" "m3u8" yes I understand I was just showing you the link of the video so we could compare m3u8 links

@tml
Copy link

@tml tml commented Jul 28, 2020

Well, I just noticed in your last comment here that you're spelling "Authorization" incorrectly, that might have somewhat to do with it perhaps?

@cwondercheck
Copy link

@cwondercheck cwondercheck commented Jul 28, 2020

Well, I just noticed in your last comment here that you're spelling "Authorization" incorrectly, that might have somewhat to do with it perhaps?

haha no that's not it I just spelled quickly

@tml
Copy link

@tml tml commented Jul 28, 2020

Well, your exact URL with my dss-session-key works fine.

@cwondercheck
Copy link

@cwondercheck cwondercheck commented Jul 28, 2020

Well, your exact URL with my dss-session-key works fine.

what do you think could be the problem becuase I was able to download one video and that was about it this week

@tml
Copy link

@tml tml commented Jul 29, 2020

I have no idea, but I'm pretty sure it's not the original bug being discussed here. My suggestion would be to open a new ticket - make sure you follow all the steps in the template. If you want to tag me on the new ticket, I can take a look.

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
You can’t perform that action at this time.