Compressing video with ffmpeg

I was looking into what was taking up space in my Dropbox account and found some older videos, each a few gigabytes in size, where I didn’t really care if there was a small loss of quality to make them much smaller. I found some options with ffmpeg that worked pretty well ffmpeg -i input_file -vcodec libx265 -crf 34 output_file This will re-encode the file using x265. The “-crf” option specifies the amount of compression, with a range from 0-51: “0” being lossless and “23” the default. With the default I was able to halve the storage space required with negligible video loss. I upped it to “34”, as above, and while there was a bit of loss in video clarity, it didn’t matter for the video content. The result? A file originally ~ 2.4 GB in size was reduced to ~ 300 MB. ...

Nov 29, 2020 · 1 min · Kristian Golding

Errors while running Rust on Virtualbox

I got the following error when running “cargo run” on my “Roguelike” follo-along project (https://bfnightly.bracketproductions.com/rustbook) Err` value: CreationErrors([NoAvailablePixelFormat, NoAvailablePixelFormat])' I found the error was due to 3D acceleration being enabled on my Linux Mint 19-based development environment, running on Virtualbox 6.1.10. That is, make sure you have this in your vboxmanage line in your Vagrantfile: vb.customize ["modifyvm", :id, "--accelerate3d", "off"] # Disable 3d acceleration until Virtualbox team fixes it Remembering back as to why I had that line set to “on”, I think I was playing around with getting the Android emulator to work in Virtualbox, which as of 6.1 supports nested virtualization. I came close to getting that working, ultimately I don’t think it’s possible right now. ...

Aug 17, 2020 · 1 min · Kristian Golding

Configuring OSMC for high quality audio

And what I mean by that is, “default all audio output to a USB device, not unlike an O2+ODAC kit from JDS labs”. Step 1: Install OSMC, which is a Kodi-based media entertainment distribution that can run on Raspberry Pi (https://osmc.tv/download/) Step 2: Configure ALSA audio to use the USB audio device as the default (this way, I don’t always have to keep the USB device powered). ...

Jun 9, 2020 · 1 min · Kristian Golding

Pushing to Bitbucket vs Gerrit

This is totally for me in the future because I always bloody forget when switching to a Bitbucket project: Bitbucket (creates the branch remotely, ready for you to make a pull request and add reviewers): git push -u $(git remote) cool_branch_name Gerrit (creates a review against the project_ci branch, whatever that is, ready for you to add reviewers): git push $(git remote) HEAD:refs/for/project_ci

May 20, 2020 · 1 min · Kristian Golding

Server performance monitoring with "Netdata"

I run a couple of servers at work for my skunkworks projects, and I was trying to find a good monitoring tool to see how much stress I was putting them under. I already use “monit” (https://mmonit.com/monit/), running on a Raspberry Pi, to monitor whether a server (and services running on it) is there at all, but for more detailed monitoring, Netdata (https://github.com/netdata/netdata) was the killer app for me. It’s super easy to install, and once up and running you just go to :19999 to check the status. If you leave it idle for a while, it’ll stop updating (nice!), which I thought was good because it does provide a metric ton of information. The really nice thing is that because my servers host a bunch of Docker containers, I can see what *each container* is doing. Too awesome. ...

Nov 12, 2019 · 1 min · Kristian Golding

Adding existing NTFS mount to Linux Mint 19.1

I had a Windows machine that had a Vagrant setup on a different drive. When I replaced the Windows partition with Linux Mint, I wanted to have the other drive, already formatted as NTFS and containing my Vagrant workspace, mounted as /vagrant in the Linux machine. First, I found out the properties of the drive: sudo fdisk -l I found it was a device under /dev/sdb1 and formatted as type HPFS/NTFS/exFAT. Now to open the fstab file ...

Jun 17, 2019 · 1 min · Kristian Golding