Questions tagged [drawtext]

340 questions
1
vote
1 answer

FFMPEG, command with Overlay and Drawtext on video

I have 2 commands, one for overlay(work alone), one for add text (work alone), i want this 2 commands in one. ffmpeg -i myvideo.mp4 -i image.png -filter_complex…
Cleoh
  • 25
  • 1
  • 5
1
vote
2 answers

Python win32 api drawText() and SetTextColor

I have managed to mangle together a program that takes a strings over multiple lines and prints them onto a transparent background. I wanted to know if there is a way to colour individual parts of the string different colours. I know there is but my…
Paul Hashmi
  • 456
  • 5
  • 18
1
vote
2 answers

Applying two filters (Showwaves and Drawtext) at once with FFMPEG

I use this command for my video: ffmpeg -i input.mp3 -i input.mp4 -y -ss 00:00:00 -t 00:00:10 -filter_complex "[0:a]showwaves=s=1920x175:colors=Yellow:mode=cline,colorkey=0x000000:0.01:0.1,format=yuva420p[v];[1:v][v]overlay=0:800[outv]" -map…
georgmann
  • 45
  • 1
  • 1
  • 4
1
vote
1 answer

FFmpeg how to add drawtext on filter complex along with watermark and palettegen

thanks to many posts on stack overflow I could come till here: How to add watermark in a gif with ffmpeg? which i can convert mp4 into animated gif with moderate quality and watermark on. But I'd like to add the drawtext too in these lines. ffmpeg…
1
vote
0 answers

Prevent ugly kerning when using DrawText

I use simple GDI DrawText to output blocks of text to a printer. The font used in the sample is Segoe UI. But you can use Arial or others too. It doesn't matter. The algorithm for large text blocks is simple. DrawText is called with DT_CALCRECT with…
xMRi
  • 14,982
  • 3
  • 26
  • 59
1
vote
0 answers

FFMPEG : Drawtext filter with word wrapping support

I need to draw max two line text at top of some backgroud. I need to wrap that text if that is longer. Text will be horizontal center align. I have tried and use DrawText filter but not able to find way to use text wrap automatically. Some…
1
vote
2 answers

WinForms: Measure Text With No Padding

In a WinForms app, I am trying to measure the size of some text I want to draw with no padding. Here's the closest I've gotten... protected override void OnPaint(PaintEventArgs e) { DrawIt(e.Graphics); } private void…
BoCoKeith
  • 817
  • 10
  • 21
1
vote
0 answers

Automatic encoder selection failed for output stream #0:1

I'm trying to use ffmpeg for edit some videos on android... It is working fine but if I try to use drawtext i get error the command is: path/ffmpeg -y -i /path/asd.mp4 -map 0 -segment_time 15 -f segment -c:v libx264 -preset veryfast -crf 30 -vf…
Rafael Lima
  • 3,079
  • 3
  • 41
  • 105
1
vote
4 answers

DrawText only displays the first call

I'm using the DrawText function in a Win32 program to display "Local" at the top center of the screen and "Server" in the center. When I run the program it displays "Local" but not "Server". Here is the code in my message loop: case WM_PAINT: …
Greg Treleaven
  • 8,124
  • 7
  • 30
  • 30
1
vote
0 answers

Render current file name when creating animation from multiple files

I'm rendering animations from a collection of png's. I'd like to add the name of the file as a text overlay. I've got drawtext working with static text, but haven't been able to find a way to access the file name being rendered. Current…
Geuis
  • 41,122
  • 56
  • 157
  • 219
1
vote
1 answer

ffmpeg drawtext - only draw within clipping rectangle

The ffmpeg documentation on filters doesn't have anything on a clipping rectangle for drawtext. I'm hoping there might be a setting I can put before a video filter to set a clip rect, an undocumented feature or a clever workaround so that you can…
Beefster
  • 723
  • 7
  • 19
1
vote
3 answers

custom textview using custom font

I'm trying to implement a custom textview that uses my own custom font. is there a way to set the typeface before doing a Super.onDraw()? So as to replace the usual font to the custom font that I want to use. Something like: protected void…
Creniale
  • 238
  • 3
  • 16
1
vote
1 answer

Ternary Statement With DrawTextValuePair

I am getting an error thrown when the text box value is null, so I was trying to write a ternary statement to check if the value is null. This is what I cam up with: DrawTextValuePair(e, string.IsNullOrEmpty(m_pcl.pn.Text) ? String.Format("Input:…
Yohan Greenburg
  • 333
  • 1
  • 3
  • 9
1
vote
1 answer

Android canvas drawText - how to bottom align text?

I have a custom View which is supposed to draw some text bottom aligned. Size of text should be 50% of view height. How should I change this code to work correctly? @Override protected void onDraw(Canvas canvas) { float h = getMeasuredHeight(); …
activity
  • 2,653
  • 3
  • 20
  • 44
1
vote
1 answer

Android - drawText invalidate

I am drawing on Canvas about who is on turn now. I am using validate() twice to invalidate the screen and drawing text again. But with invalidate() I am redrawing all board, which last quite a long, is there any way how to invalidate just this part…
Waypoint
  • 17,283
  • 39
  • 116
  • 170