Youtube video download php

You could check for a 403 HTTP response header and have the script output your custom message if you are getting an “ugly” default 403 message

If you are having problems about where to put the conditional we would need to see some code.

Downloading youtube videos is not as easy as grabbing a link and fetching the data. This may have been so easy in the past and might be now for some of the videos but the situation is much more complex. Very often youtube doesn’t serve videos in a single stream or file but does so in chunks and sometimes the audio channel is served separately from the video channel. There are also different formats for different videos. There is much complexity invisible to the user.

Have a look at Firefox downloaders like Complete YouTube Saver, their source code is available for inspection. The downloaders might be using external libraries like ffmpeg to mux video and auto into a single file or do other operations. Also, YouTube has been known to change a lot in the ways they serve their videos, that’s why the downloaders have had to be updated regularly to keep up with the changes. You might be able to easily download some of the videos but having a solution working for all of them is a much more complex task that needs ongoing maintenance.

no show only blank page
you can check here is site <snip>

maybe you’ll get more information if you make research for downloading html5 videos from youtube (in any programming language), that’s how the browser would do it.

[copyright laws differ per country, so downloading may still be legal where OP is]

So how i will fix it Can you tell me

Downloading is against the ToS of the site.

Such Content may not be downloaded, copied, reproduced, distributed,
transmitted, broadcast, displayed, sold, licensed, or otherwise
exploited for any other purpose whatsoever without the prior written
consent of YouTube or, where applicable, YouTube’s licensors.

Is any ways to download this videos please if i will try to download this video by my server it will download or not

As @WebMachine has already stated we will NOT assist you to do something that is illegal.

Ok thanks for that info so can you tell me where i will try to find this

You’ve been given all the pointers you need in this thread. Now you must do your own research.

I clicked on one using Vivaldi and didn’t get a blank page.

The screen capture shows

  • a search widget
  • rendered JSON string
  • embedded video (that does play)
  • a table with broken links
  • an ironic copyright for content that isn’t yours to copyright

You did get a Retail License Certificate I hope.

I don’t know how much Rs. 2,00,000/-. is (or a Lakh either), but I do know how long 3 years imprisonment is.
http://retaillicence.tseries.com

Consequences of dealing with Copyright content without Retail License Certificate.
Retailer selling content without proper Retail License Certificate is punishable under Copyright Act., 1957.
Punishment upto 03 years imprisonment and/or fine upto Rs. 2,00,000/-.

1 Like

its api provide by YouTube

AFAIK the YouTube API is more for playing videos on other sites.
Which your site looks to be doing OK already now.

The problem you are having is with a download feature for T series videos.

Since the T series license is not free I’m a bit surprised that they would not provide some sort of support - be it forum, wiki, tickets etc. - to help you with what is needed to put a download feature into your website.

Do they not offer any support at all?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.