ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - talklittle/ffmpex: Elixir wrapper for FFmpeg command line interface
Elixir wrapper for FFmpeg command line interface. Contribute to talklittle/ffmpex development by creating an account on GitHub.
Visit Site

GitHub - talklittle/ffmpex: Elixir wrapper for FFmpeg command line interface

GitHub - talklittle/ffmpex: Elixir wrapper for FFmpeg command line interface

FFmpex

Build Status Module Version

An Elixir wrapper for the FFmpeg command line interface.

Documentation: https://hexdocs.pm/ffmpex/

Usage notes

The API is a builder, building up the list of options per-file, per-stream(-per-file), and globally.

Note that adding options is backwards from using the ffmpeg CLI; when using ffmpeg CLI, you specify the options before each file. But with FFmpex (this library), you add the file/stream first, then add the relevant options afterward.

Examples

import FFmpex
use FFmpex.Options

command =
  FFmpex.new_command
  |> add_global_option(option_y())
  |> add_input_file("/path/to/input.avi")
  |> add_output_file("/path/to/output.avi")
    |> add_stream_specifier(stream_type: :video)
      |> add_stream_option(option_b("64k"))
    |> add_file_option(option_maxrate("128k"))
    |> add_file_option(option_bufsize("64k"))

{:ok, output} = execute(command)

It is possible to obtain ffmpeg's output with:

command =
  FFmpex.new_command
  |> add_input_file("/path/to/input.mp4")
  |> to_stdout()
  |> add_file_option(option_f("avi"))

{:ok, output} = execute(command)

do_something(output)

You can use the FFprobe module to query for file info:

FFprobe.duration("/path/to/input.avi")
# => result in seconds, e.g., 228.456939

See silent_video and thumbnex for more usage examples.

Prerequisites

FFmpeg must be installed.

Installation

Add ffmpex to your list of dependencies in mix.exs:

def deps do
  [
    {:ffmpex, "~> 0.11.0"}
  ]
end

Configuration

You can specify some options in config.exs:

config :ffmpex, ffmpeg_path: "/path/to/ffmpeg"
config :ffmpex, ffprobe_path: "/path/to/ffprobe"

Release notes

See the Changelog for changes between versions.

Disclaimer

FFmpex is not affiliated with nor endorsed by the FFmpeg project.

FFmpeg is a trademark of Fabrice Bellard, originator of the FFmpeg project.

Copyright and License

Copyright (c) 2016 Andrew Shu

FFmpex source code is licensed under the MIT License.

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory