Django best way to stream video to your frontend (php or react.js) - django

I want to make a website for watching videos like vimeo or youtube but i have no idea how to watch/stream the videos on the frontend from my django backend.
So i have the videos in my database how will someone watch them from his browser

I think the best way to achieve that is put your videos on separate server (special for videos) and store links for those videos in your django application
after that you can send video link to your frontend and manage it

Related

Where to handle PDF creation in a Django React site

I have a site that uses Django REST framework for the backend, react for the frontend, and axios to handle requests between them.
I want my site to be able to create PDFs for the users. I looked on the web and found that I can create PDFs through both Django and React. I am wondering which one I should use to handle the PDF creation.
It is preferable to handle pdf creation on server side, As for server side you know that system you are using on the server is a powerful system as of you don't know what system your clients will be using also if there is any mobile app develops through that api pdf generated from server side will be compatible else you need to generate pdf for mobile app.
In django you can use xhtmltopdf, wkhtmltopdf to generate pdfs from an html template.

How I can get intagram photo url with youtube-dl lib?

I want to create my first RoR application for downloading video/photo (like this one)content from popular websites. I found youtube-dl.rb gem and configured downloading videos from instagram, but I can't get images from photo and gallery Instagram posts. I should to use API directly or another gem. Can I do this only with youtube-dl library?
You have to use Instagram API directly. youtube-dl library only for videos and metadata for videos.

How to set a separate proxy for Wagtail to fetch YouTube embed video?

I tried to add a YouTube video in article content, but it alway failed to upload the video link because YouTube is blocked in my country. So I built a HTTP proxy to watch YouTube, how could I tell the wagtail application to use my HTTP proxy while fetching YouTube embed metadata?
As far as I understand, your server and your users are behind a firewall that blocks access to YouTube. So there is two problems to solve:
Your Wagtail app should be able to access https://www.youtube.com/oembed to fetch metadata and iframe code to embed (see the example response).
Your users should be able to access youtube servers to watch videos.
To solve the first problem you can use a custom embed finder. You can find some information on how to add a custom embed finder the Wagtail's documentation.
Your embed finder should recognise youtube urls and send requests to fetch meta info through the proxy.
The second problem should be solved on the client's side (the client's browser should use proxy) or you should transparently proxy traffic youtube <-> your users somehow. It's not really Wagtail related issue, so I'll leave it with you.

Django 3rd party image uploading service from browser

HiI want users to be able to upload their own photos from the browser, but I read that it isn't safe to let them upload files to your server without many protections. I need a image hosting website that has an easy API for uploading photos (for free).
The only one I have found is Cloudinary, which is awesome, but following their tutorial didn't work. I guess the reason is it's outdated, and I'm using Django 1.10...
If there is a way of doing so, even without a special API, (by sending requests to some image hosting site) I would like to give it a try as well.
Thanks in advance!
If you are creating a non-commercial application, you might want to check out Imgur. Their API is free for open-source applications and non-commercial applications.
A note from their official API page: Each application can allow approximately 1,250 uploads per day or approximately 12,500 requests per day.

Can I use a 3rd party video content portal like youtube to upload and post videos on my own web portal?

I manage a website where users post entertainment content (photos, text). It's developed in Django with postgresql. I am trying to add a video feature on the website - such that everyone can upload their favorite videos on the website and share them.
Instead of building out video streaming infrastructure myself, can I use an existing video service as a viable backend? For instance, using Youtube's API to send all uploaded videos to its servers, and then embed a youtube player in my website that users can utilize to view uploaded videos? Youtube actually imposes a quota, that computes to about 400 video uploads, 1500 write operations, and 50,000 read operations. My website's scale is already beyond this. Are there any other services I can use? Sorry if this is a newbie question, I actually don't have any experience in this domain. If you point me in the right direction, perhaps giving an illustrative example, I can start getting deeper into this.
The closest I have gotten is getting a bizspark plus subscription that is free for one and a half years. After that one can use Azure media services to get the job done.