Skip to main content

Thread: Tutorial: Inject a logo into video with ffmpeg


greetings:

while back, inquired "made ubuntu (studio) logo video/website/misc use. inspired ubiquitous , apple logo. time, i've wanted incorporate little ubuntu studio love modest multimedia productions. finally, i've figured out 1 method. ymmv.

first, find or create logo. went http://design.canonical.com/the-toolkit/ , downloaded ubuntu studio materials. selected logo wanted, resized , reduced brightness in gimp. http://dl.dropbox.com/u/7001421/ubun...dio%20logo.png



went command line...

see http://ffmpeg.org/libavfilter.html#overlay

24.25 overlay

overlay 1 video [i.e. logo] on top of another.

takes 2 inputs , 1 output, first input "main" video on second input overlayed.

accepts parameters: x:y[:options]

x x coordinate of overlayed video on main video, y y coordinate. x , y expressions containing following parameters:

‘main_w, main_h’

main input width , height
‘w, h’

same main_w , main_h
‘overlay_w, overlay_h’

overlay input width , height
‘w, h’

same overlay_w , overlay_h

options optional list of key=value pairs, separated ":".

description of accepted options follows.

‘rgb’

if set 1, force filter accept inputs in rgb color space. default value 0.

aware frames taken each input video in timestamp order, hence, if initial timestamps differ, a idea pass 2 inputs through setpts=pts-startpts filter have them begin in same 0 timestamp, example movie filter.

follow examples:


# draw overlay @ 10 pixels bottom right
# corner of main video.
overlay=main_w-overlay_w-10:main_h-overlay_h-10

[for example]
ffmpeg -i forerunnercrawl.mp4 -vf "movie=video-logo.png[logo];[in][logo]overlay=main_w-overlay_w-10:main_h-overlay_h-10[out]" -vcodec libx264 logocrawl.mp4

# insert transparent png logo in bottom left corner of input
movie=logo.png [logo];
[in][logo] overlay=10:main_h-overlay_h-10 [out]

[for example]
ffmpeg -i forerunnercrawl.mp4 -vf "movie=video-logo.png[logo];[in][logo]overlay=10:main_h-overlay_h-10[out]" -vcodec libx264 logocrawl.mp4

# insert 2 different transparent png logos (second logo on bottom
# right corner):
movie=logo1.png [logo1];
movie=logo2.png [logo2];
[in][logo1] overlay=10:h-h-10 [in+logo1];
[in+logo1][logo2] overlay=w-w-10:h-h-10 [out]

[for example]
ffmpeg -i clean_crawl.mp4 -vf "movie=studio-logo.png[logo1];movie=video-logo.png[logo2];[in][logo1] overlay=10:h-h-10 [in+logo1];[in+logo1][logo2] overlay=w-w-10:h-h-10 [out]" logo_crawl.mp4

placed ubuntu studio logo on bottom left , brandmark on bottom right. check out: http://dl.dropbox.com/u/7001421/koku...sode%20007.mp4

we have "tutorials , tips" section. please read sticky there.


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support Multimedia Software Tutorial: Inject a logo into video with ffmpeg


Ubuntu

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account