Creates glitch effects in H.264 encoded videos by removing keyframes, combining videos, looping intermediate frames.
Can be controlled via OSC.
demo.mp4
Use ffmpeg to convert the videos to a raw h264 stream
ffmpeg -i video.mp4 video.h264
It can also be helpful encode all input videos the same way, otherwise transitions between videos don't work properly. These settings have an effect on the glitch effects look in general and could probably be optimized still. They also have an effect on how likely mpv is to lock up when switching videos.
ffmpeg -i video.mp4 -c:v libx264 -vf format=yuv420p,scale=1920:1080 -qp 30 -x264-params bframes=0:refs=1:g=9999999 video.h264
libx264 options Potentially interesting parameters:
bframes=0
Disable B-framesrefs=1
allow max 1 reference frames for p-framesg=9999999
No keyframes inbetween
cargo run --release -- -i videos/* | mpv --no-correct-pts --fps=1000 --no-cache -
By default the glitcher listens on port 8000 for OSC messages.
/fps <float>
Set frames per second./record_loop <bool>
Loop recording start when true is sent and stops when false is sent. After recording the loop immediately starts playing./play_loop <bool>
Play previously recorded loop./pass_iframes <bool>
Lets I-frames through, disabling the glitch effect./video_num <int>
Loads the n-th video in the list of videos given to--input
.
- Fluid speed control, turntable style
- Video selection UI with thumbnails, groups of videos
- Recurse directories as input
- Find out why video sometimes stutters when switching