Looking to insert a clickable image in a video with php - php

Hi I am looking to insert a clickable image in a video. to make a video interactive.
Basically I have a form with 3 fields upload-video, upload-photo and a URL. What I am looking for is that when the user uploads these 3 fields the image will become the part of the uploaded video and upon clicking that image it will open a URL that was added in the form.
after that I have to provide the embed code of that interactive video to users.
Is there any way to achieve that functionality with php? I have looked into ffmpeg but I am not sure that it will do exactly what I need.

Related

Facebook like video uploader generate thumbnails before publish

Is there a jQuery plugin that could generate video preview thumbnails even before user uploads it? I notice that Facebook could do so but do not know any plugin that has the same functionality.
Try uploading a video on facebook, notice that even before you publish it or the progress bar is still in progress, preview images of the video are available already.
I tried searching the net and most answers pertain to installing ffmpeg having this as a reference.
I haven't tried it yet but looking into it, it seems that the video should be uploaded first before it could generate a thumbnail. But I what I want is a preview of the thumbnail to be generate BEFORE the video is uploaded (similar to facebook).
This is so that I have the transaction to select a video and generate a preview thumbnail at the same time even before the video is published on the server. Once I hit the "publish" button, it will upload the video to the server, upload/save generated preview thumbnail, save info to database at the same time.
I don't think you have to download a video and make its thumbnail. You can make a request via Facebook API to get it. You just have to precise that you want the attribute "picture" in the result; this attribute contains the path of the thumbnail of the video. You will find more explanation by following this link: https://developers.facebook.com/docs/graph-api/reference/v2.1/video/

How to display image preview without downloading from given url using PHP?

So I'm working on a project to fetch images from fashion websites. Now I'm implementing the add item function in the website. In this function, user needs to input website url first, then the web scraper will scrape the target images' url and pass the urls to the curl to download the image. Finally the add item popup window will preview the images I fetched in the previous step and ask the user to fill out some basic information for the items. Everything works fine except that the curl will take a very long time to download the images (cuz the images from those fashion website are often very high-quality). So I'm wondering is there a way I can create a preview without actually downloading the full-size images and do the download when the user fill out basic information later. Thanks!
If the fashion website has smaller versions of the images, you should download those first. You can use them for your preview.
If the fashion website only has the full size image, there is no way to download a smaller version of it.
You probably know what your doing, but remember that you should respect the copyright of images on websites, especially art websites such as fashion websites. Be careful with what you do with them.

Enableing the url field in picture uploads

In WordPress, if you upload a Picture in your Media-Library there is a URL field that is grey. I need an option to make it accessable. I want to embed a always changing picture from a third party website in the Team area to keep the pictures up to date without uploading them by myself every day.
Is there a solution, such as a easy way to search for the URL with phpmyadmin or something and change it there?

How do I show a link once a file is uploaded

I had trouble finding an answer for this problem. I would like to display a link to a page that has a video file on it but I don't want the link to appear until after the video file is uploaded.
It's a site where users upload videos so I don't want to have to manually put the links there for them after they upload their videos, nor do I want to make the links ahead of time since users will click them and there will be no video available.
So, is there a way to keep a link hidden until a file is uploaded. Once the file is uploaded the php page where the link will be on checks to see if it exists and then if it does the link is shown, otherwise the link stays hidden.
Each time the form that the client uses to upload a file is sent store the information of the file in a database.
Each time the client request the list of videos, query the database and build the web page based on the results.
Make sure to associate the uploaded files to the users, so you don't mix the up. Are you managing authentication already?
If you want to have the links appear as soon as the upload is finished without reloading the page, then you need ajax.

Facebook and image post

I want to post into community wall post with attached image. If I use simple api call to /page/feed with picture arguments it inserts a small image. But I want to attach big image, for example, from gallery. When I upload photo to gallery it automatically posts to wall. But when I post >= 3 photos all that posts are merged into single one with all inserted images.
The question is how to get different post for each uploaded image? Or maybe I can attach to /page/feed api not picture only, but image which would be uploaded into album?
Thanks
When you say "attach big image", I assume you are POSTing to /PAGE_ID/photos, right?
If you upload 3 or more images, yes, they will be collapsed when they are displayed in the page's feed. This is a "feature" of feed that organizes and collapses images that were uploaded together.
Imagine if you uploaded 20 photos to the page and they weren't collapsed; the feed would be dominated by the photos and it would be hard to see any other content (like content that was published slightly before the uploaded photos).
If you can provide a screenshot of what you are seeing, I can confirm this.
And yes /PAGE_ID/feed with picture is a thumbnail for a post. Example: a thumbnail to accompany a post containing a paragraph of text (or a link).
https://developers.facebook.com/docs/reference/api/page/

Categories