How to add text to video frame/s using ffmpeg? - image

What I need is that I am looking for command that helps me add a text on video for few frames. For example, there is door with a empty name plate in a scene. I should be able to write name to it and it should move as the door moves. after door disappears, so should the text. Can I do it using ffmpeg or any other tool in linux. TIA

What you want to do is something called "Motion Tracking" and I don't think ffmpeg can do it with command line options.
Henry Kroll has some work using ffmpeg, gstreamer, python and some other methods. Start from here and here.
You may also want to check ARToolkit

Related

How to add a Poster Frame to an MP4 video by timecode?

The mvhd atom or box of the original Quicktime MOV format supports a poster time variable for a timecode to use as a poster frame that can be used in preview scenarios as a thumbnail image or cover picture. As far as I can tell, the ISOBMFF-based MP4 format (.m4v) has inherited this feature, but I cannot find a way to set it using FFmpeg or MP4box or similar cross-platform CLI software. Edit: Actually, neither ISOBMFF nor MP4 imports this feature from MOV. Is there any other way to achieve this, e.g. using something like HEIFʼs derived images with a thmb (see Amendment 2) role?
The original Apple Quicktime (Pro) editor did have a menu option for doing just that. (Apple Compressor and Photos could do it, too).
To be clear, I do not want to attach a separate image file, which could possibly be a screenshot grabbed from a movie still, as a separate track to the multimedia container. I know how to do that:
Stackoverflow #54717175
Superuser #597945
I also know that some people used to copy the designated poster frame from its original position to the very first frame, but many automatically generated previews use a later time index, e.g. from 10 seconds, 30 seconds, 10% or 50% into the video stream.

Script to make movie from images

Hello I want a script or a way to make a video from images. I have a folder with a lot of pictures named randomly like "flowers.jpg", "tree.jpg", etc.
I also have an "intro.jpg" photo which I want to add at the start of every video.
What I want exactly is to create a video (any format, .avi etc) for a custom duration with only two photos like this:
intro.jpg (10-20 seconds or how much i want) + tree.jpg (1 hour or how much i want)
intro.jpg + flowers.jpg
...
and so on.
Sorry for being a newbie, but I have no clue how to accomplish this.
The easiest way might be to use a free online creation tool. You can just upload you photos and specify the duration. You can also add audio and transitions.
My daughter uses Animoto
https://animoto.com/
or you could try this.
https://www.wevideo.com/
If you just want to make the video locally it is easy in Adobe Premiere, iMovie, Sony Vegas or any number of easy to use programs with free version or free trials.
By script do you mean code and if so under what environment? You can use FFMpeg which is open source and command line and execute from code.
FFmpeg create video from images
If you want guidance in building the FFMpeg script or just want to use ffmpeg locally try a GUI for ffmpeg such as
http://www.free-codecs.com/download/ffmpegGUI.htm

Add text to a video with effects using FFMPEG

I need to add text in between a video. I have seen drawtext and seems it wont give effects to the text to be displayed.
My intention is to show a text within a box with some background to that box which should fly from left to right in between a video at a particular time. Is it possible with FFMPEG? I have tried different options with drawtext and nothing seems to be working. Any ideas on how to make it?
or is it possible to achieve by combining imagemagick and FFMPEG command?

convert swf to video in Flash Pro CS5.5

I have searched the web and here for answers but so far, the links are dead, the how-tos no longer work for the version I have, or there are no answers.
I have a swf animation with full sound and scripting that I'd like to convert into a video or an flv. For some reason, the site I post on screws with my timeline somehow (the timing is off, sounds no longer match up properly with the text) so I thought a video would work better.
I tried using File>Export>Export to movie to resolve this. I tried to export to an AVI. When it's scaled down to 300x400 it works just fine (though it looks like total crap). However when I export at the full size, using full colors no compression, I get this.
I'm not sure what to do with it. It's slanted with lines through it and grayscale. VLC player is the only thing that will run it too. WMP dies with errors, saying it's an invalid or corrupt format. Funny thing is, the thumbnail for the video is exactly what it should look like.
I'm not sure what to do with it. Converting it to an .flv is just fine. I have a video converter for that. I just can't get it to convert to flv or even a movie type properly.
Why is it doing this to my video? Is there something better to use to convert? Is there a good one that won't plaster a giant watermark over it?
image being totally screwed up.
Flabaco is an online SWF to video converter. To answer your questions: It's free, doesn't impose banners or watermarks.
I have a swf animation with full sound and scripting that I'd like to
convert into a video or an flv.
Flabaco converts scripted content. It preserves the frame rate (fps) & color. It's capable of generating professional quality HD content.
It doesn't convert sound. Nonetheless the converted quality is good and you might be able to get by using another video tool to add sound to the converted video.
You can use the online converter app here: www.Flash-Banner-Converter.com
PS: There are some older posts on StackOverflow related to your question. Just search SWF to video / Flabaco.
Kayo,
FLABACO (FLAshBAnnerCOnverter)

Is there an easy way to automate the taking of screenshots?

In what language can I write a quick program to take screenshots and also possibly emulate a keypress?
I have an animated/interactive flash movie that is a presentation. I want to take a screenshot after I press a particular key.
The end effect is a bunch of screenshots that I can print...basically captures the key moments in the flash presentation.
I've written this in C# without much hassle. Here's the bulk of the code:
using (Bitmap bitmap = new Bitmap(bitmapSize.Width, bitmapSize.Height, PixelFormat.Format24bppRgb))
using (Graphics graphics = Graphics.FromImage(bitmap))
{
graphics.CopyFromScreen(
new Point(0, 0),
new Point(0, 0),
bitmapSize);
bitmap.Save(filename, ImageFormat.Png);
}
I would recommend writing an app that hosts a browser control. Then you could have the browser control show the SWF and your app would know the exact coordinates of the part of the screen you need to capture. That way you can avoid having to capture a whole screen or whole window that you may have to crop later.
i am sure there are ways, but here's my idea. you can convert your movie frames to pictures using tools like ffmpeg . From the man page of ffmpeg
ffmpeg -i foo.avi -r 1 -s WxH -f image2 foo-%03d.jpeg
This will extract one video frame per second from the video and will output them in files named foo-001.jpeg, foo-002.jpeg, etc.
Images will be rescaled to fit the new WxH values.
If you want to extract just a limited number of frames, you can use the above command in combination with the -vframes or -t option,
or in combination with -ss to start extracting from a certain point in time.
The number in the file name "simulates" the key press, so if you extracted for 1 sec per frame, and you want to "press" the key at 30sec, use the file name with foo-030.jpeg
There's a free tool that I found about recently that does the screen capture part, It's apparently written in java.
http://screenr.com/

Resources