Michael Rampe
Forum Replies Created
-
Michael Rampe
September 4, 2011 at 9:35 pm in reply to: How to add a watermark on server side through ffmpeg and Libavfilter?[Sajjad Raja] “anybody can help me out to add watermark on server side through ffmpeg”
Try adding this to your command line. (with overlay.png as your watermark image with alpha)
-vf “movie=overlay.png[watermark];[in][watermark]overlay=0:0:1[out]”
overlay=0:0:1 represents the [x-position:y-position:alpha]
Careful not to overlay outside of source size as it will fail.
Michael
-
Check this for a list of compatible keys:
https://wiki.multimedia.cx/index.php?title=FFmpeg_Metadata
Michael
-
Michael Rampe
September 1, 2011 at 12:44 am in reply to: How to Extract frames from a vide, process them and then reinsert them in their respective places[Yogi Yang] “But then how should I handle Audio of that particular Video?
Can you please guide me as I am new to FFMPEG?”
sure.
NOTE: “tilt_shift_4.mp4” has audio and video, is 1920×1080 and is 25 fps.
To split the original to jpg files:
$ ffmpeg -i tilt_shift_4.mp4 -vcodec mjpeg -sameq -f image2 temp-%03d.jpg
Then edit the selected files you wish to change in Photoshop or your favourite image editing app. Save the file[s] (making sure the name does not change.
To put them back together with the source audio and compress (using recent FFmpeg and libx264 in this example):
$ ffmpeg -f image2 -i temp-%03d.jpg -i tilt_shift_4.mp4 -acodec copy -vcodec libx264 -b 2000k -preset medium -r 25 combined.mp4
Let me know if this works for you….
Michael
-
Michael Rampe
August 27, 2011 at 12:35 am in reply to: Batch merge 50 audio tracks with corresponding video tracks using FFmpeg.[Freddie Hill] “Is there any way to batch merge 50 audio tracks with corresponding video tracks without re-encoding, using FFmpeg?”
yep. Write a shell script with a ‘while’ or ‘for’ loop to run through them all.
Use -acodec copy -vcodec copy to not recompress.
Michael
-
not sure based on the info posted but certainly looks like a problem with your convert command not having an input… Is this part of a shell script?
Michael
-
not sure….
can you run an input read on both and post the results?
$ ffmpeg -i yourfile.flv
Michael
-
Michael Rampe
August 27, 2011 at 12:31 am in reply to: How to Extract frames from a vide, process them and then reinsert them in their respective places[Yogi Yang] “I have a need for extracting a few frames from a given video file as JPEG files. Then process these files in Photoshop and after processing them I want to reinsert them into the same video file they were extracted from at their respective location.”
Best option would be to dump the whole media file as an image sequence, process the frames you want without changing the size or filename and then convert the whole lot back to a new media file.
There really is not an option to insert images otherwise.
Michael
-
[steve hearn] ” That is I tried -b 1024,2048,4096 etc etc and I always get approximately the same output size/quality.”
The -b option is specified in bits.
Try 1024k, 2048k etc. instead. (1M and 2M also work as do 1024000, 2048000)
Michael
-
[Laurent Nguyen] “However, I would like to specify the starting frame not by time but by frame number.”
This function only accepts time as an input. It does however accept a decimal:
`-ss position’
Seek to given time position in seconds. hh:mm:ss[.xxx] syntax is also supported.So…. If you know your frame rate, you can calculate the right time to start.
Frame 167 in a 25 fps stream = 167/25 = 6.68 seconds.
Thus your command would be:
-ss 00:00:06.68
Michael
-
[Stan Juznitok] “Is there a way to control the adaptive quantization from the FFMEPG itself?”
Yes. Quite recently, there is the added option to control x264 settings direct from FFmpeg.
Your example would require:
“-x264opts aq-strength=1”
….as an extra command line option.Example:
$ ffmpeg -i tilt_shift_3.mov -vcodec libx264 -preset slow -x264opts aq-strength=1 -crf 6 tilt_shift_3h.mp4If this does not work for you, upgrade your FFmpeg install.
Hope this helps.Michael