What I'm trying to do is get the exact look of the videos on the youtube homepage (image: click here) including the time-stamp.
If you look in the source code, you'll find a link to the image of the video, however, I can't quite figure out how to get the time-stamp of the video and format it exactly how youtube has it simply from a youtube link (in this case: http://www.youtube.com/watch?v=IpBNr-oNT1g). I take it this would be done with PHP, but how?
Thanks!
http://itwigle.com/twig/Capturing_video_thumbnails_with_PHP
is this what you're looking for?
Related
I've been searching for this a lot but have not found exactly what I'm looking for.
So, I have a page (index.php) which displays my YouTube channel's uploaded videos as thumbnails, and either displays them inline above the thumbnails, or as links that redirect to Youtube. What I'd like to do, is to get the video's ID (which is in the a href link) and post it to another page (video.php) that shows the full embedded video (of the ID in question), with title & description. Is this possible to do?
My site is loosely based on this: http://www.yvoschaap.com/youtube.html and I've tried Youmax, but like said, they only play videos inline. I want to pass the ID of a clicked video as a parameter to the video.php page.
Sorry if this is confusing, but I'm still quite new to programming :)
You can look into Youtube Data API.
The main link you will need to retreive a list of all Videos for a channel will be somewhat like:
https://www.googleapis.com/youtube/v3/search?key={your_key_here}&channelId={channel_id_here}&part=snippet,id&order=date&maxResults={number_of_videos_you_want}
It will recieve it's response in JSON Format containing information like your Video ID which you can pass as Parameter to your video.php page
In a project, I have to upload a video to a channel in youtube.com. After that, I have to store that uploaded video's link to my database(or somewhere else).
I got some Code Samples in YouTube Data API and I find this post a little helpful :
How to embed YouTube videos in PHP?
But none of these have the actual solution. I found that I could save the 11 character code from the video and save that, but all of that manually. I am looking for an automation system, where that 11 character will be automatically stored to my database. I'll have an embedded video player in another page, where this video will be played.
In this possible ? I am asking for PHP code, I just need a way.
Please help me.
Thanks
I am looking to generate a high definition screenshot of youtube video at a specific time. Say I have the Youtube video ID (ctiJc4yEVow) and I want a screenshot of what appears at 1:32. Is there a clean and easy to implement way to do that? I have read way of using ffmpeg and some misc sloppy code, but nothing reliable.
The only thing I have seen is how to generate an image for a video, unspecific to any time.
https://i1.ytimg.com/vi//default.jpg
My issue is I need a specific time. Please help!
I don't see any way to do this within the official API. Their Videos:list and Thumbnails
pages don't offer any way to do this.
That said, you could link to the time you want, then screenshot that. This would work best with YouTube's autoplay turned off. Example link based on your post: youtube.com/watch?v=ctiJc4yEVow&t=1m32s
Using the Zend_Gdata php library, is it possible to edit an existing youtube video entry to have a new source video? The use-case is I'm ebedding a timelapse recording of construction work, and I'd like to update the video each evening without changing the embed link each time.
If this is not possible, is there another way I can achieve this without requiring the embed code to be changed each day?
You can use a playlist, and update the playlist elements all days without changing the embed code. You can use the YouTube Data API to change the playlist elements:
https://developers.google.com/youtube/v3/docs/playlistItems
I was wondering what kind of method I could use to directly embed videos or pictures contained in twitter tweets directly ... For example .. below is a tweet from OBAMA
President Obama: "Right now, we have a real chance to reduce gun violence in America." http://t.co/tmCoUsPyyB #TimeToAct
The link that starts with htttp:// could be a picture .. How can I actually program it so that tweets are directly displayed with the images from the urls ? I know PHP and I used the twitter API before , but I dont know how I could easily achieve that . Any help would be appreciated
The first step would to to pull the URLs of of the block of text, there is another question that points you how to solve this: Extract URLs from text in PHP
You can then use Embedly or a service like it to pull the metadata associated with that url. Here is an example of the meta data that Embedly will return: http://embed.ly/docs/explore/oembed?url=http%3A%2F%2Ft.co%2FtmCoUsPyyB
The html attribute is what you want to render on your page.
We also have a PHP library you can use as well.
Hope that helps!