Image and Video Handling

Industry-specific file types and leveraging previous work and workflows from yourself and others to avoid creating new one-offs

Today’s Small, Good Thing involved a CD with MRI images from a radiologist’s office. It’s labeled “For Physicians Only,” and while I’m not a doctor, I’ve played one on IRC. The files didn’t open with the default image viewer, but their properties showed they’re all “DICOM image (application/dicom).” A quick search led me to Aeskulap – DICOM Viewer package which installed quickly & easily from standard apt repos. Aeskulap opened the MRI images and let me cycle through them like flipbook videos which I suppose is as-intended.

Small, Good Thing[1] was (re-)discovering Ubuntu’s native screencasting tool via Ctrl+Alt+Shift+R. This captured :30 of my flipping through Aeskulap images at 3840×1080 resolution. Small, Good Thing[2] was ffmpeg’s ability to crop and resize the screencast webm file and spit out a reasonably-sized gif in real-time.

ffmpeg -i Screencast.webm -vf 
"crop=iw/2:ih:0:0, fps=8,
scale=800:-1:flags=lanczos,
split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" 
-loop 0 Screencast-800w.gif

It took me a minute to get the crop where I wanted, and I grabbed the gif output params from earlier work. All-in it was less time with fewer distractions than it’d take me in Blender. It’s great and greatly-appreciated that people put so much good work into things and make it available.

By Steve McNally

Creative Builder successfully blending tech, advertising, and storytelling for global brands and startups -- I'm currently building games to drive commerce & working to change the conversation about cannabis.