I have a website that streams HLS video using FFMPEG https://www.npmjs.com/package/fluent-ffmpeg and AES-128 encryption, using `hls_flags periodic_rekey` with 1 key per segment.
Apple devices require the use of the "original link" ending in .m3u8 to play the video, so I check the User-Agent. If the device is an iPhone/iPad, I use the link https://example.com/test/stream.m3u8, while for Android devices or PCs, I can use a BLOB URL like blob:https://example.com/9cdac1b4-9a2a-4f6e-8a94-dda4b3149517.
Here is the content of the m3u8 file:
I want to prevent as much as possible the use of software to download the video.Code:#EXTM3U #EXT-X-VERSION:6 #EXT-X-TARGETDURATION:6 #EXT-X-MEDIA-SEQUENCE:1 #EXT-X-PLAYLIST-TYPE:VOD #EXT-X-INDEPENDENT-SEGMENTS #EXT-X-KEY:METHOD=AES-128,URI="https://example.com/keys/key1.bin",IV=0x70899936fcf178276e31d4a69b83b5c4 #EXTINF:6.000000, https://example.com/load/segment-1.ts #EXT-X-KEY:METHOD=AES-128,URI="https://example.com/keys/key2.bin",IV=0xd6eb86f3915b64811a7f20a7d28ffdd5 #EXTINF:6.000000, https://example.com/load/segment-2.ts ... #EXT-X-ENDLIST
Currently, IDM reports an error and cannot download,
Then I discovered a demo from THEOplayer: https://www.theoplayer.com/theoplayer-drm-aes-128-encryption, which also uses AES-128 with 1 key per segment (like I do), and they have successfully prevented all download software from working.
I want to ask how to implement video download prevention like THEOplayer, or if I have overlooked something in detection or encryption. I would appreciate any help, thank you.
+ Reply to Thread
Results 1 to 8 of 8
-
Last edited by momochi; 9th Dec 2024 at 00:09.
-
You can download from theoplayer using yt-dlp even if they use aes-128
Code:yt-dlp "https://cdn.theoplayer.com/video/big_buck_bunny_encrypted/stream-800/index.m3u8"
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*] -
-
It seems Cốc Cốc developers are also here. After this post, they updated their browser to be able to download from THEOplayer as well.
Besides AES, are there any other free methods to best prevent downloading (making it difficult to download, I don't mean completely preventing it)? -
Besides AES, are there any other free methods to best prevent downloading (making it difficult to download, I don't mean completely preventing it)?
Last edited by momochi; 9th Dec 2024 at 00:06.
-
«Resistance is futile.»
And since real-life is not a Star Trek episode, then no, you will not win in the end."Programmers are human-shaped machines that transform alcohol into bugs." -
If you're just trying to stop unsophisticated users, there are JavaScript browser fingerprinting libraries that go far beyond just checking the User-Agent. You can then show an error or whatever if their browser is Cốc Cốc
That ofc runs client-side, so would be easy to defeat by an adversary with even mild motivation -
You could take a look into DRM. For example
https://reference.dashif.org/dash.js/latest/samples/drm/widevine.html
If you stick to aes-128, you could simply improve it. For example, you could make it as tedious as possible to discourage users from downloading it:
- disable inspecting and js code injection
- add some ping mechanism in the background that will prevent from downloading if some specific requests aren't made every X seconds
- alter the aes key client side, use multiple keys and also key rotation mechanism
- alter the video fragments instead of downloading them in their original form, ex: each "ts" fragment can be stored as reversed and altered client side
- adding one time requests for m3u8 and having the m3u8 content itself encoded
Obviously, you can still download it even with those. But it will definitely stop the average joe.
Sharing the recorded videos can at least be discouraged* by using dynamic watermark
https://www.vdocipher.com/blog/2014/12/add-text-to-videos-with-watermark/Last edited by 2nHxWW6GkN1l916N3ayz8HQoi; 9th Dec 2024 at 01:49.
--[----->+<]>.++++++++++++.---.--------.
[*drm mass downloader: widefrog*]~~~~~~~~~~~[*how to make your own mass downloader: guide*]
Similar Threads
-
download a stream, but not from a web browser
By Peteru in forum Video Streaming DownloadingReplies: 4Last Post: 30th Jul 2024, 08:05 -
Nhk world video download
By Ken in forum Video Streaming DownloadingReplies: 6Last Post: 1st May 2024, 06:04 -
how to download a drm video without browser.
By DRMdec in forum Video Streaming DownloadingReplies: 19Last Post: 20th Jun 2022, 05:07 -
Download STV World Cup Replay...
By ooo.aragakiyui.ooo in forum Video Streaming DownloadingReplies: 3Last Post: 11th Oct 2021, 08:10 -
Any editor with powerful 60 to 50 fps conversion capability?
By Bencuri in forum EditingReplies: 0Last Post: 20th Oct 2020, 20:53