Тёмный

FFMPEG Overlay And Drawtext: How To Easily Render Text And Images On Your Video! 

Dev Stef
Подписаться 1,6 тыс.
Просмотров 6 тыс.
50% 1

We are going to see how to apply an overlay text or image/video on top of your video using FFmpeg.
First we see how we can burn normal text using the drawtext filter. Then we apply more appealing effects, like applying a better position at the bottom or the text itself scrolling.
After that, we see how to put an image (but the same thing can be applied to a video as well) on top of the video by using the overlay filter.
For any questions or doubts, feel free to write a comment down below!
Video sample:
► www.pexels.com/video/venice-1...
Further reference:
► ffmpeg.org/ffmpeg-filters.htm...
► ffmpeg.org/ffmpeg-filters.htm...
👉👉👉 FOLLOW ME 👈👈👈
--------------------------
► Instagram: / devstefit
► TikTok: / devstefit
🎼🎵🎶 MUSIC CREDIT 🎶🎵🎼
---------------------------
► Evolution - Royalty Free Music by Benjamin Tissot
www.bensound.com/royalty-free...
📖 CHAPTERS 📖
---------------------------
00:00 Intro
00:58 First attempt with the drawtext filter
10:09 Center the text and align it to the bottom
13:23 Add a box behind the text
16:53 Timestamp overlaying
19:29 Scrolling text
23:36 Overlay a logo using the overlay filter
28:12 Overlay the logo and make it transparent
31:36 Conclusions
#devstefit #ffmpeg #overlay

Наука

Опубликовано:

 

2 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 20   
@VivekHaldar
@VivekHaldar Год назад
Your deep expertise in this domain really shines through. Thanks for sharing your knowledge in these detailed videos.
@devstefit
@devstefit Год назад
Thank you very much for your kind words! And thanks for watching!
@rifiutimodena3088
@rifiutimodena3088 11 месяцев назад
You are a very good teacher, i learned exactly what i was looking for, thank you!
@lildarker4044
@lildarker4044 9 месяцев назад
maximum e p i c, thanks for all the tips n tricks, making me look like a genius
@tazzit24
@tazzit24 2 месяца назад
Hi. Thank you for this video. On Windows 11, the path to the font should be "fontfile='C\:/Windows/Fonts/Arial.ttf" if the script is executed from another drive location. Otherwise it will not find the path. I had no success with the Calibri font because my current build of ffmpeg does not support monocromatic (1bpp) fonts. For my use case I needed to add two different text boxes, so I used the -vf option (-vf "drawtext=xxx,drawtext=yyy") where xxx and yyy are variables containing the display instructions. In your demo, I think you forgot to type a ":" before the "x" axis. It will work without but I think it is better to use the attributes separator in a consistent way. Your video helped me a lot. Grazie. Giancarlo.
@videoimagenforense
@videoimagenforense Год назад
Hola Stefan, fanático de ffmpeg gracias a ti. Un saludo
@devstefit
@devstefit Год назад
Greetings! And thanks for watching!
@fylip22b
@fylip22b 11 месяцев назад
Bonjour et merci pour cette démonstration. J'utilise FFmpeg avec PowerShell pour automatiser certains traitements sur une liste de fichiers vidéos présents dans un dossier. À bientôt. Philippe P
@juancarlosbalbuenaponce880
@juancarlosbalbuenaponce880 21 день назад
Hello, thank you for your excellent video. I would like to know if I can set the time code for advace? For example, begin the timer at 09:30:40.50? Thank you
@_gelon
@_gelon Год назад
Ey Stef, amazing content. I have a semi-related question. I would like to use drawtext in order to make a semi-transparent (with the shape of the letters) background to obtain a semi-transparent GIF or VP9. It would be the alpha layer with the text alpha-merged making the video transparent, but I obtain a solid video. I'm using: color=0xAAAAAA:s=1920x1080:d=60,drawtext=text='TEXT':x=w-tw-10:y=h-th-10[alpha],[0:v]VIDEO[v];[v][alpha]alphamerge[finalvideo] The video is still solid. I'm probably missing something, very noob on this. I hope you can give me a hand. Subscribed, love your FFMPEG videos ❤
@robinreso6240
@robinreso6240 Год назад
how can i overlay timecode 01:00:00:00 for example?
@devstefit
@devstefit Год назад
You can overlay the timecode in this format, using the 'timecode' option in this way: timecode='01\:00\:00\:00
@robinreso6240
@robinreso6240 6 месяцев назад
@@devstefit do you know how i can overlay internal video timecode automatically? I read somewhere on the the internet that ffmpeg is not capable of reading file timecodes? so this can not be done with a ffmpeg one liner? my idea was to read the file timecode with ffprobe and put to a variable en use the variable in a ffmpeg drawtext=timecode{variable from ffprobe} .maybe you have some ideas how to accomplisch this?
@geoffphillips5293
@geoffphillips5293 10 месяцев назад
Unfortunately drawtext from a text file hasn't been very well thought out by FFMPEG designers. If you want to change dynamically, sooner or later your writing of the file happens exactly when it's reading the file, and then it just stops changing the text. There's a rather horrible way round this, involving sending commands (c) and then reinit with a different text value.
@huemanzu
@huemanzu Год назад
easily?
@devstefit
@devstefit Год назад
It depends on what you intend for easily: very often I need to do the same thing like overlaying elements at the same position (like the timestamps or a logo) and this in a script is rather easy. If you want something a bit more custom, then I totally agree the process is getting complicated
@chirick86
@chirick86 Год назад
Hi, Stefan! Good video. Yesterday I stucked with animation logo. Let's say, I'm trying to move logo left-to-right over time during the video. I've tryed command 'ffmpeg -i VIDEO -loop 1 -i IMAGE -filter_complex "[0:v][1]overlay=shortest=1:x=95+t*(W-w)/624:y=180[v2]" -map [v2] -c:v h264_nvenc -b:v 16M -t 15 -y out.mp4' and it work fine, but not excelent. The motion is laggy and jitter. It's not smooth. Is it possible to fix it somehow? I render the video how it works in Davinci and Premiere. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-vYZEJTPdSGk.html Can you pls help? I searched and do not know what else to do.
@devstefit
@devstefit Год назад
Hi and thanks for watching! I see here the equation you use for the moving depends on the sizes of the foreground thing you put on top and the background video: the more (W-w) is different, the more the jitter is presented. I would put an fps filter before ffmpeg.org/ffmpeg-filters.html#fps to increase the frame rate of the background video, so to have plenty of frames in a short time to make the moving logo smoother. Then after you put the logo, you can use another fps to bring the video back to the original frame rate. I didn't try it yet, but this is the first attempt I would do Let me know what you can come out with!
@hassanafta189
@hassanafta189 Год назад
I have DMed u on instagram! can u please check?
@devstefit
@devstefit Год назад
Sorry for my absence, but it was a series of event that prevented me from being on the socials.
Далее
FFmpeg Streaming Bootstrap: UDP To Get Started!
24:36
Просмотров 4,8 тыс.
КАКОЙ У ТЕБЯ ЛЮБИМЫЙ МАРМЕЛАД?
00:40
ThePrimeagen Hacks My Productivity
3:30
Просмотров 40 тыс.
FFmpeg in 100 Seconds
2:20
Просмотров 553 тыс.
How to concatenate two videos using FFmpeg?
6:29
Просмотров 6 тыс.
FFmpeg 7.0 Is Out! Let's See What's New...
17:13