- Install python3, download tools: ffmpeg and N_m3u8DL-RE
- Put kdl.py, ffmpeg and N_m3u8DL-RE into same folder
- Run
python kdl.pyit will ask you to inputkinescope embed link(e.g. https://kinescope.io/embed/1234534) andreferrer link(e.g. https://videos.mysite.org). kinescope forbids to access without a referrer. - Wait for a download copletion.
kdl.py can automatically select the best quality of a video or you can choose it in a menu provided by N_m3u8DL-RE.
ffmpeg receives parts of the selected video and an audio and muxes them into output mp4 file.
Use your Browser developer tools to find a request to https://kinescope.io/embed/ an use in the script.
Best option to make sure that you are providing right referrer and embedded link is:
- Open in chrome
- Press F12
- Open your webpage, what you want to download
- Press ctrl+ F, and type "u0026"
- You will find list of urls, which contains videos. In Header tab you can grab right referrer and embedded link.
- If
dash = re.findall(r'dash: {"src":"(.?)"', resp)[0].strip()still fails, then switch to response tab and find link, which contains "u0026" (what you found on step 4) , it wll loks like :https://kinescope.io/29402382-ec45-4ea0-b45f-be4fc4f34ff5/master.m3u8?expires=1731320757\u0026token=, without "\u0026token=" it exactly string , what codedash = re.findall(r'{"src":"(.?)"', resp)[0].strip()is trying to find, so just hardcode it
Thanks to @kunter
- 2026-01-12 Parsing new Kinescope response format for a correct m3u8 link. Fixed IndexError: list index out of range at
dash = re.findall(r'dash: {\"src\":\"(.*?)\"', dash)[0].strip()
20:40:49.235 WARN : 2 - Егор Осипов.mp4.copy.copy.mp4
20:40:49.236 WARN : 2 - Егор Осипов.mp4.en.copy.m4a
20:40:49.236 WARN : Muxing to 2 - Егор Осипов.mp4.MUX.mp4
20:40:49.335 WARN : [h264 @ 000001b12ce87c80] top block unavailable for requested intra mode -1
20:40:49.336 WARN : [h264 @ 000001b12ce87c80] error while decoding MB 0 0, bytestream 46984
20:40:49.337 WARN : [h264 @ 000001b12ce87c80] top block unavailable for requested intra mode -1
20:40:49.337 WARN : [h264 @ 000001b12ce87c80] error while decoding MB 27 0, bytestream 2758
20:40:49.337 WARN : [h264 @ 000001b12ce87c80] Increasing reorder buffer to 2
20:40:49.338 WARN : [h264 @ 000001b12ce87c80] top block unavailable for requested intra mode
20:40:49.338 WARN : [h264 @ 000001b12ce87c80] error while decoding MB 12 0, bytestream 800
20:40:49.339 WARN : [h264 @ 000001b12ce87c80] error while decoding MB 40 7, bytestream -9
20:40:49.339 WARN : [h264 @ 000001b12ce87c80] Reference 6 >= 3
20:40:49.339 WARN : [h264 @ 000001b12ce87c80] error while decoding MB 3 0, bytestream 2655
20:40:49.340 WARN : [h264 @ 000001b12ce87c80] top block unavailable for requested intra mode
20:40:49.340 WARN : [h264 @ 000001b12ce87c80] error while decoding MB 26 0, bytestream 971
20:40:49.340 WARN : [h264 @ 000001b12ce87c80] error while decoding MB 14 4, bytestream -9
20:40:49.340 WARN : [h264 @ 000001b12ce87c80] Reference 3 >= 3
20:40:49.341 WARN : [h264 @ 000001b12ce87c80] error while decoding MB 6 0, bytestream 3737
20:40:49.341 WARN : [mov,mp4,m4a,3gp,3g2,mj2 @ 000001b12ce8a9c0] error reading header
20:40:49.341 WARN : [in#1 @ 000001b12cedcb80] Error opening input: Invalid data found when processing input
20:40:49.342 WARN : Error opening input file C:\111\2 - ╨Х╨│╨╛╤А ╨Ю╤Б╨╕╨┐╨╛╨▓.mp4.en.copy.m4a.
20:40:49.342 WARN : Error opening input files: Invalid data found when processing input
20:40:49.363 ERROR: Mux failed
20:40:49.364 ERROR: Failed
я так понимаю он бьется при скачивании?