I am creating a video with FFmpeg library. I want access fonts from Android assets folder and overlay on my video as watermark.
What is the path for Android assets folder to access and apply custom font on FFmpeg? I can overlay watermark on video but when I try to apply custom font on it, it gives error related to not exist, etc.
What I found till now:
The alternative solution that I found is the create an image file and write text on it and overlay image on video. problem is text and image being stretch output. I need a solution for it.
String[] execute = {"-y", "-i", videoPath, "-i", image, "-filter_complex",
"[1:v]scale=" + width + ":" + height + "[ovrl],[0:v][ovrl]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2"
,"-strict" , "experimental", "-vcodec", "libx264" , "-preset", "ultrafast" , "-crf", "20", "-acodec", "aac", "-ar",
"44100", "-ac", "2", "-b:v", "36000k", outputPath.getPath()};
I thought itz
output will be good but it stretching my text and image.
I want some perfect solution to apply assets font on FFmpeg.
Thank you in Advance.