Tuesday, 24 August 2021

But what is a desktop ?

 But what is a desktop ?


 
A lot of what I do at the moment is based around online collaborations with Format C ( https://formatc.hr/about/ ) Of which I am an associate member and specifically around a sub-project of Format C - medialab which at the moment is focused on a project called Suda https://formatc.hr/medialab-2021-diwo/ 

The previous post was about a script I've been working on called Mantissa which itself came out of ideas and discussions in Medialab which then fed back into the work we are doing in Medialab which led me back to discussions I've been having with myself about the nature of the computer desktop and what it actually is. So the process of making the script and showing the script in operation became a feedback loop in itself.

Mantissa itself doesn't do anything that other scripts and programs don't, what I perceive as broken when mantissa is running isn't broken, the scripts work mostly as I intended , as a self perpetuating feed back loop using the 'desktop' space as input via two cameras that act as observers of what is going on in a perpetually changing and evolving glitch via ffmpeg displacement. But it is very rigid , far more fun to start to interact with the process and move windows about and create feedback windows which follow the mouse around say by using ffplay in this way 

ffplay -f x11grab -follow_mouse centered -framerate 10 -video_size 640x480 -i :0.0

Which leads me to this:


Why ? Feedback loops are essentially generative and what they create is often unexpected , depending on the elements I bring up or delete, open or close. It escapes the trap of looking for material to make glitch art from by becoming the process through which glitch is created in real time. And more than that it becomes an arena to play within outside the formal office space bounds of the gui based operating system or what we expect from video play back. If i use what i would usually consider to be a finished work as the basis for experimenting in this way I can stretch the work beyond the bounds of where I would have left it before ( this is an excerpt from a longer work):


 

Obviously we have, as an audience and as artists , been here before in different ways and I would be remiss if I did not mention or link to Jodis 'my%desktop' from 2002 here https://www.youtube.com/watch?v=CPpUQQ7vMBk  and further information here and here

 


 

 


Wednesday, 28 July 2021

Mantissa - Self capturing displacement shell-script

 This a shell-script I've been working on for a few days , it still needs a lot of tweaking so as presented this is just the rough version , but it does work , I'll post a video of it working on my peertube channel today and add a link later. And its later so heres the link https://tube.tchncs.de/w/1jrcqpHKgzg2AdafJ6upzz

What does it do ? The script first calls two web cams via stub scripts, the first at 1280x720 the second at 960x540 , placed in the centre of the screen. Its important to state that this is customised for a 1600x900 resolution widescreen monitor , and I've customised where terminals etc pop up and stay resident on that basis to leave the 1280x720 window in the middle of the screen clear for display and capture , you'll notice there's a third terminal called which runs the recording script which I use in conjunction with xdotool to maintain its focus. 

Once all that is running the cameras run continuously , both have a maximum resolution of 640x480 but running them via ffplay allows me to change that and that process gives some nice glitchy effects . The capturing section of the script first creates a seed file then moves to a loop until halted which takes the seed file and applies it in a loop to the video captured in real time , but always a step behind and using the real time capture as an input for a displacement function , so the displacement map created becomes more and more glitched out as the script continues , it also saves the files it creates to a secondary folder , so if you attempt to use this script you will need to change some values to reflect that and the size of your screen - xwininfo is your friend

All this on parabola running on a Dell 9010 with built in graphics , a 250gb ssd, 8gb ram and two playstation 3 cameras with no modifications ( though it runs with my circuit bent cameras quite well ) .

( you need the main script and two sub scripts in the same folder for this to run correctly )

Main script (mantissa.sh)

#! /bin/bash
# Note this works on 1600x900 res screen adjust win geometries by grabbing with xwininfo
i=0

lxterminal --geometry=17x24+0-32 -e ./mantissacam0.sh
sleep 10
lxterminal --geometry=17x24+0+0 -e ./mantissacam1.sh
lxterminal --geometry=17x24-0+0
sleep 30

# Grab seed file
xdotool mousemove 1525 6
xdotool mousedown 1
sleep 1
xdotool type "recordmydesktop -x 161 -y 112 --width 1280 --height 720 --v_quality 30 --overwrite --no-sound --on-the-fly-encoding -o mantissa-$i.ogv"
sleep 5
xdotool key Return
sleep 30
xdotool key ctrl+c
sleep 1

#save seed file
ffmpeg -i mantissa-$i.ogv -c:v libxvid -q 23 /home/crash-stop/mantissa/mantissa-seed.mp4

#main loop

while true
do
((i++))

#sleep 2
#get window corners and window size with xwininfo
xdotool mousemove 1525 6
xdotool mousedown 1
sleep 1
xdotool type "recordmydesktop -x 161 -y 112 --width 1280 --height 720 --v_quality 30 --overwrite --no-sound --on-the-fly-encoding -o mantissa-$i.ogv"
sleep 5
xdotool key Return
sleep 30
xdotool key ctrl+c
sleep 1

#ffmpeg -i mantissa-$i.ogv -c:v libxvid -q 23 /home/crash-stop/mantissa/mantissa-$i.mp4
ffmpeg -i mantissa-$i.ogv -i /home/crash-stop/mantissa/mantissa-seed.mp4 -lavfi '[1]split[x][y],[0][x][y]displace' /home/crash-stop/mantissa/mantissa-$i.mp4
mpv --geometry=1280x720+161+112 /home/crash-stop/mantissa/mantissa-$i.mp4
cp /home/crash-stop/mantissa/mantissa-$i.mp4 /home/crash-stop/mantissa/mantissa-seed.mp4
done

Subscript 1 (mantissacam0.sh)

#! /bin/bash

ffmpeg -i /dev/video1 -f rawvideo -vcodec rawvideo -pix_fmt yuv420p -s 960x540 - | sed 's/f/18/g' | ffplay -f rawvideo -vcodec rawvideo -pix_fmt yuv420p -s 1280x720 -

Subscript 2 (mantissacam1.sh)  

#! /bin/bash
ffmpeg -i /dev/video0 -f rawvideo -vcodec rawvideo -pix_fmt yuv420p -s 960x540 - | sed 's/f/18/g' | ffplay -f rawvideo -vcodec rawvideo -pix_fmt yuv420p -s 960x540 -


( Notice that the two subscripts also glitch the output of the two webcams using sed - obviously you can either remove that or change the values to alter effects )

Tuesday, 6 July 2021

Install your freedom


TWM running on Parabola 


 
* April 2022. Note this guide is now woefully out of date. Recent changes to Parabolas install media , including the removal of the Lxde systemd iso image ( which was published in 2019) mean that the best way to install Parabola now is via the command line installer images on the parabola website which is more akin to doing a simple Arch Linux install. I will update this page once I've written a fresh guide. It is possible to use the guide I wrote below pre April  to get a fully running updated system but you end up with a system which has a few quirks that needs a lot of attention and removing a lot of out of date packages. 
 
The install guide I followed was the one on Parabolas own wiki here https://wiki.parabola.nu/Installation_Guide  but you will hit snags along the way due to keyring issues which I suggest you update before you get into the main installation proper - I used this as a guide to what was going on ( though its a discussion about the openrc version which is what I wanted to use but ended up for sanitys sake starting with the systemd version though I'm kind of opposed to systemd on philosophical grounds) https://labs.parabola.nu/boards/10/topics/1034
this is the important bit which updates the keyrings which seems to be the constant problem Parabola ( and Arch seems to have )
 
pacman -Sy archlinux-keyring parabola-keyring
and as it says lower down the same thread you may want to edit our old friend /etc/pacman.conf to 
SigLevel = Never 
 

Which should iron out any other errors - but as it doesn't say in the guide you will also want to do pacstrap /mnt nano to install nano so when we finally get to altering that file and later on in the chroot environment during the installation phase we have something to use. 

Installing everything will only give you a basic system without working networks or a graphical login or desktop environment so I would suggest before chrooting to the final stage   use pacstrap /mnt to install networkmanager network-manager-applet dhclient lxde lxdm wpa_supplicant sudo ( cos you don't want to have to keep using the root account ) and a few other file tools like ntfs-3g udisks2 pmount ( for that handy usb stick mounting routine ) and maybe just look at a few of the arch install documents to see if there's anything you might have missed this is the official arch wiki https://wiki.archlinux.org/title/Installation_guide you might be able to use this helper script but I didn't so I can't speak to its efficacy https://wiki.archlinux.org/title/Archinstall . And finally maybe after install add your user to the sudoers group via this guide - https://wiki.archlinux.org/title/Sudo and remember if you mess up and find something missing which stops you moving on to getting a fully working system you can always boot from the install medium and chroot into your installation ( the install medium includes networking so thats nice) and add in what you've missed .

Also take note that by default it seems none of the system services like networking or graphical login which are controlled via systemd are turned on by default so you will have to turn those on via the command line ie 'systemctl enable NetworkManager.service' for instance for the network manager to run at boot - handy if you want to say update your system or install packages, why isn't this on  by default, only the arch linux people can say, again it just seems like wilful perversity - it was so much easier using the live lxde iso .
 
As I say this is a quick guide to some of what I had to do to get the system up and running - I used a lot of the arch linux guides and made a lot of missteps because frankly speaking the Arch linux way of doing things is, coming from a Debian based distro  user perspective , perverse and once this project is over I'll be swapping to using Gnuinos which although on the fsf waiting list and not endorsed yet is way better and easier to use and by default doesnt use systemd. find Gnuinos here https://gnuinos.org/
 
 
* Note updated November 2021 as recent changes have led to a slight alteration in methodology described below for installation.
 
One of the many things lost after the release of Win 95 and earlier mac os versions was the focus on understanding computers rather than merely using them , we became users , customers of an ecosystem built up on selling us things that 'Just worked' rather than explorers working out how to do things for ourselves. This is no more  obvious than in the desktop paradigm of Win 95, mac os and later Android and ios where  everything sits within virtual folders, a simulacrum of a real office environment which is in effect what the computing paradigm became, a virtual cubicle to contain and constrain our thoughts and ideas.     This desktop as virtual cubicle paradigm can trap us within a way of working and thinking , yes I can change the desktop theme or the shape of the icons and cursors but what If I want to strip away layers of the Gui and say work without a taskbar or redesign the default font completely what if I want to step outside of my cubicle and do something different , something more exploratory.

 Over the last week to maintain compatibility with a project I'm collaborating on with Medialab , a project of Hacklab01 (more info here https://hacklab01.org/medialab ) I had to install a version of Linux that I hadn't used before - Parabola . Why Parabola? A lot of what I do and a lot of what Medialab works around are 'critical digital art creation' which naturally leads to the   ideas of open source software and the possibilities that it has.  Primary amongst that becomes the idea of libre-software as opposed to just open-source software. The difference is important , as the FSF states :

"As our society grows more dependent on computers, the software we run is of critical importance to securing the future of a free society. Free software is about having control over the technology we use in our homes, schools and businesses, where computers work for our individual and communal benefit, not for proprietary software companies or governments who might seek to restrict and monitor us." 

I've talked before about how the software I choose to use, and the uses I put it to are inherently political, but its not just the software I use it's also the operating system and the hardware I run that operating system on. 

Libre-software is fully free of licensing impediments or proprietary blobs. In the case of an operating system, which might require blobs to run things like wifi cards or graphics cards which are non-free - Parabola includes none of those things.  The FSF ( free software foundation here ) definition of what a libre operating system is :

" Free distributions (or “distros”) of the GNU/Linux system only include and only propose free software. They reject non-free applications, non-free programming platforms, non-free drivers, non-free firmware “blobs”, and any other non-free software and documentation. If they discover that by mistake some had been included, they remove it. "

Why is that important? If we want to work together its easier if we all speak the same language ie use the same or similar tools and the opportunity cost for anyone wanting to replicate or expand on what we do to be the same or similar ie as low as possible - art should be inclusive regardless of economic circumstances and  one of the mains ways to keep this inclusivity is to only use Libre software and as close as possible to Libre hardware or at least hardware that is serviceable. The point of Libre software is that it gives back our sense of the exploratory and control over what and how we produce   .

So lets download and install Parabola then install TWM , a desktop environment that  is unlike most of what we are familiar with today . The following guide is not my work , most of it was worked out By Vedran Gligo and the idea of using the TWM window manager comes from Dina Karadzic , one of the things that using libre software fosters is collaboration and so this a collaborative effort along with ideas taken from the Parabola community on reddit. 

NOTE - this is not a beginners guide , it assumes a working knowledge of Linux usage , hard drive partitioning, familiarity with using a command line   and a basic knowledge of the hardware you are using , though linux is free and libre-linux doubly so it requires you are willing to get your hands dirty .  If you haven't used linux yet I'd advise starting with Linuxmint, Debian or Manjaro just to gain a working familiarity with installing and using a linux desktop.

Download Parabola here - https://www.parabola.nu/ then read the installation guide here https://wiki.parabola.nu/Installation_Guide , its essential to read the installation guide and for beginners new to this I'd recommend downloading the Lxde image here as it gives a live distro to boot into and an easy installer program called calamares - I'd choose this one which is for 64 bit computers https://wiki.parabola.nu/Get_Parabola#Parabola_SystemD_LXDE_ISO, don't choose anything but that as the openrc images are known to be broken at this time and the cli net-installers involve a lot more specific knowledge ( if you can install arch via command-line you might get by but the issue that strikes is trickier to deal with from the command-line unless you really know what you are doing) 

Just as a by the by , I've installed this on a couple of Thinkpads , a T61 and an X200, both have had the bios whitelists removed , which is important as you will probably need to change out or source a libre distro  compatible wifi card, this isn't kansas anymore and some hardware that doesn't have opensource or libre drivers just won't work ( to get parabola to work on my dell optiplex 9010 I had to remove the Radeon graphics card and just rely on the inbuilt Intel one ) you can find a list of such things online but this is a guide to some of the issues you might encounter and what to look out for when deciding to use libre distros https://h-node.org/

So I'm going to assume you've downloaded and burnt parabola to cd or usb and are booting up the distro , you've followed and read the installation guide you've got to the lxde desktop and hit the installer button and have managed to follow it through and installed it to your computer , rebooted and logged in to your user account - this is where I hit the snag that took a couple of days to work out and without Vedran Gligos' help I would have given up or gone completely mad , as I said this ain't Kansas anymore . 

The first thing I do when I'm trying out a new distro is hit the package manager ( in Parabolas case the very fetching octopi and the command-line default pacman ) and that's what I did , to be met with some seriously scary error messages about keyservers and such like , which even using parabolas own troubleshooting guide  I could not get around. For what its worth the troubleshooting guide which in normal circumstances would have been all I needed is here - https://wiki.parabola.nu/Pacman_troubleshooting

Parabola like archlinux ( on which parabola is based )  validates its packages with pgp keys , and uses keyservers to check that these keys are still valid , so in parabolas case the keyserver that validates everything has gone offline and thus you have to do a bit of hacking around to update and install anything new not provided by the initial install which involves altering configuration files with root or superuser  privileges .

Step 1 ) open a terminal and do either ( depending on preference)

sudo leafpad /etc/pacman.conf

or 

sudo nano /etc/pacman.conf 

look for the line  'SigLevel    = Required DatabaseOptional'

comment that out and add in  a line saying 'SigLevel = TrustAll'

save and close that file then do 

sudo leafpad ( or nano) /etc/pacman.d/gnupg/gpg.conf

and add this line 'keyserver hkp://keyserver.ubuntu.com'

save and exit 

This is the important bit as this changes the default keyserver that the parabola package manager pacman looks to to validate keys .

step 2) Then from a terminal run these commands in sequence:

sudo pacman -Scc
sudo pacman -Syy archlinux-keyring archlinux32-keyring archlinuxarm-keyring parabola-keyring
sudo pacman-key --init
sudo pacman-key --populate archlinux archlinux32 archlinuxarm parabola
sudo pacman-key --refresh-keys

After the last command above you still get an error message but press on , all is well .  

* this is the first change to original guide - previously I had recommended that you 're-open /etc/pacman.conf and uncomment the line you commented out and comment out the line you added in ( you might need it at a later date !)' , leave the alteration to /etc/pacman.conf in place until AFTER doing step 3.

Step 3) Then from the terminal again type in 

'sudo pacman -Syu' - hit enter and watch your computer automagically retrieve packages and update itself 

Step 4)  Once that's all finished panic again as you will still get error messages  but all is not lost , you just have to open octopi and in the search bar type in linux-libre which pulls up the kernel , and re-install that. 

*Alteration to original guide . At this point Had recommended rebooting at this stage - but now we have to as well as reinstalling linux-libre we must also search octopi for parabola-keyrings and reinstall those ( its an updated keyring from October of 2021 which  might have led to the error I encountered which led to the rewrite of this guide ) 

after doing all that succesfully we can now go back  and 're-open /etc/pacman.conf and uncomment the line you commented out and comment out the line you added in ( you might need it at a later date !)'

So now with fingers crossed reboot and your computer should bring you back to the login screen . Ive done this at least three or four times in the last week and each time its worked , so I think we are golden. You should now have a fully functioning parabola linux system. 

Why step 4 ? the package manager installed and updated linux-libre kernel when I did 'sudo pacman -Syu '  - wellll It was explained to me that the update process above breaks the hooks the kernel needs to do things like updating grub etc so to avoid having to reboot from an emergency disk and chroot into the system if we re-install the kernel using octopi before rebooting it repairs the errors created by the initial update which fixes the keyserver issue - hopefully you won't have to do this again , even if the kernel is updated at a later stage .

This took a few days for Vedran to work out by which time I'd almost forgotten why I was wanting to use this system in the first place. 

Was all of this heartache and hair pulling worth it ? I'd have to say yes , because now I have system which is lean, powerful and actually useful plus now I can try out ideas before committing them to the main project ( which runs on an online version of Parabola )  knowing that if they work on this computer without breaking it they will work on the remote computer , and that's the point - compatibility and reproducibility all from free and libre software .

So with that out of the way I can now install what I came here for which is a window manager called TWM and compared to the above installation is a breeze. But why TWM ? Its low on resource usage ( I have this whole distro running on my T61 which was built in 2009 and it just works well ) aaaand it looks and behaves unlike Windows xx or Mac os xx or ios or android - its easily customizable from a small and simple configuration script , one of the great things about linux is that it gives you back the power to alter scripts and files easily, and in my case explore the edges of what can be done such as these :

Twm running before starting xsetroot

Twm after running xsetroot below !




Just by adding a few simple programs like xsetroot and running them the desktop becomes a visual environment or paintbox leaving trails after opened windows and composing itself as I use and open windows .

How to install TWM ? theres a good guide here https://wiki.archlinux.org/title/Twm and there some good guides to basic .twmrc configurations here http://www.xwinman.org/








 

Monday, 14 June 2021

Quick and dirty guide to using ffglitch/ffgac in Windows 10




This post is in response to a question posted in r/glitch_art about using FFglitch in windows 10 . Now I generally use linux exclusively but I've become aware over the last few months that I have to be a bit more inclusive, not everyone wants to run linux for one reason or another and I'm trying to port some of my examples to windows for that reason. 

What is FFglitch? Ramiro Polla's FFglitch is basically the best tool for datamoshing there is, Kaspar Ravels tomato v2 is a beautiful and simple tool but it has limits , FFglitch is more complicated to use but gives much more fine grained control of the process. Where to get it - here https://ffglitch.org/ it comes in Linux , Mac and Windows flavors Download it and unpack it, there's no need to install it, as its a standalone binary, but to use it we will need to take a few steps first.

First things first, download notepad ++  to alter scripts and settings with ffglitch its easier if you have a good editor - I recommend either geany or notepad++ so download and install that first if you havent got it installed already https://notepad-plus-plus.org/

FFglitch is essentially a command line tool , and this is where windows sucks , powershell is okay but we need a bit more power and some unix like tools which is where the git bash terminal comes in ( I've written about that before in a previous post ) you want to install this from here https://gitforwindows.org/  and follow the onscreen prompts carefully , generally its okay to go with the default prompts except where it asks for your default editor  - I recommend you tick the box that says notepad++ . Once its installed you will notice if you right click in a folder you now have an option which says 'gitbash here' - and this is what we are after, bash is a terminal like powershell but way more powerful, more of that later.

Optional - if you want to use python scripts, though the developer Ramiro Polla states he is moving away from those in favor of js there's a lot you can do with those scripts ( see Jo Grys posts in the facebook group glitch artists collective - tooltime  and also Kaspar Ravel and Thomas Collets work on implementing the game of life as motion vectors  with ffglitch )  . Sooo download and install chocolatey from here https://community.chocolatey.org/ then after that open powershell as adminstrator and do this to install python - choco install python --pre

so all of that out of the way I'm going to walk through the example I was actually asked about - the move sink and rise example that Ramiro Polla has on his website . First things first we need to change the format of any file we are using so it suits ffgac ( the new version is called ffgac not ffglitch ) which handily there is an example script to do just that - now one of the misconceptions people have on using ffglitch / ffgac is that they can use standard ffmpeg to prep their files and this leads to a further misconception which leads to trying and failing to use ffglitch / ffgac - and I think that explains the renaming - ffgac is a standalone version of ffmpeg designed to be used with this set of tools , all the scripts reference it and not any other version you may have installed - this is why we work within the ffgac / ffglitch directory . 

so prep your file with the script Ramiro Polla has on his website but modified for use with windows - open notepad++ and copy pasta what is  below  from  #!/bin/bash to done , save that script in the folder where you have ffgac as ffgacprep.sh 

#!/bin/bash
mkdir mpeg2

#change mp4 below to whatever the file extension your source file has
for I in *.mp4;
  do
             ./ffgac.exe -i "$I" \
             -an -vcodec mpeg2video -f rawvideo \
             -mpv_flags +nopimb \
             -qscale:v 6 \
             -r 30 \
             -g 90 \
             -s 1280x720 \
             -y mpeg2/"${I/.mp4/.mpg}";
  done
 

open git bash terminal in that folder ie right click and click on Git bash here - the terminal window will appear - before we can use that script we have to make it executable so in the terminal type in exactly this  ( without quote marks) '  chmod u+x ffgacprep.sh  '  - if all goes well there will be no error messages and the command line returns . so to prep your file now type in exactly in the terminal :

 ./ffgacprep.sh 

The script will create a folder within that folder called mpeg2 and output your file all ready for the next stage move it into the main ffglitch folder .

You could also use the command line commands shown on the website. So in git bash terminal and with your video in the ffglitch folder copy and paste that command into git bash terminal ( to paste into git bash terminal press shift and ins ) - change where it says input file to the name of your file - leave temp_file.mpg as your output file name unless your working on a lot of files and alter the first part of the script from ffgac to ./ffgac.exe ( cos we are working on windows and not linux ) so it will look like this ( but as one long line) - using the left and right arrow keys to navigate through the command and change it .

./ffgac.exe -i input_file -an -mpv_flags +nopimb+forcemv -qscale:v 0 -g 1000 
-vcodec mpeg2video -f rawvideo -y temp_file.mpg

Go back to the ffglitch website and go here https://ffglitch.org/2020/07/mv.html look for the section about halfways down where he says ' With all that being said, here’s the script that we will be using' open notepad++ and copy the script and save it in the ffglitch folder as  'mv_sink_and_rise.js' (without the quotes ) .

Now for the magic run the command he has on his website but for windows we change it to ;

./ffedit.exe -i temp_file.mpg -f mv -s mv_sink_and_rise.js -o glitched_file.mpg

copy and paste ( or type !) the above into git bash terminal and press enter :

Once that has run succesfully look for the file in the ffglitch folder and play it!

Once we have this running and you are happy with this process go back to Ramiro Polla's tutorials and start messing about with values in the mv_sink_and_rise.js script.


  

 

 

 


 



 

 

 


Friday, 11 June 2021

Black and white ( The future is 1 bit)


  A while back I became interested in dithering - an early technique used for creating grey scale images in the days when computer monitors, and sometimes computers, were only black and white - think early Macintosh or that portable black and white TV you used for your ZX81 or any of the early home computers. Very similar to newspapers grid of dots dithering has a certain aesthetic appeal - there's a wonderful article here on its roots and links to modern processing sketches https://www.evilmadscientist.com/2012/dithering/ but that doesn't fill my requirements these are great but what if I want to turn a whole video into black and white ( not greyscale) rather than just capture it live . Something like this :

 


There's a simple way to do this in ffmpeg using this command - 'ffmpeg -i Input_1280x720.mp4 -f lavfi -i color=gray:s=1280x720 -f lavfi -i color=black:s=1280x720 -f lavfi -i color=white:s=1280x720 -filter_complex threshold output.mp4' - which gives us this:


Although I like this - its not quite what I was looking for . So I looked for some alternative way using ffmpeg to create dither but none of the methods I found gave me that look and feel . Then I thought well could I just convert the video to stills and use an old format like pbm and researching this I found that the netpbm library ( find netpbm page and links here ) has a function for creating atkinson like dither.

 Most linux distros come with the netpbm library and that gives us  different ways of dithering an image but the one I was most interested in - pamditherbw ( which has the setting for Atkinson dithering) didn't seem to be included which sent me down a rabbit hole of finding out why . To get this function you have to uninstall the netpbm that comes with your distro then download the deb file from here and carefully follow error messages that the installing with gdebi process throws up ( there are a couple of packages that need to be uninstalled and another that needs to be installed as well as the netpbm package ) - I know this sounds a little vaguer than I usually write but its easy enough when you see the process and follow the prompts. 

So having that installed I could now run the script I wanted to run which gives me this, best viewed full screen ( I'll post the script at the end )


This is the script : caveats - you must remember to add file extension when answering 'what do you want to name the output file' ie mp4 - if using a different codec other than h264 you may wish to alter the ffmpeg statement at the end . It creates a lot of files when its working , so you might want to use a scratch disk ( I did a fifty minute video which created 80000 plus files here but it does clean up after itself ie removes the stills before exiting.

#!/bin/bash
#to get pam ditherbw to work uninstall pkgmanagers version of netpbm and download and from here https://sourceforge.net/projects/netpbm/files/
#more info on pamditherbw here http://netpbm.sourceforge.net/doc/pamditherbw.html

echo -n "File to work on ? : "
read n

echo -n "What do you want to name output file ? : "
read z

echo -n "Framerate as a number between 1 and 30 ? : "
read m

echo -n "crf value for final video ? : "
read o




# convert to pgm

ffmpeg -i $n -vf fps=$m image-%05d.pgm

i=0
find . -type f -name '*.pgm'|while read filename; do echo ${filename} ;
((i++))
# try different random seeds
  pamditherbw -atkinson -randomseed 8  ${filename} > $i.pam ;
  mogrify -format pbm $i.pam
  mv "$i.pbm" "$(basename "${filename}" .pgm).pbm"
  rm $i.pam
 
  done
 
 
 
  rm *.pam
  rm *.pgm
 




ffmpeg -i image-%05d.pbm -vcodec libx264 -r $m -crf $o  -pix_fmt yuv420p $z
#ffmpeg -i image-%05d.pbm -r $m -c:v hevc -b:v 2M  $z

rm *.pbm


#ffmpeg -r $m -i %d.jpg -i $n -map 0:0 -map 1:1 -c:a copy -c:v libx264 -tune stillimage -crf $o -r 24 lol.mp4





Friday, 4 June 2021

Hex editing Tarot cards.


 

I don't often make gifs, this one was made back in 2014 from the following images and a few more . The source images were black and white versions of tarot cards which I'd found online and which as far as I know were published under a creative commons license. The technique I used was one I talked about in a previous blog post 'Heads and tails' which gives this cut up and bloccy effect , especially when using black and white images as a base .

 
 


 

     Why the Tarot though ? Throughout my life as an artist I've come back to the tarot time and again as there is something about the imagery that tugs at the subconscious. A training as a painter ( My degree is in fine art painting) taught me about looking for a hint or a suggestion of the other , the thing within a painting that needs to be brought out , a process of listening and interaction in the same way that reading the tarot requires listening to what the cards are suggesting rather than forcing my will or ego upon them. I also apply that philosophy to what I make now, when I'm looking at video or images I'm making I try to listen to those ticklings from the subconscious and allow that to guide me .

You can see the full set here  on my shiny newish Tumblr blog .

 


Monday, 31 May 2021

There is nothing - The wrong in partnership with https://www.canal180.pt/

Very excited to announce that  my long form work 'There is nothing' will be showing in real life via The wrongs partnership ( https://thewrong.org/ ) with https://www.canal180.pt/ 

This is a sample from that work here - https://tube.tchncs.de/videos/watch/23019241-b83e-4a7b-847f-ffc6e8695735


 

Open source software: A realistic and pragmatic approach

Open source software: A realistic and pragmatic approach Glitch art, more than most disciplines, asks questions of the software and hardware...