Giter Club home page Giter Club logo

ffmpeg_cli's People

Contributors

angelosilvestre avatar matthew-carroll avatar thomasssb1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ffmpeg_cli's Issues

Create a guide website

FFMPEG scripting is very difficult to learn. We want this package to make it easier, where possible, rather than adding even more complexity on top.

Create a guide website for this package, including instructions for global activation, as well as common FFMPEG use-cases.

Make it easier to create cli arguments

Currently, we need to know the syntax of ffmpeg cli arguments. For example, if we want to trim the start of an input, we need to create an argument with the following code:

CliArg(name: 'ss', value: myValueInSeconds);

Ideally, users of this package shouldn't need to know the exact syntax of a cli argument. We should abstract the underlying syntax by providing objects for the arguments. For example, for trimming the start of an input the user should be able to write a code like the following:

TrimStart(const Duration(seconds: 5));

If we want to improve the discoverability of the arguments we could use factory methods like the following:

CliArgs.trimStart(const Duration(seconds: 5));

Using factory methods the users would be able to discover the arguments by using the IDE code completion.

ScaleFilter Assertions [FIX included in this issue]

Hi to all involved, I really enjoy using your package.

I just recently came across an issue where the width and height of some videos had odd numbers an the error that through was

[executeThumbnailGenerationLinux] Stderr:  width not divisible by 2 (447x800)
 [vost#0:0/libx264 @ 0000022e5adaec80] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height.

The code I ran that affected this was:

        FilterChain(
          inputs: [videoStream.videoOnly],
          filters: [
            if ((aspectRatio ?? 0) >= 1) ScaleFilter(width: 800, height: -1),
            if ((aspectRatio ?? 0) < 1) ScaleFilter(width: -1, height: 800),
          ],
          outputs: [outputStream.videoOnly],
        ),
      );

What i realized is that using ffmpegg on the cli allows you to use '-2" for width or height which ensures that these issues dont happen.
Therefore I just ended up extended the the Filter class and simply changed your assert statements from "-1" to "-2".

See my version below:

  PageMeScaleFilter({
    this.width,
    this.height,
    this.eval,
    this.interl,
    this.swsFlags,
    this.param0,
    this.param1,
    this.size,
  })  : assert(width == null || width >= -2),
        assert(height == null || height >= -2),
        assert(eval == null || eval == 'init' || eval == 'frame'),
        assert(interl == null || interl == 1 || interl == 0 || interl == -1);

This completely solves my issue, so I was wondering if you would like me to submit a PR with the changes.

Have a great day.
Cheers

Example with file picker

Hello, nice package, but I am curious how to use files that are picked by file_picker plugin with it. When I try - it just errors that there is no such file.

Is there a way to add burned in subtitles to video as well as video cropping?

When looking through the docs, I see that there is some form of cropping (I think?) with the ScaleFilter (?) but when using, does not affect the size of the video. I need something that is the same as the crop functionality. (crop=x:y:p1:p2)
In my case:
crop=585:1080

However, I do not currently see a way to add burned in subtitles as a filter.
I need a way to be able to add this as a possible filter:
subtitles=.temp/comments.srt:fontsdir=defaults/font:force_style='Fontname=Verdana,Alignment=10'

customize ffmpeg path

Hopefully, I can customize the path of ffmpeg and package ffmpeg directly to my installation directory。

Unhandled Exception: ProcessException: The specified file could not be found.

On windows, I just want to convert webm audio file to mp3.
But ffmpeg never find the input file, even the file exist:

[ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: ProcessException: The specified file could not be found.
  Command: ffmpeg -i E:\Download/test.webm -ab 320 -ar 44100 -filter_complex "  " E:\Download/test.mp3

Same with files in assets folder.

Make Flutter image to video generation work with this package

Rutvik has existing work that captures Flutter screenshots as images and then stitches them together into video with FFMPEG.

Try to use this package to generate that FFMPEG command. If anything is missing from this package in that example, file issues for it.

When everything is working, add a test that configures the same command and verifies the output FFMPEG command.

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.