Skip to content

Conversation

@hhirtz
Copy link

@hhirtz hhirtz commented Aug 30, 2025

Hello!

I would like to use your library in a IRC client i'm helping build. The client targets android, ios and linux, and we do most of the testing on linux, so it'd be much appreciated if this worked in some way on the platform. :D


this uses the native (nativest) option on linux: ffmpeg.

Because LGPL may be an issue, this adds support using calls to the ffmpeg binary, which is expected to be present on the user's system, instead of linking to libav.

Encoding uses libx264 and ffmpeg's built-in AAC encoder for maximum compatibility with user installs.

The code is written in C++ instead of Dart because i figured this way the main codebase stays untouched, and linux-specific code stays out of the way of the rest.

Most of the code in ./linux and ./example/linux has been generated by flutter and left untouched. The only files written by hand are ./linux/video_compress_plugin.cc and ./linux/video_compress_plugin_private.h. I've also added a CMake directive in ./linux/CMakeLists.txt to export a compile_commands.json file for development with clangd.

TODO

  • cancelCompression
  • compressVideo
    • actual compression
    • retrieve mediainfo
    • progress updates
  • deleteAllCache
  • getByteThumbnail
  • getFileThumbnail
  • setLogLevel

See #253

this uses the native (nativest) option on linux: ffmpeg.

Because LGPL may be an issue, this adds support using calls to the
ffmpeg binary, which is expected to be present on the user's system,
instead of linking to libav.

Encoding uses libx264 and ffmpeg's built-in AAC encoder for maximum
compatibility with user installs.

The code is written in C++ instead of Dart because i figured this way
the main codebase stays untouched, and linux-specific code stays out of
the way of the rest.

Most of the code in `./linux` and `./example/linux` has been generated
by flutter and left untouched. The only files written by hand are
`./linux/video_compress_plugin.cc` and
`./linux/video_compress_plugin_private.h`. I've also added a CMake
directive in `./linux/CMakeLists.txt` to export a
`compile_commands.json` file for development with clangd.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant