-- Leo's gemini proxy

-- Connecting to jacksonchen666.com:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en

The Logistical Mess of Trying to Process a Lot of Videos

2023-11-26 14:51:57Z



Warning: Rushed blog post. Yeah.


The last time vs Now


Remember last time? Yeah this time I'm doing it for over 700 gigabytes of videos, with more specific parameters to ffmpeg and with more being added to the pile of videos.


The last time I had to process videos


Again, it's gameplay videos (because turns out I'm back to playing that game again). This time, with more specific parameters.


Goals


This time, I wanted to do the following:

Preserve 4k resolution (for text clarity)

Make the quality of the videos OK-ish but not horrible

Keep 60 fps

Use much less space than the original recording


I settled on using `-crf 29 -preset slow` to keep file sizes low and quality OK enough.


Not enough time


However, there's a major problem with `-preset slow`.


It's slow (duh). Like way too slow for me to process a single hour video in less than 10 hours.


After trying to process a single video in many weeks, I decided that purely my Macbook with maybe 8 hours of availability to process videos was not enough. I have to go farther with the amount of time available.


An idea


After some thought, I decided that I will now have to use every other computer that is available to me. Here's the list of hostnames of computers I *could* use for video processing:

imac

stupid-desktop

stupid-laptop


Computer hostnames page


Actual setup


The actual setup was a bit different.


I tried using laptop-server, but I forgot it doesn't have more RAM and ffmpeg needed 2 or 4 gigabytes of RAM for some reason. So I use it as a middleman of all the video files (using an external SSD), and as a place to hold videos while I'm away.


The computers were setup to run in a while loop, constantly going over all videos that haven't been processed yet, then processing them.


Now for the other shenanigans.


File synchronization


To get files from my SSD to the computers, I used laptop-server as an middleman with another SSD plugged in. It's actually my old 2TB Sandisk SSD before I needed to get a larger SSD for more crap.


I would transfer video the file onto the SSD plugged into laptop-server, then make the processing computers pull the video files.


I would then transfer the finished video files back onto laptop-server, then back to my actual SSD where I store my crap.


This extra roundtrip is pretty inefficient, and I have (technically) eliminated the extra roundtrip of transferring files onto the processing computers. But this middleman place is kind of used as a place to hold files before I get the time to actually grab it.


It also allows for using a single rsync command to grab all the processed videos if all of it is on the middleman. And I did use rsync for all of this file transfer thing.


If ran on LockedMac


The actual time it took to process 1 hour of video is about 12 hours, which means processing over 72 hours of video would take a long fucking time.


So processing it on my Macbook (LockedMac) would've been a major pain and would take way too long.


actually it will still take too long whatever just continue with this ok


Charging for stupid-laptop


Of course, due to resource constraints (lack of cables for charging stupid-laptop), I also had to rearrange my charging setup a little bit:

Charging brick for `f` had to be given to stupid-laptop

Charging cable for `f` was plugged into stupid-desktop

Another charging cable was provided to stupid-laptop


This was what I can do with what I had. Not much, and it will change when I have to take the charging brick (although not much and not very disruptive).


Speedrunning an install on stupid-desktop


I didn't have an OS installed on stupid-desktop. So I had to install it.


I followed my own blog post for Alpine Linux with /boot/ and / encrypted, and finished it before I had to leave to do other things. It took about half an hour or an hour.


Doing all the commands was quite manual work, so later I decided to make a script that does all of it. It's unlikely to be as robust as Alpine's `setup-disk`, but hey it works (although I haven't yet published it).


Blog post for Alpine Linux with /boot/ and / encrypted


Networking for stupid-desktop


stupid-desktop is a desktop computer. It does not have Wi-Fi, so I had to give it my Ethernet cable so it can get access to the files.


That meant for LockedMac, it would have to use Wi-Fi. Which I had experienced many problems in the past few days just trying to play games.


Storage and space management


I also had to manage the space available and used.


Each hour of unprocessed video is around 20 gigabytes. Yes, 20 gigabytes per hour. That's about 44444 kilobits per second. Very intense footage, and it makes sense given that it's also in 4k 60 fps.


I could maybe give each computer 100 gigabytes before there is concern about running out of space for processed videos. So currently, all computers have

100 gigabytes of videos to deal with.


Long-term solutions


This kind of setup was actually for the short term to process everything I had right now and quickly (hopefully).


The longer-term would be to get a computer that can handle a stupid amount of CPU transcoding crap (and other intensive stuff), then use that for my PeerTube and whatever else.


public inbox (comments and discussions)

public inbox archives

(mailing list etiquette for public inbox)

-- Response ended

-- Page fetched on Fri May 10 09:23:16 2024