Wednesday, 3 July 2024

Eigenstate 2 - more experiments with ffmpeg, x11grab and generating feedback on the linux desktop

These are the commandlines I used in an online  demonstration recently showing how simple tools can lead to visual complexity.  From a standard bash terminal on Devuan Linux ( not Debian)  4 with ffmpeg 4.4.x ( they need to be altered for ffmpeg 5 plus as there are differences in the way the commands need to be written and wont work without that also will only work with x11 not wayland will most probably not work in windows) 

simple x11 grab using ffplay 'ffplay -f x11grab -follow_mouse centered -framerate 10 -video_size 640x480 -i :0.0'

feeding the output of ffmpeg into ffplay

ffmpeg -f x11grab -follow_mouse centered -framerate 5 -video_size 1920x1060 -i :0.0 -f rawvideo -vcodec rawvideo -pixel_format bgr0 -video_size 1920x1060 - | ffplay -f rawvideo -vcodec rawvideo -pixel_format bgr0 -video_size 1920x1060 -

The more complicated command line also allows us to play with colour space by changing pixel format .

ffmpeg -f x11grab -follow_mouse centered -framerate 5 -video_size 1280x720 -i :0.0 -f rawvideo -vcodec rawvideo -pix_fmt monob -video_size 1280x720 - | ffplay -f rawvideo -vcodec rawvideo -pix_fmt monob -video_size 1280x720 -

in this case from a colour format bgr0 to a black and white dithered format monob
or we could change the output codec from rawvideo to a strange format like tmv ( created by enthusiasts to enable video playback on the original ibm 8088 powered pc)

ffmpeg -f x11grab -follow_mouse centered -framerate 5 -video_size 1280x720 -i :0.0 -f rawvideo -vcodec rawvideo -pix_fmt monob -video_size 1280x720 - | ffplay -f rawvideo -vcodec tmv -pix_fmt monob -video_size 1280x720 -

or we could use ffmpegs displacement function

ffmpeg -f x11grab -follow_mouse centered -framerate 23 -video_size 640x640 -i :0.0 -f x11grab -follow_mouse centered -framerate 23 -video_size 640x640 -i :0.0 -lavfi '[1]split[x][y],[0][x][y]displace' -f rawvideo -pix_fmt pal8 - | ffplay -f rawvideo -pix_fmt pal8 -vf "rotate=1.23" -s 640x640 -

 FINAL WINDOWS used in demonstration

3 vertical one square rotating

normal vertical

ffmpeg -f x11grab -follow_mouse centered -framerate 5 -video_size 640x1060 -i :0.0 -f rawvideo -vcodec rawvideo -pix_fmt bgr0 -video_size 640x1060 - | ffplay -f rawvideo -vcodec rawvideo -pixel_format bgr0 -video_size 640x1060 -

hflip vertical

ffmpeg -f x11grab -follow_mouse centered -framerate 5 -video_size 640x1060 -i :0.0 -f rawvideo -vcodec rawvideo -pix_fmt bgr0 -video_size 640x1060 - | ffplay -f rawvideo -vcodec rawvideo -pixel_format bgr0 -vf hflip  -video_size 640x1060 -

vflip vertical

ffmpeg -f x11grab -follow_mouse centered -framerate 5 -video_size 640x1060 -i :0.0 -f rawvideo -vcodec rawvideo -pix_fmt bgr0 -video_size 640x1060 - | ffplay -f rawvideo -vcodec rawvideo -pixel_format bgr0 -vf vflip  -video_size 640x1060 -

square monob rotating

ffmpeg -f x11grab -follow_mouse centered -framerate 23 -video_size 640x640 -i :0.0 -f x11grab -follow_mouse centered -framerate 23 -video_size 640x640 -i :0.0 -f rawvideo -pix_fmt monob - | ffplay -f rawvideo -pix_fmt monob -vf "rotate=1.23" -s 640x640 -

Using simple tools we can convert the desktop into a complex environment to experiment with feedback and by adding video playback we can also make it even more complex and rich.

And experimenting with ffmpeg filters can take it even further.

This was made using the above tools 


 Eigenstate 2

 

Mark Fisher – ‘Ghosts of my life’, Fukuyama’s ‘End of history’ and rebooting the future with glitch art.

Note- this was the introduction I gave during a recent online discussion with Verena Voigt ( https://www.verena-voigt-pr.de/ ) a...