{"id":28412693,"url":"https://github.com/vbauer/avconv4java","last_synced_at":"2025-10-13T09:45:18.055Z","repository":{"id":13413593,"uuid":"16102129","full_name":"vbauer/avconv4java","owner":"vbauer","description":"Java interface to avconv tool","archived":false,"fork":false,"pushed_at":"2019-05-19T10:26:07.000Z","size":892,"stargazers_count":28,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-24T13:41:29.718Z","etag":null,"topics":["avconv","ffmpeg","java","libav","video","video-processing"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vbauer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-21T12:40:54.000Z","updated_at":"2025-02-23T06:49:08.000Z","dependencies_parsed_at":"2022-08-28T20:31:15.849Z","dependency_job_id":null,"html_url":"https://github.com/vbauer/avconv4java","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/vbauer/avconv4java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbauer%2Favconv4java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbauer%2Favconv4java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbauer%2Favconv4java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbauer%2Favconv4java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vbauer","download_url":"https://codeload.github.com/vbauer/avconv4java/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbauer%2Favconv4java/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014566,"owners_count":26085536,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["avconv","ffmpeg","java","libav","video","video-processing"],"created_at":"2025-06-02T23:44:35.111Z","updated_at":"2025-10-13T09:45:17.538Z","avatar_url":"https://github.com/vbauer.png","language":"Java","readme":"\n# avconv4java\n\n[![Build Status](http://img.shields.io/travis/vbauer/avconv4java.svg?style=flat)](https://travis-ci.org/vbauer/avconv4java)\n[![Coverage Status](https://coveralls.io/repos/vbauer/avconv4java/badge.svg)](https://coveralls.io/r/vbauer/avconv4java)\n[![License](http://img.shields.io/badge/License-Apache%2C%20Version%202.0-blue.svg?style=flat)](http://opensource.org/licenses/Apache-2.0)\n[![Maven](https://img.shields.io/github/tag/vbauer/avconv4java.svg?label=maven)](https://jitpack.io/#vbauer/avconv4java)\n[![Codacy Badge](https://api.codacy.com/project/badge/grade/a57d77abf87a4f77a27ca0bef1038b91)](https://www.codacy.com/app/bauer-vlad/avconv4java)\n\n\n## Introduction\n\n\u003cimg align=\"right\" style=\"margin-left: 15px; box-shadow: 5px 5px 5px #888;\" width=\"250\" height=\"250\" src=\"misc/logo.png\"\u003e\n\n**avconv** tool is a part of the [Libav](http://libav.org) project (originates from the FFmpeg codebase).\nIt is a fast and powerful video and audio converter.\nLibav supports most common instruction set architectures (including IA-32, x86-64, PowerPC, ARM, etc.) with great performance.\n\n**avconv4java** is a simple pure-java interface to the [avconv](http://libav.org/avconv.html) command-line tool.\nAPI was designed with KISS principle in mind to be as simple as possible.\n\n**Online documentation:**\n\n* [Maven site](https://vbauer.github.io/avconv4java)\n* [Javadoc](https://vbauer.github.io/avconv4java/apidocs)\n\n\n## Features\n\n* Most avconv commands are supported (and tested in real projects).\n* Parallel processing is supported out of box.\n* It has a very simple API with fluent interfaces and method chaining.\n* Options and operators are transformed into similar method-names, e.g.\n    * -vcodec libx264 -\u003e .videoCodec(AVVideoCodecType.H264)\n    * -vcodec libtheora -\u003e .videoCodec(AVVideoCodecType.THEORA)\n    * -vcodec libtheora -\u003e .videoCodec(\"libtheora\")\n\n\n## Setup\n\nGradle:\n```groovy\nrepositories {\n    maven {\n        url \"https://jitpack.io\"\n    }\n}\n\ndependencies {\n    compile 'com.github.vbauer:avconv4java:1.2.3'\n}\n```\n\nMaven:\n```xml\n\u003crepository\u003e\n    \u003cid\u003ejitpack.io\u003c/id\u003e\n    \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n\u003c/repository\u003e\n\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.vbauer\u003c/groupId\u003e\n    \u003cartifactId\u003eavconv4java\u003c/artifactId\u003e\n    \u003cversion\u003e1.2.3\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n\n## Example\n\nFirst of all you need to configure options for avconv command. Builder pattern allows to do it as simple as possible:\n\n```java\nfinal AVRootOptions options = AVRootOptions.create(\"input.avi\", \"output.mp4\")\n    .builders(\n        AVMainOptions.create()\n            .overwriteOutput(),\n        AVVideoOptions.create()\n            .proportionalResizeUsingWidth(800)\n            .videoCodec(AVVideoCodecType.H264)\n            .movFlags(AVMovFlagsType.FAST_START),\n        AVAudioOptions.create()\n            .audioCodec(AVAudioCodecType.VISUAL_ON_AAC)\n            .audioBitRate(128)\n            .audioChannelsCount(2)\n            .sampleRate(11025),\n        AVCodecOptions.create()\n            .bitRate(1000)\n    )\n```\n\nTo execute avconv command with needed options you should use the class com.avconv4java.core.AVCommnad:\n\n```java\n// It'll be better to configure timeout always. Debug is useful sometimes.\nfinal AVCommand command = AVCommand.create()\n    .setDebug(true)\n    .setTimeout(timeout);\n\nfinal int returnCode = command.run(options);\nfinal String outputFile = options.getOutputFile();\n\nLogger.getGlobal().info(\n    String.format(\"Output file: %s, return code: %d\", outputFile, returnCode)\n);\n\n```\n\nThis command is equivalent to the following:\n\n\n```bash\n/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\n```\n\n\n## FAQ\n\n\u003cdl\u003e\n    \u003cdt\u003eWhat is the default avconv path value?\u003c/dt\u003e\n    \u003cdd\u003eEnvironment variable \"AVCONV4JAVA_TOOLPATH\" will be checked in priority, otherwise it will be \"/usr/bin/avconv\".\u003c/dd\u003e\n\u003c/dl\u003e\n\n\n## Might also like\n\n* [jconditions](https://github.com/vbauer/jconditions) - Extra conditional annotations for JUnit.\n* [jackdaw](https://github.com/vbauer/jackdaw) - Java Annotation Processor which allows to simplify development.\n* [houdini](https://github.com/vbauer/houdini) - Type conversion system for Spring framework.\n* [herald](https://github.com/vbauer/herald) - Logging annotation for Spring framework.\n* [caesar](https://github.com/vbauer/caesar) - Library that allows to create async beans from sync beans.\n* [commons-vfs2-cifs](https://github.com/vbauer/commons-vfs2-cifs) - SMB/CIFS provider for Commons VFS.\n\n\n## License\n\n```\nCopyright 2014 Vladislav Bauer\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvbauer%2Favconv4java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvbauer%2Favconv4java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvbauer%2Favconv4java/lists"}