GithubHelp home page GithubHelp logo

00mjk / python-moshion Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rjmoggach/python-moshion

0.0 0.0 0.0 8.06 MB

Datamoshing Motion - a command line wrapper to ffmpeg used to datamosh two image sequences

License: MIT License

Python 50.44% Shell 49.56%

python-moshion's Introduction

python-moshion - Datamoshing Motion

moshion is a command line interface to ffmpeg used to datamosh two video sequences to purposely create encoding artifacts.

This software is in alpha state and no where near production ready.

Try it out but all the usual caveats apply. Use at your own risk etc.

Status and License

Copyright (c) 2014 Robert Moggach, Fabio Piparo & contributors.

Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php

About

Traditional 'datamoshing' involves removing I-frames from encoded videos to create encoding artifacts that appear to make frames melt into one another by inheriting the motion of the incoming footage.

This is cool but the result is a moving still frame - we want a moving outgoing picture. By progressively deleting frames from the outgoing clip along with the I-frame of the incoming clip, we hope to create a series of frames that represent the outgoing clip moshed by the motion of the incoming clip. Give it a try.

This has all been done before but usually only produces another video and without alot of flexibility for what we need. We work with discrete frames so moshion accordingly takes two image sequences, splices them together, encodes them, deletes the I-frames to create a moshed video and then extracts the moshed frames as a new image sequence.

Contributing

All kinds of contributions are welcome - code, tests, documentation, bug reports, ideas, etc.

Currently we need to implement the following:

  • testing
  • optimization
  • more encoding options, codecs, tricks to make it better
  • enhanced portability
  • better code all around instead of the rushed hack this is now
  • other mosh techniques

Check out the issues to see what we're focused on.

Forking through GitHub

First of all, you need to fork from the official repository...

Fork python-moshion

Now you can change whatever you want, commit, push to your fork and when your contribution is done, follow the pull request link and explain what you did and why.

Running the tests

Patience. Tests are important and will be implemented.

Documentation

This is admittedly sparse but will get better. For now:

Installation

We don't have any installer at the moment so you kinda need to know what you're doing.

Prerequisites

Without question you need ffmpeg but there are a ton of other libraries you may need as well depending on what images, videos you want to use.

Here are some links:

Mac OSX

Everyone loves homebrew. Getting it to install ffmpeg is not always easy.

brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r \
--with-libass --with-libass --with-libbluray --with-libcaca --with-libquvi \
--with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr \
--with-openjpeg --with-openssl --with-opus --with-rtmpdump --with-schroedinger \
--with-speex --with-theora --with-tools --with-libmp3lame

This is easier...

static FFmpeg binaries for Mac OS X Intel 64bit

Clone the repo

Start by cloning the repo:

git clone https://github.com/mogga/python-moshion.git

Command Line Tool

From within the repo run the included command line script to get a feel for it.

cd python-moshion
./gomoshion.py -s 1 -e 20 -f 5 --input `pwd`/tests/footage/input/input_ftg.%04d.jpg --mosh `pwd`/tests/footage/input/input_ftg.%04d.jpg -o `pwd`/tests/footage/output

or use the interactive mode...

./gomoshion.py -q

Acknowledgements

We use a couple great packages to get this working:

First and foremost is pymosh so a big thank you for that headstart.

Being VFX/CG artists we also rely on cgkit which we use for it's sequence parsing bits.

The really great Ruby AviGlitch is great too although this is python so it was more of an inspiration than anything else.

For our tests we use a few bits from the internet archive specifically this clip:

InternetArchive35mmStockFootageSampleReel

Here are some great places to learn about datamoshing, glitch art, pixel sorting. It's not comprehensive by any stretch... just the links we found as we did our research.

python-moshion's People

Contributors

rjmoggach 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.