[{"data":1,"prerenderedAt":197},["ShallowReactive",2],{"page-by-slug-automate-everything-including-tech-demos":3},{"id":4,"title":5,"body":6,"date":181,"description":12,"extension":182,"meta":183,"navigation":184,"path":185,"seo":186,"slugs":187,"stem":188,"tags":189,"__hash__":196,"isRetrievedByPath":184},"journal\u002F2026-03-26-automate-everything-including-tech-demos.md","Automating Everything, Including Technical Demos",{"type":7,"value":8,"toc":178},"minimark",[9,13,16,21,24,32,35,39,42,52,58,68,71,75,82,88,91,95,103,107,110,113,116,119,122,125,129,154,158,161,171,175],[10,11,12],"p",{},"I recently pushed myself to create a presentation about a deep dive into the Linux Boot Process and\na non-standard Ubuntu installation technique I tend to use. I was interested in sharing the\nexperiment but also I wanted to know what making these kinds of videos was like.",[10,14,15],{},"Along the way, I made some tooling, I used some tooling, and I learnt a lot about how to do this\nbetter next time. Here I capture those ideas while they're still fresh.",[17,18,20],"h2",{"id":19},"smooth-typing","Smooth Typing",[10,22,23],{},"Right from the start, I decided that I wanted smooth typing. I wanted more personality than just\nscreengrabs of commands. I also wanted to respect my viewers time by ensuring typing accuracy. As\nfast and as good as my typing is, I hit backspace a lot.",[10,25,26,27,31],{},"So, in the interest of automating everything, I wrote a python script called ",[28,29,30],"code",{},"send_keys.py"," which\nreads stdin character-by-character, converts each character to a keystroke, and sends the keystroke\nvia virsh send-keys. I added in a randomized delay between characters and a randomized hold time and\nthe result is a fast, but passable typing of commands in my VM of choice.",[10,33,34],{},"This worked really well. With some automated startup and teardown scripts, I could nullify the VM\nand recreate it, then send \"snippets\" using this auto-typer.",[17,36,38],{"id":37},"automating-the-installation","Automating The Installation",[10,40,41],{},"What I came up with was this:",[43,44,49],"pre",{"className":45,"code":47,"language":48},[46],"language-text","presentation\n  |- 0000-Intro-and-setup\n    |- 0000-prompt-intro.md\n    |- 0001-exec-enter-for-just-try-it.sh\n    |- 0100-prompt-open-terminal.md\n    |- 0101-exec-open-terminal-and-maximize-it.sh\n    |- 0102-snippet-auto-1-sudo-to-root-terminal.sh\n    |- 0104-snippet-auto-1-install-tmux.sh\n  |- 0001-Partitioning\n    |- ...\nsend_keys.py\npresent.py\n","text",[28,50,47],{"__ignoreMap":51},"",[10,53,54,55,57],{},"Folders become \"sections\", and files are steps in each section. The folders and files are all\nprefixed with a priority number. The files then have a type which is prompt, exec, or snippet. The\nprompts were meant to be a teleprompter but I found that voicing over worked better and so they\nweren't used. They were simply displayed. The scripts with -exec- were run on the host to send\nspecial keys like CTRL+ALT+T. Finally, the heart of this was the snippets which were sections of\ntyping to be sent using ",[28,56,30],{}," to the VM.",[10,59,60,61,64,65,67],{},"My ",[28,62,63],{},"present.py"," became responsible for running each step defaulting to \"enter to continue\" to\nprogress. I quickly became tired of that and added an optional '-auto-' to the filenames. When\npresent, it indicates how many seconds ",[28,66,63],{}," should wait before executing that step. This\nallowed me to essentially automate all of the steps except for apt installs.",[10,69,70],{},"This worked really well, and I was able to automate the installation and record with OBS.",[17,72,74],{"id":73},"recording-with-obs","Recording with OBS",[10,76,77,78,81],{},"I recorded the VM with OBS. Unfortunately there is a bug with the Ubuntu Installer running with\n",[28,79,80],{},"spice"," where sometimes X11 starts, but doesn't display anything but the X cursor. The installer ran\nbecause the starting chime still showed up. I did NOT solve this, instead I just kept retrying until\nI won the race condition.",[10,83,84,85,87],{},"OBS was great for capturing. I originally did full-length captures but I quickly learnt that OBS has\na websockets api and a python library for accessing it. This allowed me to modify ",[28,86,63],{}," so\nthat OBS would stop the recording, change the filename, then start recording at the start of each snippet. For video editing, this meant that my files become the natural cut points and I didn't need to seek them out. This was a big improvement over manually seeking, and manually slicing a single long video.",[10,89,90],{},"A final improvement which I made after I had my final footage was to make the recording stop and\nthen start just before the final ENTER key was sent for each snippet. My demo involved speeding up\nthe \"typing\" portions, then freeze framing when I was ready to discuss something. This almost always\nhappened right after the snippet was done typing. With this in place, I could have saved myself a\nlot more time as I wouldn't need to manually seek to those points and snip. I could also extract the\nframe to be frozen automatically as well.",[17,92,94],{"id":93},"audio","Audio",[10,96,97,98,102],{},"Originally I captured audio using OBS and then separated them after the fact. This tended to be a\nbit more combersome. I eventually switched to ",[99,100,101],"em",{},"audacity"," and, though I can't explain it, it sounded\nbetter. Regretably I already had most of my audio recorded so I only used it for a few smaller\nfixups. When you know which parts are with audacity, you can hear the difference.",[17,104,106],{"id":105},"editing-with-kdenlive","Editing with Kdenlive",[10,108,109],{},"I am very happy with Kdenlive. It allows you to import many videos into a project bin, create\nfolders, create sequences where you order clips, shorten clips, and so on.",[10,111,112],{},"I used folders for sections, and each folder had a primary sequence. I then had a main sequence\noutside of all of the folders which combined the smaller sequences. I didn't like the main sequence.\nWhen subsequences shrunk or grew, the \"clips of sequences\" used by main were not resized\nautomatically resulting in the occasional black frame or sliced section that I had to watch out for.",[10,114,115],{},"It would have been nicer if I could tell Kdenlive \"This sequence is a concatination of these\nother ones. Deal with it\" but I couldn't find the means to do so.",[10,117,118],{},"Freezing frames was far easiest when a frame was converted to a picture, then used. Shift+R slices a clip in a sequence at that point, so you could slice the last frame and then use CTRL+drag to resize it. That frame or few would play super super slowly, which for 1 frame is a freeze frame. Mistakes were frequent though because if you didn't hold CTRL down, then you accidentally added more frames to the little clip you expected to be a freeze frame.",[10,120,121],{},"Kdenlive also allowed zooming which saved my bacon. I finished the video, watched it on my desktop,\nand was happy. I then switched to mobile and yikes. Text was far to small. I ended up doing another\nfull editing pass zooming in on parts that mattered. Fortunately the tooling made this easy. I also\nplaced boxes for focus here which worked out well.",[10,123,124],{},"I did have an issue where kdenlive started freezing whenever I viewed PNGs in it and I needed to\nclear the project cache to make it all work again. All and all, I will use it again in the future.",[17,126,128],{"id":127},"lessons","Lessons",[130,131,132,136,139,142,145,148,151],"ul",{},[133,134,135],"li",{},"Automated typing with virsh send-keys works well",[133,137,138],{},"Race conditions in the Ubuntu installer are irritating",[133,140,141],{},"Smaller clips are easier to manage",[133,143,144],{},"Be strict with file names",[133,146,147],{},"Your fonts are still too small for mobile",[133,149,150],{},"Voice-over is easier than in-situe recording",[133,152,153],{},"Slides for starting and ending work well",[17,155,157],{"id":156},"the-results","The Results",[10,159,160],{},"If you'd like to see the presentation which taught me all these lessons, you can find it here:",[162,163,168],"MarkdownMedia",{"alt":164,"className":165,"src":167},"Ubuntu The Hard Way",[166],"text-center","https:\u002F\u002Fwww.youtube.com\u002Fembed\u002FFtfMGQ8yRRs?si=hWpY4dog6KThuwrK",[162,169],{"alt":164,"className":170,"src":167},[166],[17,172,174],{"id":173},"time","Time",[10,176,177],{},"Finally, expect the first time you do this to take 10x more than you think. Although it was easy to go\ntime-blind working on this, the editing (and the rest) was very time-expensive.",{"title":51,"searchDepth":179,"depth":179,"links":180},2,[],"2026-03-24 20:00:00","md",{},true,"automate-everything-including-tech-demos",{"title":5,"description":12},[185,188],"2026-03-26-automate-everything-including-tech-demos",[190,191,192,193,194,195],"tooling","automation","demo","obs","kdenlive","virtualization","HZTlM78vQKK9OayoyGqnwjTf09bOKdRLf0ueSB1cpuQ",1775676701738]