Git Product home page Git Product logo

Comments (3)

sbis04 avatar sbis04 commented on July 17, 2024

The error related to drawtext usually occurs if libfreetype library is not present or enabled in the FFmpeg build, according to this StackOverflow post. But I am currently using full FFmpeg, so it should contain this library.

To enable this library, as far as I have understood you have to build FFmpeg from source using the flag --enable-libfreetype. But, I am afraid that I am not sure where to use this flag and I believe that it has to be done natively on Android.

Also, I think it would be better if you can create one issue regarding this in the flutter-ffmpeg package and refer to this issue there, as I am using this package in mine.

from video_trimmer.

sbis04 avatar sbis04 commented on July 17, 2024

You have to add the following in the android/build.gradle:

ext.flutterFFmpegPackage = 'full'

So, you won't get the error: "No such filter: 'drawtext'"

Next, you might face an error related to fonts, like this:

E/mobile-ffmpeg(24697): [Parsed_drawtext_0 @ 0x7a7556f4c0] Cannot find a valid font for the family Sans
E/mobile-ffmpeg(24697): [AVFilterGraph @ 0x7a10ac5a80] Error initializing filter 'drawtext'
E/mobile-ffmpeg(24697): [AVFilterGraph @ 0x7a10ac5a80]  with args 'text=Stack Overflow'

For fixing this you have to define a font configuration in my video trimmer package, like this:

final FlutterFFmpegConfig _flutterFFmpegConfig = new FlutterFFmpegConfig();
await _flutterFFmpegConfig.setFontconfigConfigurationPath(<path>);

For more information refer to the Readme here: https://github.com/tanersener/flutter-ffmpeg/tree/master/example

I have not yet tried it out myself. Let me know if you are successful.

from video_trimmer.

ArjanAswal avatar ArjanAswal commented on July 17, 2024

You can add text, as well as an image to the video by using this.
I suggest converting the text widget to an image and then adding it to the video because it's more customizable.

from video_trimmer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.