All Projects → vbauer → avconv4java

vbauer / avconv4java

Licence: other
Java interface to avconv tool

Programming Languages

java
68154 projects - #9 most used programming language
kotlin
9241 projects
shell
77523 projects

Projects that are alternatives of or similar to avconv4java

Ffmpeg Libav Tutorial
FFmpeg libav tutorial - learn how media works from basic to transmuxing, transcoding and more
Stars: ✭ 7,074 (+27107.69%)
Mutual labels:  video-processing, libav
slitcamera
Bash script to turn video file into slit photo
Stars: ✭ 41 (+57.69%)
Mutual labels:  video-processing, avconv
FunVideo
A series of embeddable theme into video, include animation and voice.
Stars: ✭ 19 (-26.92%)
Mutual labels:  video-processing
SST-Tensorflow
Tensorflow Implementation of the Paper "SST: Single-Stream Temporal Action Proposals" in CVPR 2017.
Stars: ✭ 50 (+92.31%)
Mutual labels:  video-processing
ffcvt
ffmpeg convert wrapper tool
Stars: ✭ 32 (+23.08%)
Mutual labels:  video-processing
RFDA-PyTorch
Official Code for 'Recursive Fusion and Deformable Spatiotemporal Attention for Video Compression Artifact Reduction' - ACM Multimedia2021 (ACMMM2021) Accepted Paper Task: Video Quality Enhancement / Video Compression Artifact Reduction
Stars: ✭ 44 (+69.23%)
Mutual labels:  video-processing
Implicit-Internal-Video-Inpainting
[ICCV 2021]: IIVI: Internal Video Inpainting by Implicit Long-range Propagation
Stars: ✭ 190 (+630.77%)
Mutual labels:  video-processing
DrawingBotV3
DrawingBotV3 is a software for creating line drawings from Images
Stars: ✭ 161 (+519.23%)
Mutual labels:  video-processing
Smart-Traffic-Signals-in-India-using-Deep-Reinforcement-Learning-and-Advanced-Computer-Vision
We have used Deep Reinforcement Learning and Advanced Computer Vision techniques to for the creation of Smart Traffic Signals for Indian Roads. We have created the scripts for using SUMO as our environment for deploying all our RL models.
Stars: ✭ 131 (+403.85%)
Mutual labels:  video-processing
ShotDetection
Open source software that detects shot boundaries in video.
Stars: ✭ 42 (+61.54%)
Mutual labels:  video-processing
pepic
Image and video proxy for my pet-projects
Stars: ✭ 35 (+34.62%)
Mutual labels:  video-processing
youtube-video-maker
📹 A tool for automatic video creation and uploading on YouTube
Stars: ✭ 134 (+415.38%)
Mutual labels:  video-processing
deepvisualminer
Deep visual mining for your photos and videos using YOLOv2 deep convolutional neural network based object detector and traditional face recognition algorithms
Stars: ✭ 21 (-19.23%)
Mutual labels:  video-processing
antz
ANTz immersive 3D data visualization engine
Stars: ✭ 25 (-3.85%)
Mutual labels:  video-processing
towhee
Towhee is a framework that is dedicated to making neural data processing pipelines simple and fast.
Stars: ✭ 821 (+3057.69%)
Mutual labels:  video-processing
NaturalGroundingPlayer
Sequence videos based on their energy readings
Stars: ✭ 46 (+76.92%)
Mutual labels:  video-processing
SSffmpegVideoOperation
This is a library of FFmpeg for android... 📸 🎞 🚑
Stars: ✭ 261 (+903.85%)
Mutual labels:  video-processing
Nager.VideoStream
Get images from a network camera stream or webcam
Stars: ✭ 27 (+3.85%)
Mutual labels:  video-processing
CVSandbox
Open source software package, which aims to allow solving different tasks related to computer vision areas, like video surveillance, vision based automation/robotics, different sorts of image/video processing, etc.
Stars: ✭ 56 (+115.38%)
Mutual labels:  video-processing
video-colorization
Applying the machine learning tool "DeOldify" on videos, frame by frame.
Stars: ✭ 15 (-42.31%)
Mutual labels:  video-processing

avconv4java

Build Status Coverage Status License Maven Codacy Badge

Introduction

avconv tool is a part of the Libav project (originates from the FFmpeg codebase). It is a fast and powerful video and audio converter. Libav supports most common instruction set architectures (including IA-32, x86-64, PowerPC, ARM, etc.) with great performance.

avconv4java is a simple pure-java interface to the avconv command-line tool. API was designed with KISS principle in mind to be as simple as possible.

Online documentation:

Features

  • Most avconv commands are supported (and tested in real projects).
  • Parallel processing is supported out of box.
  • It has a very simple API with fluent interfaces and method chaining.
  • Options and operators are transformed into similar method-names, e.g.
    • -vcodec libx264 -> .videoCodec(AVVideoCodecType.H264)
    • -vcodec libtheora -> .videoCodec(AVVideoCodecType.THEORA)
    • -vcodec libtheora -> .videoCodec("libtheora")

Setup

Gradle:

repositories {
    maven {
        url "https://jitpack.io"
    }
}

dependencies {
    compile 'com.github.vbauer:avconv4java:1.2.3'
}

Maven:

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

<dependency>
    <groupId>com.github.vbauer</groupId>
    <artifactId>avconv4java</artifactId>
    <version>1.2.3</version>
</dependency>

Example

First of all you need to configure options for avconv command. Builder pattern allows to do it as simple as possible:

final AVRootOptions options = AVRootOptions.create("input.avi", "output.mp4")
    .builders(
        AVMainOptions.create()
            .overwriteOutput(),
        AVVideoOptions.create()
            .proportionalResizeUsingWidth(800)
            .videoCodec(AVVideoCodecType.H264)
            .movFlags(AVMovFlagsType.FAST_START),
        AVAudioOptions.create()
            .audioCodec(AVAudioCodecType.VISUAL_ON_AAC)
            .audioBitRate(128)
            .audioChannelsCount(2)
            .sampleRate(11025),
        AVCodecOptions.create()
            .bitRate(1000)
    )

To execute avconv command with needed options you should use the class com.avconv4java.core.AVCommnad:

// It'll be better to configure timeout always. Debug is useful sometimes.
final AVCommand command = AVCommand.create()
    .setDebug(true)
    .setTimeout(timeout);

final int returnCode = command.run(options);
final String outputFile = options.getOutputFile();

Logger.getGlobal().info(
    String.format("Output file: %s, return code: %d", outputFile, returnCode)
);

This command is equivalent to the following:

/usr/bin/avconv -i input.avi -y -vf scale=w=800:h=trunc(ow/a/2)*2 -vcodec libx264 -movflags faststart -acodec libvo_aacenc -ab 128k -b 1000k -ac 2 -ar 11025 output.mp4

FAQ

What is the default avconv path value?
Environment variable "AVCONV4JAVA_TOOLPATH" will be checked in priority, otherwise it will be "/usr/bin/avconv".

Might also like

  • jconditions - Extra conditional annotations for JUnit.
  • jackdaw - Java Annotation Processor which allows to simplify development.
  • houdini - Type conversion system for Spring framework.
  • herald - Logging annotation for Spring framework.
  • caesar - Library that allows to create async beans from sync beans.
  • commons-vfs2-cifs - SMB/CIFS provider for Commons VFS.

License

Copyright 2014 Vladislav Bauer

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].