How to fetch video stream url using youtube api in php?

by 2 replies
3
I can search for videos by keyword and can fetch videos list from youtube using its api in php. I can fetch video title, description, thumbnail etc. but how can i fetch video url not like this -> youtube.com/watch?id=xyz...

Example: ytpak.com
#programming #api #fetch #php #stream #url #video #youtube
  • I am not familiar enough with php, on how you would go about doing that. However there is an open source python library that can find the stream url and actually download it. You might have some luck looking at the code and seeing what it's doing and how it works.

    youtube-dl
  • Which api you are using? If you use this one http://gdata.youtube.com/feeds/api/videos?author={$channel['channel_key']}&alt=json&start-index={$start}&max-results={$limit}&orderby=published&v=2 you can see the stream url, but keep in mind that the stream video url, you can't download. If you want to download you need PHP lib like this https://github.com/jeckman/YouTube-Downloader

Next Topics on Trending Feed