41 views
Skip to first unread message

pankaj palmate

unread,
Jul 18, 2021, 9:45:23 PM7/18/21
to django...@googlegroups.com
Hello please help me in this, I want to provide my video content to users  and my objects are stored in AWS s3 buckets.I want user to view video for 1 year of validity but restrict to download the video...also he will have acess through my website only(i.e. he should not use s3 object url to access the file and download using Chrome)
Thanks in advance

Benjamin Schollnick

unread,
Jul 18, 2021, 10:09:15 PM7/18/21
to django...@googlegroups.com
Good luck.

If the user can play the video, then they by definition have to be able to download the video.  Unless you want to create your own proprietary streaming mechanism, if the web browser can display the video, it has to be able to cache the video (eg download it locally).  

For example, you can easily download almost any video off of youtube, without issue.  See youtube-dl, as well as dozens of other applications that can do this. 

Yes, there are ways to make this harder, but to play the video the computer has to be able to use some mechanism to download the video.

- Benjamin



On Jul 18, 2021, at 9:44 PM, pankaj palmate <pankajpal...@gmail.com> wrote:

Hello please help me in this, I want to provide my video content to users  and my objects are stored in AWS s3 buckets.I want user to view video for 1 year of validity but restrict to download the video...also he will have acess through my website only(i.e. he should not use s3 object url to access the file and download using Chrome)
Thanks in advance

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPyMU1%2Bwwd6q%2B8m2LpJC6rUB1jxEzHQmh4800AzqBoZ8cW%2BAJw%40mail.gmail.com.

Abhishek Choudhury

unread,
Jul 18, 2021, 11:44:01 PM7/18/21
to django...@googlegroups.com
Hey Pankaj, 

I think you can achieve this by adding an expiration date field in the model. So for example, the respective video will be available to view only if the today's date is between the  expiration date. ( Today's date < expiration date) 

And once today's date is exceeding 1 year period ( today date >= expiration date) , you can show a small modal/pop-up saying "hey! The subscription is over. Please buy the subscription to enjoy the content". 

Hope this helps and solves the query. 



Thanks and Regards,
Abhishek Choudhury
Ph. no: +91 7903717967

On Mon, 19 Jul, 2021, 7:14 AM pankaj palmate, <pankajpal...@gmail.com> wrote:
Hello please help me in this, I want to provide my video content to users  and my objects are stored in AWS s3 buckets.I want user to view video for 1 year of validity but restrict to download the video...also he will have acess through my website only(i.e. he should not use s3 object url to access the file and download using Chrome)
Thanks in advance

--

pankaj palmate

unread,
Jul 19, 2021, 1:13:47 AM7/19/21
to django...@googlegroups.com
Hii ,Thank you for your response...but what hotstar does because i think their videos are not possible to download and if not how can we make it hard to download ?any referell link?

pankaj palmate

unread,
Jul 19, 2021, 1:16:03 AM7/19/21
to django...@googlegroups.com
Hi Abhishek thanks for the response but we cannot avoid users from download using it 

Abhishek Choudhury

unread,
Jul 19, 2021, 1:41:11 AM7/19/21
to django...@googlegroups.com
Hi Pankaj, 

You can have it on a signed URL so that the video is only available/ viewable on the respective domain with authentication token. You can find the implementation in boto3 documentation. 

Thanks and regards,
Abhishek Choudhury

--
Thanks and regards,
Abhishek Choudhury
Mobile: +91 7903717967

Abhishek Choudhury

unread,
Jul 19, 2021, 1:44:01 AM7/19/21
to django...@googlegroups.com
Hi Pankaj,

Please go thorough the below link, I think this is what you’re looking for. 

Thanks and regards,
Abhishek Choudhury

Kasper Laudrup

unread,
Jul 19, 2021, 5:00:46 AM7/19/21
to django...@googlegroups.com
On 19/07/2021 07.14, pankaj palmate wrote:
> Hi Abhishek thanks for the response but we cannot avoid users from
> download using it 
>

Of course you can't stop users from downloading data with a field in a
database. At least not if you want them to be able to access it in the
first place.

As Benjamin already correctly told you, just forget about it. You cannot
make bits uncopyable, no matter how much time, money and resources you
spent on trying.

You can make links expire and only be available to users with the
correct credentials. Just do that instead.

Kind regards,

Kasper Laudrup

OpenPGP_signature

Benjamin Schollnick

unread,
Jul 19, 2021, 7:46:47 AM7/19/21
to django...@googlegroups.com
They are presumably streaming the video, which means that they are using a proprietary video player, as well as requiring a registration/subscription.

So you can in theory, license a video player which supports some sort of encryption/login/subscription support, but if the video can be played, it can be downloaded. 
But that’s not a Django issue, that’s really more of a web server/web client issue.  

Take a look at JWPlayer, or some of the video players here - https://medium.com/@johnksmithme/top-10-best-html5-video-players-in-2019-4d5434de50a1

- Benjamin



Abhishek Choudhury

unread,
Jul 19, 2021, 10:34:07 AM7/19/21
to django...@googlegroups.com
Hey 👋🏻 Good evening , 

I really liked the way you guys explained the issue. I found it very helpful, and interesting. 

Thanks 😀

Regards,
Abhishek Choudhury 

Hello Singh

unread,
Jul 22, 2021, 4:00:55 AM7/22/21
to django...@googlegroups.com
Only for practice, I want to built a video downloader web app, from a specific website.
Problem
       first I have to download the video and then send to the user, it time consuming I want to directly download at the user side, is it possible in Django.

Thanks developers

Benjamin Schollnick

unread,
Jul 22, 2021, 7:51:32 AM7/22/21
to django...@googlegroups.com
> Only for practice, I want to built a video downloader web app, from a specific website.
> Problem
> first I have to download the video and then send to the user, it time consuming I want to directly download at the user side, is it possible in Django.

Is this possible, yes. Take a look at youtube-dl, and other applications along that line.

Is it possible using Django, Not as you describe.

Django is a framework (tool set/tool chest) that simplifies and assists in the creation of web sites, and more so of database driven web sites.

Unless you are going to be having your users hosting web sites, Django isn’t going to be immediately helpful.

Now, you doing something Python driven, as I explained above, would be conceivable.

- Benjamin



Reply all
Reply to author
Forward
0 new messages