{"id":13493810,"url":"https://github.com/tanersener/flutter-ffmpeg","last_synced_at":"2025-03-28T12:32:27.852Z","repository":{"id":37734748,"uuid":"164234067","full_name":"tanersener/flutter-ffmpeg","owner":"tanersener","description":"FFmpeg plugin for Flutter. Not maintained anymore. Superseded by FFmpegKit.","archived":true,"fork":false,"pushed_at":"2021-10-13T20:18:10.000Z","size":3850,"stargazers_count":645,"open_issues_count":0,"forks_count":132,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-10-29T13:46:02.314Z","etag":null,"topics":["android","ffmpeg","flutter","flutter-plugin","fontconfig","freetype","fribidi","gnutls","ios","libass","libtheora","libvorbis","libvpx","opencore-amr","speex","vp8","vp9","wavpack","x264","x265"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tanersener.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"patreon":"tanersener","custom":["https://buymeacoff.ee/tanersener"]}},"created_at":"2019-01-05T16:55:44.000Z","updated_at":"2024-10-12T03:26:19.000Z","dependencies_parsed_at":"2022-08-08T21:30:46.287Z","dependency_job_id":null,"html_url":"https://github.com/tanersener/flutter-ffmpeg","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanersener%2Fflutter-ffmpeg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanersener%2Fflutter-ffmpeg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanersener%2Fflutter-ffmpeg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanersener%2Fflutter-ffmpeg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanersener","download_url":"https://codeload.github.com/tanersener/flutter-ffmpeg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245476694,"owners_count":20621699,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","ffmpeg","flutter","flutter-plugin","fontconfig","freetype","fribidi","gnutls","ios","libass","libtheora","libvorbis","libvpx","opencore-amr","speex","vp8","vp9","wavpack","x264","x265"],"created_at":"2024-07-31T19:01:19.015Z","updated_at":"2025-03-28T12:32:27.815Z","avatar_url":"https://github.com/tanersener.png","language":"Dart","funding_links":["https://patreon.com/tanersener","https://buymeacoff.ee/tanersener"],"categories":["Production Level"],"sub_categories":["Loss Functions","Problems"],"readme":"# flutter_ffmpeg \n\n![GitHub release](https://img.shields.io/badge/release-v0.4.2-blue.svg)\n![](https://img.shields.io/pub/v/flutter_ffmpeg.svg)\n\nFFmpeg plugin for Flutter. Supports iOS and Android.\n\nNot maintained anymore, superseded by [FFmpegKit](https://github.com/tanersener/ffmpeg-kit). See [FlutterFFmpeg to FFmpegKit Migration Guide](https://github.com/tanersener/ffmpeg-kit/wiki/Migrating-From-FlutterFFmpeg).\n\n\u003cimg src=\"https://github.com/tanersener/flutter-ffmpeg/raw/development/doc/assets/flutter-ffmpeg-logo-v2-cropped.png\" width=\"240\"\u003e\n\n### 1. Features\n- Based on `MobileFFmpeg`\n- Includes both `FFmpeg` and `FFprobe`\n- Supports\n    - Both `Android` and `iOS`\n    - Both Android (API Level 16+) and iOS (SDK 9.3+)\n    - FFmpeg `v4.1`, `v4.2`, `v4.3` and `v4.4-dev` releases\n    - `arm-v7a`, `arm-v7a-neon`, `arm64-v8a`, `x86` and `x86_64` architectures on Android\n    - `armv7`, `armv7s`, `arm64`, `arm64e`, `i386` and `x86_64` architectures on iOS\n    - 25 external libraries\n\n        `fontconfig`, `freetype`, `fribidi`, `gmp`, `gnutls`, `kvazaar`, `lame`, `libaom`, `libass`, `libiconv`, `libilbc`, `libtheora`, `libvorbis`, `libvpx`, `libwebp`, `libxml2`, `opencore-amr`, `opus`, `shine`, `snappy`, `soxr`, `speex`, `twolame`, `vo-amrwbenc`, `wavpack`\n\n    - 4 external libraries with GPL license\n\n        `vid.stab`, `x264`, `x265`, `xvidcore`\n\n    - Concurrent execution\n    - `zlib` and `MediaCodec` Android system libraries\n    - `bzip2`, `iconv`, `libuuid`, `zlib` system libraries and `AudioToolbox`, `VideoToolbox`, `AVFoundation` system frameworks\n\n- Licensed under LGPL 3.0, can be customized to support GPL v3.0\n\n### 2. Installation\n\nAdd `flutter_ffmpeg` as a dependency in your `pubspec.yaml file`.\n  ```\ndependencies:\n    flutter_ffmpeg: ^0.4.2\n  ```\n\n#### 2.1 Packages\n\n`ffmpeg` includes built-in encoders for some popular formats. However, there are certain external libraries that needs \nto be enabled in order to encode specific formats/codecs. For example, to encode an `mp3` file you need `lame` or \n`shine` library enabled. You have to install a `flutter_ffmpeg` package that has at least one of them inside. \nTo encode an `h264` video, you need to install a package with `x264` inside. To encode `vp8` or `vp9` videos, you need \na `flutter_ffmpeg` package with `libvpx` inside.\n\n`flutter_ffmpeg` provides eight packages that include different sets of external libraries. These packages are named \naccording to the external libraries included in them. Below you can see which libraries are enabled in each package. \n\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n\u003cth align=\"center\"\u003e\u003c/th\u003e\n\u003cth align=\"center\"\u003e\u003csup\u003emin\u003c/sup\u003e\u003c/th\u003e\n\u003cth align=\"center\"\u003e\u003csup\u003emin-gpl\u003c/sup\u003e\u003c/th\u003e\n\u003cth align=\"center\"\u003e\u003csup\u003ehttps\u003c/sup\u003e\u003c/th\u003e\n\u003cth align=\"center\"\u003e\u003csup\u003ehttps-gpl\u003c/sup\u003e\u003c/th\u003e\n\u003cth align=\"center\"\u003e\u003csup\u003eaudio\u003c/sup\u003e\u003c/th\u003e\n\u003cth align=\"center\"\u003e\u003csup\u003evideo\u003c/sup\u003e\u003c/th\u003e\n\u003cth align=\"center\"\u003e\u003csup\u003efull\u003c/sup\u003e\u003c/th\u003e\n\u003cth align=\"center\"\u003e\u003csup\u003efull-gpl\u003c/sup\u003e\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\"\u003e\u003csup\u003eexternal libraries\u003c/sup\u003e\u003c/td\u003e\n\u003ctd align=\"center\"\u003e-\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\u003csup\u003evid.stab\u003c/sup\u003e\u003cbr\u003e\u003csup\u003ex264\u003c/sup\u003e\u003cbr\u003e\u003csup\u003ex265\u003c/sup\u003e\u003cbr\u003e\u003csup\u003exvidcore\u003c/sup\u003e\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\u003csup\u003egmp\u003c/sup\u003e\u003cbr\u003e\u003csup\u003egnutls\u003c/sup\u003e\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\u003csup\u003egmp\u003c/sup\u003e\u003cbr\u003e\u003csup\u003egnutls\u003c/sup\u003e\u003cbr\u003e\u003csup\u003evid.stab\u003c/sup\u003e\u003cbr\u003e\u003csup\u003ex264\u003c/sup\u003e\u003cbr\u003e\u003csup\u003ex265\u003c/sup\u003e\u003cbr\u003e\u003csup\u003exvidcore\u003c/sup\u003e\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\u003csup\u003elame\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibilbc\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibvorbis\u003c/sup\u003e\u003cbr\u003e\u003csup\u003eopencore-amr\u003c/sup\u003e\u003cbr\u003e\u003csup\u003eopus\u003c/sup\u003e\u003cbr\u003e\u003csup\u003eshine\u003c/sup\u003e\u003cbr\u003e\u003csup\u003esoxr\u003c/sup\u003e\u003cbr\u003e\u003csup\u003espeex\u003c/sup\u003e\u003cbr\u003e\u003csup\u003etwolame\u003c/sup\u003e\u003cbr\u003e\u003csup\u003evo-amrwbenc\u003c/sup\u003e\u003cbr\u003e\u003csup\u003ewavpack\u003c/sup\u003e\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\u003csup\u003efontconfig\u003c/sup\u003e\u003cbr\u003e\u003csup\u003efreetype\u003c/sup\u003e\u003cbr\u003e\u003csup\u003efribidi\u003c/sup\u003e\u003cbr\u003e\u003csup\u003ekvazaar\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibaom\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibass\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibiconv\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibtheora\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibvpx\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibwebp\u003c/sup\u003e\u003cbr\u003e\u003csup\u003esnappy\u003c/sup\u003e\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\u003csup\u003efontconfig\u003c/sup\u003e\u003cbr\u003e\u003csup\u003efreetype\u003c/sup\u003e\u003cbr\u003e\u003csup\u003efribidi\u003c/sup\u003e\u003cbr\u003e\u003csup\u003egmp\u003c/sup\u003e\u003cbr\u003e\u003csup\u003egnutls\u003c/sup\u003e\u003cbr\u003e\u003csup\u003ekvazaar\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elame\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibaom\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibass\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibiconv\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibilbc\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibtheora\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibvorbis\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibvpx\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibwebp\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibxml2\u003c/sup\u003e\u003cbr\u003e\u003csup\u003eopencore-amr\u003c/sup\u003e\u003cbr\u003e\u003csup\u003eopus\u003c/sup\u003e\u003cbr\u003e\u003csup\u003eshine\u003c/sup\u003e\u003cbr\u003e\u003csup\u003esnappy\u003c/sup\u003e\u003cbr\u003e\u003csup\u003esoxr\u003c/sup\u003e\u003cbr\u003e\u003csup\u003espeex\u003c/sup\u003e\u003cbr\u003e\u003csup\u003etwolame\u003c/sup\u003e\u003cbr\u003e\u003csup\u003evo-amrwbenc\u003c/sup\u003e\u003cbr\u003e\u003csup\u003ewavpack\u003c/sup\u003e\u003c/td\u003e\n\u003ctd align=\"center\"\u003e\u003csup\u003efontconfig\u003c/sup\u003e\u003cbr\u003e\u003csup\u003efreetype\u003c/sup\u003e\u003cbr\u003e\u003csup\u003efribidi\u003c/sup\u003e\u003cbr\u003e\u003csup\u003egmp\u003c/sup\u003e\u003cbr\u003e\u003csup\u003egnutls\u003c/sup\u003e\u003cbr\u003e\u003csup\u003ekvazaar\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elame\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibaom\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibass\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibiconv\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibilbc\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibtheora\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibvorbis\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibvpx\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibwebp\u003c/sup\u003e\u003cbr\u003e\u003csup\u003elibxml2\u003c/sup\u003e\u003cbr\u003e\u003csup\u003eopencore-amr\u003c/sup\u003e\u003cbr\u003e\u003csup\u003eopus\u003c/sup\u003e\u003cbr\u003e\u003csup\u003eshine\u003c/sup\u003e\u003cbr\u003e\u003csup\u003esnappy\u003c/sup\u003e\u003cbr\u003e\u003csup\u003esoxr\u003c/sup\u003e\u003cbr\u003e\u003csup\u003espeex\u003c/sup\u003e\u003cbr\u003e\u003csup\u003etwolame\u003c/sup\u003e\u003cbr\u003e\u003csup\u003evid.stab\u003c/sup\u003e\u003cbr\u003e\u003csup\u003evo-amrwbenc\u003c/sup\u003e\u003cbr\u003e\u003csup\u003ewavpack\u003c/sup\u003e\u003cbr\u003e\u003csup\u003ex264\u003c/sup\u003e\u003cbr\u003e\u003csup\u003ex265\u003c/sup\u003e\u003cbr\u003e\u003csup\u003exvidcore\u003c/sup\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\"\u003e\u003csup\u003eandroid system libraries\u003c/sup\u003e\u003c/td\u003e\n\u003ctd align=\"center\" colspan=8\u003e\u003csup\u003ezlib\u003c/sup\u003e\u003cbr\u003e\u003csup\u003eMediaCodec\u003c/sup\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd align=\"center\"\u003e\u003csup\u003eios system libraries\u003c/sup\u003e\u003c/td\u003e\n\u003ctd align=\"center\" colspan=8\u003e\u003csup\u003ezlib\u003c/sup\u003e\u003cbr\u003e\u003csup\u003eAudioToolbox\u003c/sup\u003e\u003cbr\u003e\u003csup\u003eAVFoundation\u003c/sup\u003e\u003cbr\u003e\u003csup\u003eiconv\u003c/sup\u003e\u003cbr\u003e\u003csup\u003eVideoToolbox\u003c/sup\u003e\u003cbr\u003e\u003csup\u003ebzip2\u003c/sup\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\nInstallation of `FlutterFFmpeg` using `pub` enables the default package, which is based on `https` package. It is \npossible to enable other `flutter_ffmpeg` packages using the following steps.\n\n##### 2.1.1 Android\n\n- Edit `android/build.gradle` file and specify the package name in `ext.flutterFFmpegPackage` variable.\n\n    ```\n    ext {\n        flutterFFmpegPackage  = \"\u003cflutter ffmpeg package name listed in section 2.1\u003e\"\n    }\n\n    ```\n##### 2.1.2 iOS (Flutter \u003e= 2.x)\n\n- Edit `ios/Podfile`, add the following block **before** `target 'Runner do` and specify the package name in\n  `\u003cpackage name\u003e` section :\n\n    ```\n    # \"fork\" of method flutter_install_plugin_pods (in fluttertools podhelpers.rb) to get lts version of ffmpeg\n    def flutter_install_plugin_pods(application_path = nil, relative_symlink_dir, platform)\n      # defined_in_file is set by CocoaPods and is a Pathname to the Podfile.\n      application_path ||= File.dirname(defined_in_file.realpath) if self.respond_to?(:defined_in_file)\n      raise 'Could not find application path' unless application_path\n\n      # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock\n      # referring to absolute paths on developers' machines.\n\n      symlink_dir = File.expand_path(relative_symlink_dir, application_path)\n      system('rm', '-rf', symlink_dir) # Avoid the complication of dependencies like FileUtils.\n\n      symlink_plugins_dir = File.expand_path('plugins', symlink_dir)\n      system('mkdir', '-p', symlink_plugins_dir)\n\n      plugins_file = File.join(application_path, '..', '.flutter-plugins-dependencies')\n      plugin_pods = flutter_parse_plugins_file(plugins_file, platform)\n      plugin_pods.each do |plugin_hash|\n        plugin_name = plugin_hash['name']\n        plugin_path = plugin_hash['path']\n        if (plugin_name \u0026\u0026 plugin_path)\n          symlink = File.join(symlink_plugins_dir, plugin_name)\n          File.symlink(plugin_path, symlink)\n\n          if plugin_name == 'flutter_ffmpeg'\n            pod 'flutter_ffmpeg/\u003cpackage name\u003e', :path =\u003e File.join(relative_symlink_dir, 'plugins', plugin_name, platform)\n          else\n            pod plugin_name, :path =\u003e File.join(relative_symlink_dir, 'plugins', plugin_name, platform)\n          end\n        end\n      end\n    end\n    ```\n\n##### 2.1.3 iOS (Flutter \u003e= 1.20.x) \u0026\u0026 (Flutter \u003c 2.x)\n\n- Edit `ios/Podfile`, add the following block **before** `target 'Runner do` and specify the package name in\n`\u003cpackage name\u003e` section :\n\n    ```\n    # \"fork\" of method flutter_install_ios_plugin_pods (in fluttertools podhelpers.rb) to get lts version of ffmpeg\n    def flutter_install_ios_plugin_pods(ios_application_path = nil)\n      # defined_in_file is set by CocoaPods and is a Pathname to the Podfile.\n      ios_application_path ||= File.dirname(defined_in_file.realpath) if self.respond_to?(:defined_in_file)\n      raise 'Could not find iOS application path' unless ios_application_path\n\n      # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock\n      # referring to absolute paths on developers' machines.\n\n      symlink_dir = File.expand_path('.symlinks', ios_application_path)\n      system('rm', '-rf', symlink_dir) # Avoid the complication of dependencies like FileUtils.\n\n      symlink_plugins_dir = File.expand_path('plugins', symlink_dir)\n      system('mkdir', '-p', symlink_plugins_dir)\n\n      plugins_file = File.join(ios_application_path, '..', '.flutter-plugins-dependencies')\n      plugin_pods = flutter_parse_plugins_file(plugins_file)\n      plugin_pods.each do |plugin_hash|\n        plugin_name = plugin_hash['name']\n        plugin_path = plugin_hash['path']\n\n        if (plugin_name \u0026\u0026 plugin_path)\n          symlink = File.join(symlink_plugins_dir, plugin_name)\n          File.symlink(plugin_path, symlink)\n\n          if plugin_name == 'flutter_ffmpeg'\n            pod plugin_name+'/\u003cpackage name\u003e', :path =\u003e File.join('.symlinks', 'plugins', plugin_name, 'ios')\n          else\n            pod plugin_name, :path =\u003e File.join('.symlinks', 'plugins', plugin_name, 'ios')\n          end\n        end\n      end\n    end\n    ```\n- Ensure that `flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))` function is called within \n`target 'Runner' do` block. In that case, it is mandatory that the added function is named \n`flutter_install_ios_plugin_pods` and that you **do not** make an explicit call within that block.\n\n##### 2.1.4 iOS (Flutter \u003c 1.20.x)\n\n- Edit `ios/Podfile` file and modify the default `# Plugin Pods` block as follows. Do not forget to specify the package \nname in `\u003cpackage name\u003e` section.\n\n    ```\n    # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock\n    # referring to absolute paths on developers' machines.\n    system('rm -rf .symlinks')\n    system('mkdir -p .symlinks/plugins')\n    plugin_pods = parse_KV_file('../.flutter-plugins')\n    plugin_pods.each do |name, path|\n      symlink = File.join('.symlinks', 'plugins', name)\n      File.symlink(path, symlink)\n      if name == 'flutter_ffmpeg'\n        pod name+'/\u003cpackage name\u003e', :path =\u003e File.join(symlink, 'ios')\n      else\n        pod name, :path =\u003e File.join(symlink, 'ios')\n      end\n    end\n    ```\n\n##### 2.1.5 Package Names\n\nThe following table shows all package names defined for `flutter_ffmpeg`.\n    \n| Package | Main Release | LTS Release |\n| :----: | :----: | :----: |\n| min | min  | min-lts |\n| min-gpl | min-gpl | min-gpl-lts |\n| https | https | https-lts |\n| https-gpl | https-gpl | https-gpl-lts |\n| audio | audio | audio-lts |\n| video | video | video-lts |\n| full | full | full-lts |\n| full-gpl | full-gpl | full-gpl-lts |\n\n\n#### 2.2 Existing Applications\n\nIt is possible to add `flutter_ffmpeg` to existing applications using \n[Add-to-App](https://github.com/flutter/flutter/wiki/Add-Flutter-to-existing-apps) guide.\n\nPlease execute the following additional steps if you are integrating into an iOS application.\n\n1. Go to `Build Phases` of `Pods` -\u003e `FlutterPluginRegistrant` target and add all frameworks under the \n`Pods/mobile-ffmpeg-\u003cpackage name\u003e` directory to the `Link Binary With Libraries` section\n\n2. Go to `Build Phases` of `Pods` -\u003e `FlutterPluginRegistrant` target and add all system libraries/frameworks listed \nin Step 4 of [Importing-Frameworks](https://github.com/tanersener/mobile-ffmpeg/wiki/Importing-Frameworks) guide to \nthe `Link Binary With Libraries` section\n\n3. Go to `Build Phases` of `Pods` -\u003e `FlutterPluginRegistrant` target and add `AVFoundation` system framework to the \n`Link Binary With Libraries` section\n\n#### 2.3 LTS Releases\n\n`flutter_ffmpeg` is published in two different variants: `Main Release` and `LTS Release`. Both releases share the same\nsource code but is built with different settings. Below you can see the differences between the two.\n\nIn order to install the `LTS` variant, install the `https-lts` package using instructions in `2.1` or append `-lts` to \nthe package name you are using. \n\n|        | Main Release | LTS Release |\n| :----: | :----: | :----: |\n| Android API Level | 24 | 16 | \n| Android Camera Access | Yes | - |\n| Android Architectures | arm-v7a-neon\u003cbr/\u003earm64-v8a\u003cbr/\u003ex86\u003cbr/\u003ex86-64 | arm-v7a\u003cbr/\u003earm-v7a-neon\u003cbr/\u003earm64-v8a\u003cbr/\u003ex86\u003cbr/\u003ex86-64 |\n| Xcode Support | 10.1 | 7.3.1 |\n| iOS SDK | 11.0 | 9.3 |\n| iOS AVFoundation | Yes | - |\n| iOS Architectures | arm64\u003cbr/\u003ex86-64\u003cbr/\u003ex86-64-mac-catalyst | armv7\u003cbr/\u003earm64\u003cbr/\u003ei386\u003cbr/\u003ex86-64 |\n\n### 3. Using\n\n1. Execute synchronous FFmpeg commands.\n\n    - Use execute() method with a single command line  \n    ```\n    import 'package:flutter_ffmpeg/flutter_ffmpeg.dart';\n\n    final FlutterFFmpeg _flutterFFmpeg = new FlutterFFmpeg();\n\n    _flutterFFmpeg.execute(\"-i file1.mp4 -c:v mpeg4 file2.mp4\").then((rc) =\u003e print(\"FFmpeg process exited with rc $rc\"));\n    ```\n    \n    - Use executeWithArguments() method with an array of arguments  \n\n    ```\n    import 'package:flutter_ffmpeg/flutter_ffmpeg.dart';\n\n    final FlutterFFmpeg _flutterFFmpeg = new FlutterFFmpeg();\n\n    var arguments = [\"-i\", \"file1.mp4\", \"-c:v\", \"mpeg4\", \"file2.mp4\"];\n    _flutterFFmpeg.executeWithArguments(arguments).then((rc) =\u003e print(\"FFmpeg process exited with rc $rc\"));\n    ```\n2. Execute asynchronous FFmpeg commands.\n\n    ```\n    _flutterFFmpeg.executeAsync(ffmpegCommand, (CompletedFFmpegExecution execution) {\n      print(\"FFmpeg process for executionId ${execution.executionId} exited with rc ${execution.returnCode}\");\n    }).then((executionId) =\u003e print(\"Async FFmpeg process started with executionId $executionId.\"));\n    ```\n\n3. Execute FFprobe commands.\n\n    - Use execute() method with a single command line  \n    ```\n    import 'package:flutter_ffmpeg/flutter_ffmpeg.dart';\n\n    final FlutterFFprobe _flutterFFprobe = new FlutterFFprobe();\n\n    _flutterFFprobe.execute(\"-i file1.mp4\").then((rc) =\u003e print(\"FFprobe process exited with rc $rc\"));\n    ```\n    \n    - Use executeWithArguments() method with an array of arguments  \n\n    ```\n    import 'package:flutter_ffmpeg/flutter_ffmpeg.dart';\n\n    final FlutterFFprobe _flutterFFprobe = new FlutterFFprobe();\n\n    var arguments = [\"-i\", \"file1.mp4\"];\n    _flutterFFprobe.executeWithArguments(arguments).then((rc) =\u003e print(\"FFprobe process exited with rc $rc\"));\n    ```\n\n4. Check execution output. Zero represents successful execution, 255 means user cancel and non-zero values represent failure.\n    ```\n   \n    final FlutterFFmpegConfig _flutterFFmpegConfig = new FlutterFFmpegConfig();\n   \n    _flutterFFmpegConfig.getLastReturnCode().then((rc) =\u003e print(\"Last rc: $rc\"));\n\n    _flutterFFmpegConfig.getLastCommandOutput().then((output) =\u003e print(\"Last command output: $output\"));\n    ```\n\n5. Stop ongoing FFmpeg operations. Note that these two functions do not wait for termination to complete and return immediately.\n    - Stop all executions\n        ```\n        _flutterFFmpeg.cancel();\n        ```\n    - Stop a specific execution\n        ```\n        _flutterFFmpeg.cancelExecution(executionId);\n        ```\n\n6. Get media information for a file.\n    - Print all fields\n    ```\n    final FlutterFFprobe _flutterFFprobe = new FlutterFFprobe();\n\n    _flutterFFprobe.getMediaInformation(\"\u003cfile path or uri\u003e\").then((info) =\u003e print(info));\n    ```\n    - Print selected fields\n    ```\n    final FlutterFFprobe _flutterFFprobe = new FlutterFFprobe();\n\n    _flutterFFprobe.getMediaInformation(\"\u003cfile path or uri\u003e\").then((info) {\n        print(\"Media Information\");\n\n        print(\"Path: ${info.getMediaProperties()['filename']}\");\n        print(\"Format: ${info.getMediaProperties()['format_name']}\");\n        print(\"Duration: ${info.getMediaProperties()['duration']}\");\n        print(\"Start time: ${info.getMediaProperties()['start_time']}\");\n        print(\"Bitrate: ${info.getMediaProperties()['bit_rate']}\");\n        Map\u003cdynamic, dynamic\u003e tags = info.getMediaProperties()['tags'];\n        if (tags != null) {\n            tags.forEach((key, value) {\n                print(\"Tag: \" + key + \":\" + value + \"\\n\");\n            });\n        }\n\n        if (info.getStreams() != null) {\n            List\u003cStreamInformation\u003e streams = info.getStreams();\n\n            if (streams.length \u003e 0) {\n                for (var stream in streams) {\n                    print(\"Stream id: ${stream.getAllProperties()['index']}\");\n                    print(\"Stream type: ${stream.getAllProperties()['codec_type']}\");\n                    print(\"Stream codec: ${stream.getAllProperties()['codec_name']}\");\n                    print(\"Stream full codec: ${stream.getAllProperties()['codec_long_name']}\");\n                    print(\"Stream format: ${stream.getAllProperties()['pix_fmt']}\");\n                    print(\"Stream width: ${stream.getAllProperties()['width']}\");\n                    print(\"Stream height: ${stream.getAllProperties()['height']}\");\n                    print(\"Stream bitrate: ${stream.getAllProperties()['bit_rate']}\");\n                    print(\"Stream sample rate: ${stream.getAllProperties()['sample_rate']}\");\n                    print(\"Stream sample format: ${stream.getAllProperties()['sample_fmt']}\");\n                    print(\"Stream channel layout: ${stream.getAllProperties()['channel_layout']}\");\n                    print(\"Stream sar: ${stream.getAllProperties()['sample_aspect_ratio']}\");\n                    print(\"Stream dar: ${stream.getAllProperties()['display_aspect_ratio']}\");\n                    print(\"Stream average frame rate: ${stream.getAllProperties()['avg_frame_rate']}\");\n                    print(\"Stream real frame rate: ${stream.getAllProperties()['r_frame_rate']}\");\n                    print(\"Stream time base: ${stream.getAllProperties()['time_base']}\");\n                    print(\"Stream codec time base: ${stream.getAllProperties()['codec_time_base']}\");\n\n                    Map\u003cdynamic, dynamic\u003e tags = stream.getAllProperties()['tags'];\n                    if (tags != null) {\n                      tags.forEach((key, value) {\n                        print(\"Stream tag: \" + key + \":\" + value + \"\\n\");\n                      });\n                    }\n                }\n            }\n        }\n    });\n    ```\n\n7. Enable log callback and redirect all `FFmpeg`/`FFprobe` logs to a console/file/widget.\n    ```\n    void logCallback(Log log) {\n        print(\"${log.executionId}:${log.message}\");\n    }\n    ...\n    _flutterFFmpegConfig.enableLogCallback(this.logCallback);\n    ```\n\n8. Enable statistics callback and follow the progress of an ongoing `FFmpeg` operation.\n    ```\n    void statisticsCallback(Statistics statistics) {\n        print(\"Statistics: executionId: ${statistics.executionId}, time: ${statistics.time}, size: ${statistics.size}, bitrate: ${statistics.bitrate}, speed: ${statistics.speed}, videoFrameNumber: ${statistics.videoFrameNumber}, videoQuality: ${statistics.videoQuality}, videoFps: ${statistics.videoFps}\");\n    }\n    ...\n    _flutterFFmpegConfig.enableStatisticsCallback(this.statisticsCallback);\n    ```\n\n9. Poll statistics without implementing statistics callback.\n    ```\n    _flutterFFmpegConfig.getLastReceivedStatistics().then((stats) =\u003e print(stats));\n    ```\n\n10. List ongoing executions.\n    ```\n    _flutterFFmpeg.listExecutions().then((ffmpegExecutions) {\n      ffmpegExecutions.forEach((execution) {\n        ffprint(\n            \"Execution id:${execution.executionId}, startTime:${execution.command}, command:${execution.startTime}.\");\n      });\n    });\n    ```\n\n11. Set log level.\n    ```\n    _flutterFFmpegConfig.setLogLevel(LogLevel.AV_LOG_WARNING);\n    ```\n\n12. Register your own fonts by specifying a custom fonts directory, so they are available to use in `FFmpeg` filters. Please note that this function can not work on relative paths, you need to provide full file system path.\n    ```\n    _flutterFFmpegConfig.setFontDirectory(\"\u003cfolder with fonts\u003e\");\n    ```\n\n13. Use your own `fontconfig` configuration.\n    ```\n    _flutterFFmpegConfig.setFontconfigConfigurationPath(\"\u003cfontconfig configuration directory\u003e\");\n    ```\n\n14. Disable log functionality of the library. Logs will not be printed to console and log callback will be disabled.\n    ```\n    _flutterFFmpegConfig.disableLogs();\n    ```\n\n15. Disable statistics functionality of the library. Statistics callback will be disabled but the last received statistics data will be still available.\n    ```\n    _flutterFFmpegConfig.disableStatistics();\n    ```\n\n16. Create new `FFmpeg` pipe. \n    ```\n    _flutterFFmpegConfig.registerNewFFmpegPipe().then((path) {\n         then((stats) =\u003e print(\"New ffmpeg pipe at $path\"));\n    });\n    ```\n    \n### 4. Example Application\nYou can see how `FlutterFFmpeg` is used inside an application by running example application provided under the \n`example` folder. It supports command execution, video encoding, accessing https, encoding audio, burning subtitles, \nvideo stabilisation, pipe operations and concurrent command execution.\n\n\u003cimg src=\"https://github.com/tanersener/flutter-ffmpeg/raw/development/doc/assets/flutter_test_app.gif\" width=\"240\"\u003e\n\n### 5. Tips\n\n- `flutter_ffmpeg` uses file system paths, it does not know what an `assets` folder or a `project` folder is. So you \ncan't use resources on those folders directly, you need to provide full paths of those resources.\n\n- `flutter_ffmpeg` requires ios deployment target to be at least `11.0` for Main releases and `9.3` for LTS releases. \n  If you don't specify a deployment target or set a value smaller than the required one then your build may fail with \n  the following error.\n   \n   ```\n    Resolving dependencies of `Podfile`\n    [!] CocoaPods could not find compatible versions for pod \"flutter_ffmpeg\":\n      In Podfile:\n        flutter_ffmpeg (from `.symlinks/plugins/flutter_ffmpeg/ios`)\n    \n    Specs satisfying the `flutter_ffmpeg (from `.symlinks/plugins/flutter_ffmpeg/ios`)` dependency were found, but they required a higher minimum\n    deployment target.\n    ```\n    \n  You can fix this issue by adding the following definition to your `ios/Podfile` file.\n\n    - `Main` releases\n    ```\n    platform :ios, '11.0'\n    ```\n    - `LTS` releases\n    ```\n    platform :ios, '9.3'\n    ```\n\n- If `flutter_ffmpeg` release builds on Android fail with the following exception, make sure that `mavenCentral()` is\n  defined as a repository in your `build.gradle` and it is listed before `jcenter()`.\n\n  ```\n  E/flutter (14793): [ERROR:flutter/shell/platform/android/platform_view_android_jni_impl.cc(43)] java.lang.UnsatisfiedLinkError: Bad JNI version returned from JNI_OnLoad in \"/data/app/com.arthenica.flutter.ffmpeg.FlutterFFmpegExample-DV2qVHHlZArnXoQYMowxVQ==/base.apk!/lib/arm64-v8a/libmobileffmpeg.so\": 0\n  E/flutter (14793): \tat java.lang.Runtime.loadLibrary0(Runtime.java:1071)\n  E/flutter (14793): \tat java.lang.Runtime.loadLibrary0(Runtime.java:1007)\n  E/flutter (14793): \tat java.lang.System.loadLibrary(System.java:1668)\n  E/flutter (14793): \tat com.arthenica.mobileffmpeg.Config.\u003cclinit\u003e(Unknown Source:148)\n  E/flutter (14793): \tat com.arthenica.mobileffmpeg.Config.c(Unknown Source:0)\n  E/flutter (14793): \tat b.a.a.a.d.onMethodCall(Unknown Source:323)\n  E/flutter (14793): \tat io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(Unknown Source:17)\n  E/flutter (14793): \tat io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(Unknown Source:57)\n  E/flutter (14793): \tat io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(Unknown Source:4)\n  E/flutter (14793): \tat android.os.MessageQueue.nativePollOnce(Native Method)\n  E/flutter (14793): \tat android.os.MessageQueue.next(MessageQueue.java:363)\n  E/flutter (14793): \tat android.os.Looper.loop(Looper.java:173)\n  E/flutter (14793): \tat android.app.ActivityThread.main(ActivityThread.java:8178)\n  E/flutter (14793): \tat java.lang.reflect.Method.invoke(Native Method)\n  E/flutter (14793): \tat com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)\n  E/flutter (14793): \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)\n  E/flutter (14793):\n  F/flutter (14793): [FATAL:flutter/shell/platform/android/platform_view_android_jni_impl.cc(942)] Check failed: CheckException(env).\n  ```\n\n- `flutter_ffmpeg` includes native libraries that require ios deployment target to be at least `9.3`. If a deployment \ntarget is not set or a value smaller than `9.3` is used then your build will fail with the following error.\n   \n    ```\n    ld: targeted OS version does not support use of thread local variables in __gnutls_rnd_deinit for architecture x86_64\n    clang: error: linker command failed with exit code 1 (use -v to see invocation)\n    ```\n\n  Some versions of `Flutter` and `Cocoapods` have issues about setting ios deployment target from `Podfile`. On those \n  versions, having `platform :ios, '9.3'` in your `Podfile` is not enough. `Runner` project still uses the default \n  value `8.0`. You need to open `Runner.xcworkspace` in `Xcode` and set `iOS Deployment Target` of `Runner` project to \n  `9.3` manually or create a new project.\n    \n    \u003cimg src=\"https://github.com/tanersener/flutter-ffmpeg/raw/development/doc/assets/tip_runner_deployment_target.png\" width=\"480\"\u003e\n\n- Enabling `ProGuard` on releases older than `v0.2.4` causes linking errors. Please add the following rule inside your \n`proguard-rules.pro` file to preserve necessary method names and prevent linking errors.\n\n    ```\n    -keep class com.arthenica.mobileffmpeg.Config {\n        native \u003cmethods\u003e;\n        void log(int, byte[]);\n        void statistics(int, float, float, long , int, double, double);\n    }\n    ```\n\n- `ffmpeg` requires a valid `fontconfig` configuration to render subtitles. Unfortunately, Android does not include a \ndefault `fontconfig` configuration. So, if you do not register a font or specify a `fontconfig` configuration under \nAndroid, then the burning process will not produce any errors but subtitles won't be burned in your file. You can \novercome this behaviour by registering a font using `setFontDirectory` method or specifying your own `fontconfig` \nconfiguration using `setFontconfigConfigurationPath` method.\n\n- By default, Xcode compresses `PNG` files during packaging. If you use `.png` files in your commands make sure you \nset the following two settings to `NO`. If one of them is set to `YES`, your operations may fail with \n`Error while decoding stream #0:0: Generic error in an external library` error.\n\n    \u003cimg src=\"https://github.com/tanersener/flutter-ffmpeg/raw/development/doc/assets/tip_png_files.png\" width=\"720\"\u003e\n\n- Some `flutter_ffmpeg` packages include `libc++_shared.so` native library. If a second library which also includes \n`libc++_shared.so` is added as a dependency, `gradle` fails with \n`More than one file was found with OS independent path 'lib/x86/libc++_shared.so'` error message.\n\n  You can fix this error by adding the following block into your `build.gradle`.\n  ```\n  android {\n      packagingOptions {\n          pickFirst 'lib/x86/libc++_shared.so'\n          pickFirst 'lib/x86_64/libc++_shared.so'\n          pickFirst 'lib/armeabi-v7a/libc++_shared.so'\n          pickFirst 'lib/arm64-v8a/libc++_shared.so'\n      }\n  }\n  ```\n\n### 6. Updates\n\nRefer to [Changelog](CHANGELOG.md) for updates.\n\n### 7. License\n\nThis project is licensed under the LGPL v3.0. However, if installation is customized to use a package with `-gpl` \npostfix (min-gpl, https-gpl, full-gpl) then `FlutterFFmpeg` is subject to the GPL v3.0 license.\n\nIn test application; embedded fonts are licensed under the\n[SIL Open Font License](https://opensource.org/licenses/OFL-1.1), other digital assets are published in the public\ndomain.\n\n### 8. Patents\n\nIt is not clearly explained in their documentation but it is believed that `FFmpeg`, `kvazaar`, `x264` and `x265`\ninclude algorithms which are subject to software patents. If you live in a country where software algorithms are\npatentable then you'll probably need to pay royalty fees to patent holders. We are not lawyers though, so we recommend\nthat you seek legal advice first. See [FFmpeg Patent Mini-FAQ](https://ffmpeg.org/legal.html).\n\n### 9. Contributing\n\nFeel free to submit issues or pull requests.\n\nPlease note that `master` branch includes only the latest released source code. Changes planned for the next release \nare implemented under the `development` branch. Therefore, if you want to create a pull request, please open it against\nthe `development`.\n\n### 10. See Also\n\n- [FFmpeg](https://www.ffmpeg.org)\n- [Mobile FFmpeg Wiki](https://github.com/tanersener/mobile-ffmpeg/wiki)\n- [FFmpeg License and Legal Considerations](https://ffmpeg.org/legal.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanersener%2Fflutter-ffmpeg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanersener%2Fflutter-ffmpeg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanersener%2Fflutter-ffmpeg/lists"}