问题
What I am trying to do is, placing a small static image on inside a video clip at server side, by making use of PHP.
For example, in TV news, you might see the culprit's photo at a corner when the anchor describes about a crime incident.
I've tried doing some research. And found the ffmpeg-php extension for PHP. When going through the docs, I couldn't find any ready made methods or classes that would insert a picture at a particular position if we pass the x and y positions like in GD.
But there is a ffmpeg_frame object available and I think it could be used to fetch frames one by one as an image. And we would do the insertion of our required image inside this using the GD functions. After insertion of the image in all the frames, we would generate the video using these frames. That's my idea. But that extension's docs doesn't reveal anything about creating the video from frames. Only talks about creating animate GIFs !
Would it be a big load for PHP by using the above way of inserting image in each frame and then generating the video from it(if it is possible) ?
Or are there any better ways available to do this insertion process. I mean any other better extensions or video libraries available ?
The aim is to insert an image in a video, which would be at a particular position through out the video.
Thanks in advance.
来源:https://stackoverflow.com/questions/13313139/inserting-an-image-inside-a-video-at-particular-position-via-php-and-a-video-ext