talklittle/ffmpex
소개
Elixir wrapper for FFmpeg command line interface
개발 도구측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 업데이트 지연
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalFFmpex
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.1"}
]
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.
관련 프로젝트 살펴보기
불러오는 중…