Skip to content

Perl script that automatically datamoshes MPEG4-encoded AVI videos.

License

Notifications You must be signed in to change notification settings

jeffcrouse/Autodatamosh

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

autodatamosh - an automatic datamoshing script for AVI videos.

Copyright 2009, 2010 Joe Friedl http://joefriedl.net
Released under the terms of the GNU General Public License (GPL).


This file is a kind of pseudo-manpage that should include all necessary
instructions for using autodatamosh. If anything's missing, you find a
bug, or you have any other questions or comments, you can find me at
one of these places:

Github:		http://github.com/grampajoe
Twitter:	http://twitter.com/joefriedl
Youtube:	http://youtube.com/grampaj0e

For the most current version of this program, or if you would like to
contribute, check out the repository on Github:
http://github.com/grampajoe/Autodatamosh


SYNOPSIS
-----------------------------------------------------------------------
perl autodatamosh.pl [-i FILE] [-o FILE] [-dprob N] [-dmin N] [-dmax N]


DESCRIPTION
-----------------------------------------------------------------------
Autodatamosh automatically datamoshes AVI videos encoded with Xvid.
"Datamoshing" is the process of removing image frames from a video to
produce an interesting visual effect. Autodatamosh can also duplicate
motion frames for a "sweeping" effect (see EXAMPLES.) It can use
regular files or stdin/stdout.

In many cases, YOU MUST RE-ENCODE VIDEOS AFTER DATAMOSHING. The method
used by autodatamosh leaves files chopped up and possibly unreadable by
some video players. Youtube and video players like VLC seem to have no
trouble understanding the chopped up files.

As with manual datamoshing techniques, you may also want to preserve
the original audio to be recombined with the video later, since
autodatamosh brutally hacks through frames without regard for whether
they contain audio data. Leaving the audio in can also be fun, however.

Autodatamosh has only been tested on Linux with videos encoded by
FFmpeg using the AVI format and Xvid codec. If you get this to work
using any other combination of OS and codec, please let me know. I'd
also appreciate any thoughts on adding support for other container
formats and codecs, particularly Ogg/Theora.

As you've probably guessed, this is by no means intended to be
technical or precise. I wrote it just for fun, and I make no guarantees
of success or the production of anything interesting.


OPTIONS
-----------------------------------------------------------------------
-i FILE
	Input file. Default is stdin.

-o FILE
	Output file. Default is stdout.

-fprof N
	The probability (where N is between 0 and 1) that any effects
	will take place on a given frame

-dprob N
	The probability (where N is between 0 and 1) that P-frames will
	be duplicated when an I-frame is removed, producing a sweeping
	effect. Default is 0.

-dmin N
	Minumum number of frames to be duplicated. The actual amount
	duplicated will vary randomly between this and the value of
	dmax. Default is 10.

-dmax N
	Maximum number of frames to be duplicated. The actual amount
	duplicated will vary randomly between this and the value of
	dmin. Default is 50.


EXAMPLES
-----------------------------------------------------------------------
To do a standard datamosh using regular files for input and output:

	perl autodatamosh.pl -i infile -o outfile

For some random (50%) sweeping effects between 5 and 30 frames long
using stdin for the input and stdout for the output:

	perl autodatamosh.pl -dprob .5 -dmin 5 -dmax 30

There are examples of videos datamoshed by this script on my Youtube
channel: http://youtube.com/grampaj0e

If anyone's interested, I can post what I remember of the settings and
other techniques used when making the videos.

About

Perl script that automatically datamoshes MPEG4-encoded AVI videos.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Perl 100.0%