MCPcopy Index your code
hub / github.com/CrushedPixel/moshpit

github.com/CrushedPixel/moshpit @v1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.0 ↗ · + Follow
28 symbols 80 edges 6 files 9 documented · 32%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

moshpit

A command-line tool for precise datamoshing using I-Frame removal.
Comes with built-in scene cut detection for optimal results.

tutorial original moshed

Installation

Aside from the moshpit binary, which can be downloaded from the releases page, you need a copy of FFmpeg installed on your machine.

Usage

Arguments

moshpit [options] <file>

moshpit takes the video file you want to mosh as the last argument.

Option Description
-ffmpeg Specifies the location of the FFmpeg binary. Default: ffmpeg
-log Specifies the target location of the FFmpeg log file. Default: no logging

Commands

After starting moshpit, you can use the following commands to create a datamoshed video:

scenes

scenes <threshold>

Datamoshing via I-Frame removal yields the best results when applied at scene cuts. The scenes command finds scene cuts in the input file, using the threshold parameter to determine the similarity of each frame with the preceding frame.

A threshold of 0.2 usually gives good results.

mosh

mosh <output> <frame> [frame...]

Moshes the input file, writing it to the specified output file.
I-Frame removal is performed at the given frame indices, with scene cuts previously detected using the scenes command being suggested.
Using all as a frame parameter performs I-Frame removal at all previously detected scene cuts.

exit

Exits moshpit.
Moshpit can also be terminated at any time using Ctrl+C (SIGINT).

Building from source

Thanks to golang's flawed dependency system, setting up moshpit locally for development is a bit of a hassle. You can't use go get, as we're using modified versions (forks) of some libraries. Therefore, you need to clone the repository into your GOPATH and use go dep to install dependencies into the vendor directory:

mkdir -p $GOPATH/src/github.com/crushedpixel
cd $GOPATH/src/github.com/crushedpixel
git clone https://github.com/CrushedPixel/moshpit
dep ensure

You should now be able to build the moshpit command binary:

go build github.com/crushedpixel/moshpit/cmd/moshpit

Core symbols most depended-on inside this repo

RenderBlank
called by 6
cmd/moshpit/progressbar.go
Clear
called by 5
cmd/moshpit/progressbar.go
newDefaultFloatProgressBar
called by 4
cmd/moshpit/progressbar.go
SetProgress
called by 4
cmd/moshpit/progressbar.go
runFFmpeg
called by 3
ffmpeg.go
writeRendered
called by 3
cmd/moshpit/progressbar.go
readLinesToChannel
called by 2
ffmpeg.go
AviScanner
called by 2
analyze.go

Shape

Function 20
Method 5
Struct 2
TypeAlias 1

Languages

Go100%

Modules by API surface

cmd/moshpit/main.go8 symbols
cmd/moshpit/progressbar.go7 symbols
analyze.go7 symbols
mosh.go2 symbols
ffmpeg.go2 symbols
convert.go2 symbols

For agents

$ claude mcp add moshpit \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page