how to watermark and convert video to flv with FFMPEG? - ffmpeg

how can i watermark and convert a video to flv format with ffmpeg ?

Here's the fourth hit on a 'ffmpeg watermark' search: Add a Watermark to a Video with ffmpeg.
ffmpeg -sameq -i video1.mp4 -vhook '/usr/lib64/vhook/watermark.so' \
-f img.jpg video2.mp4
Here's the fourth hit on a 'ffmpeg convert flv' search: Convert to FLV (flash video) with ffmpeg (edit: looks like Konamiman beat me to it).
ffmpeg -i someVideo.avi -f flv -b 200000 someVideo.flv

For converting to flv, see here: http://parallaxed.net/article/convert-to-flv-flash-video-with-ffmpeg
And for watermarking, see for example here: http://linux.goeszen.com/watermark-video-with-ffmpeg.html

Related

How do I generate a color screen for the duration of an MP3 in ffmpeg?

I have successfully generated a blue screen to add to an mp3. But, I have always needed to include the length of the clip to match the mp3. When I don't include a timecode it continues to generate footage until I cancel the command.
ffmpeg -f lavfi -i color=blue:s=1920x1080 -i input.mp3 -t 00:02:08 output.mp4
How do I specify that I only want color generated during the length of the mp3 that I am adding?
ffmpeg -i <.jpg> -i <.mp3>
This worked too but I don't want to rely on a jpeg file.
Use -shortest:
ffmpeg -f lavfi -i color=blue:s=1920x1080 -i input.mp3 -shortest output.mp4

Fastest way to generate video thumbnail of particulate size by FFMPEG

I am trying to generate the video thumbnail using ffmpeg but its taking even longer time to generate thumbnails than video encoding.
ffmpeg -itsoffset -4 -i test.mp4 -vcodec mjpeg -vframes 1 -an -f rawvideo -s 350x200 small_thumnail.png
is there a fastest way to generate thumbnails ?
You're specifying codec as motion JPEG to a raw format with the extension PNG. Those are all mismatches. Try this instead:
ffmpeg -ss 4 -i test.mp4 -vframes 1 -s 350x200 small_thumnail.png

How to stream webcam video using ffmpeg?

I am very new to ffmpeg and just read some examples on how to open a video file and decode its stream.
But is it possible to open a webcam's stream, something like:
http://192.168.1.173:80/live/0/mjpeg.jpg?x.mjpeg
Is there any examples/tutorials on this?
I need to use ffmpeg as decoder to decode the stream in my own Qt based program.
Nyaruko,
First check if your webcam is supported... Do
ffmpeg -y -f vfwcap -i list
Next ,
ffmpeg -y -f vfwcap -r 25 -i 0 out.mp4 for encoding
This site has helpful info;
http://www.area536.com/projects/streaming-video/
Best of Luck.
This works for live video streaming:
ffplay -f dshow -video_size 1280x720 -i video0
The other option using ffmpeg is:
ffmpeg -f dshow -video_size 1280x720 -i video0 -f sdl2 -
Above both the solution are provided by FFMPED

convert yuv to avi using gstreamer

I want to convert an avi file to an yuv file. I tried using
ffmpeg -i <input.avi> <output.yuv>
but not getting converted. can anybody suggest me conversion using gstreamer?
This is how you solve it using ffmpeg
ffmpeg -i in.avi -vcodec rawvideo -pix_fmt yuv420p -o out.yuv
Converts any input to 420 planar yuv.

ffmpeg -is it possible to increase a clip duration?

I currently have a jpeg file which I converted to an flv using the following command:
ffmpeg -r 10 -b 180000 -i test.jpg test.mp4
Now, I want to increase the duration of this .mp4 clip, so the picture stays on the screen for more than a split second. Eventually, I hope to merge a stream of these files to create a slide show out of jpeg files.
Does anyone know how to increase the duration of a clip in ffmpeg?
Looping the input and setting a duration should achieve the effect you want:
ffmpeg -loop_input -i test.jpg -t 10 test.mp4
Doing something like this should work (at least for a single image):
ffmpeg -loop_input -i picture.jpg -r 1 -vcodec flv -b 192k -i Music.mp3 -acodec copy -shortest output.flv
I bet you could get it working with multiple images by adding more inputs though I haven't tested.
(http://forum.videohelp.com/threads/280695-FFMPEG-Loop-input-video)

Resources