Git Product home page Git Product logo

avrecode's Introduction

avrecode: lossless re-compression of compressed video streams

avrecode reads an already-compressed video file and writes a more compressed file. Unlike transcoding, which loses fidelity, the compression algorithm used by avrecode is reversible. The decompressed bytes exactly match the original input file. However, avrecode's compressed format can only be read by avrecode -- an avrecode-compressed file cannot be played directly by standard software.

avrecode works by decoding the video stream into symbols using ffmpeg's libavcodec. It tries to predict each symbol as it arrives, and re-encodes the symbols to the compressed file using arithmetic coding. When avrecode's predictions are higher quality than the predictions specified by the H.264 standard, it achieves a better compression ratio.

Installing

avrecode consists of a compression/decompression program and a fork of the libavcodec library, part of the ffmpeg project. These live in separate github repositories:

The avrecode repository imports the libavcodec-hooks repository as a submodule, so the git submodule command is used to keep them in sync.

Download the source:

git clone https://github.com/dropbox/avrecode
cd avrecode
git submodule update --init

Build and test:

brew install protobuf
cd ffmpeg
./configure
make
cd ..
make
./recode roundtrip data/GOPR4542.MP4

Warning

This is an experimental test bed for compression research: use on trusted inputs only This tool does not validate input.

License

avrecode is released under the BSD 3-clause license. See the LICENSE file for details. The required libavcodec-hooks patch to ffmpeg is licenced under the LGPL.

Contributing

avrecode was originally written by Chris Lesniewski during Dropbox Hack Week January 2016. It is a redesign of the first version written by Daniel Horn, Patrick Horn, Chris Lesniewski, and others during Dropbox Hack Week 2015. We welcome external contributions, but ask that contributors accept our Contributor License Agreement to grant us a license to distribute the code:

https://opensource.dropbox.com/cla/

avrecode's People

Contributors

danielrh avatar lesniewski avatar pathorn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.