question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error initializing filter 'drawtext' with args in Android

See original GitHub issue

Getting error while trying to draw text on video.

Fontconfig error: Cannot load default config file [Parsed_drawtext_0 @ 0xb5391300] impossible to init fontconfig [AVFilterGraph @ 0xb5409040] Error initializing filter ‘drawtext’ with args ‘fontfile=/usr/share/fonts/TTF/Vera.ttf: text=Stack Overflow: fontcolor=white: fontsize=24: box=1: boxcolor=black: x=(w-text_w)/2: y=(h-text_h-line_h)/2’ Error reinitializing filters! Failed to inject frame into filter network: Unknown error occurred Error while processing the decoded data for stream #0:0 Conversion failed!

my command:

String[] cmd = {"-y" , "-i","input.mp4,
                            "-vf",
                            "drawtext=fontfile=/usr/share/fonts/TTF/Vera.ttf: text=\'Stack Overflow\': fontcolor=white: fontsize=24: box=1: boxcolor=black: x=(w-text_w)/2: y=(h-text_h-line_h)/2",
                            "-acodec:",
                            "copy",
                            "output.mp4"};

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Brianvdbcommented, Oct 5, 2018

The font file path is wrong.

0reactions
manishmips28commented, Jun 11, 2020

String cmd=“-i “+input+” -vf drawtext=fontfile=”+font+“:text=‘Stack OverFlow’ -y -c:v libx264 -c:a copy -movflags +faststart “+output+””;

Read more comments on GitHub >

github_iconTop Results From Across the Web

FFMpeg Error initializing filter 'drawtext' on Android project
First You need to specify the FONTCONFIG_FILE to be used in your command. FFMpeg depends on this file to locate fonts and render...
Read more >
ffmpeg drawtext not working - VideoHelp Forum
Hi, I am working on a programming project with ffmpeg. At the projects current junction, I am trying to write text onto image...
Read more >
[Solved]-What is the "Error initializing filter 'drawtext' with args ...
It works with set working directory address value to proc.StartInfo.WorkingDirectory at process.and full answer is in this link:
Read more >
WritingMinds/ffmpeg-android-java - Gitter
[AVFilterGraph @ 0xb81bcd30] Error initializing filter 'drawtext' with args ... I have the command working on my mac, but when I use ffmpeg...
Read more >
What is the “Error initializing filter 'drawtext' with args ... - MSDN
locked. What is the “Error initializing filter 'drawtext' with args…” error in using of ffmpeg at c# process class? RRS feed · Archived...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found