• 0 Posts
  • 3 Comments
Joined 1 year ago
cake
Cake day: July 1st, 2023

help-circle
  • Seconded, depending on what your goals are with transcoding, you might want to reconsider your strategy.

    Hardware encoding (with a GPU) is mostly useful for realtime transcoding applications like streaming video. There are definitely some caviats that come with the realtime performance, and you’ll find that NVENC encoded video is almost always inferior to the slower equivalent software encoded variants.

    So let’s talk codecs: While h.265 might seem like the holy grail, it is way more computationally intensive than h.264 is. In some cases the difference in encoding time will even be as high as 3-5x. Not really worth it if all you’re gaining is a slightly lower filesize.

    Your results will vary by the media you’re encoding, by your encoder quality settings, tuning and encoding speed. As a rule of thumb: slower encoding speeds equal more efficiently compressed video (a.k.a. relatively higher quality for lower file size).

    Handbrake is my choice of software for encoding video. It includes pretty much everything you could ever want if you’re not looking for niche codecs and exotic video formats.

    I find myself mostly using x264 because it is relatively fast and still provides awesome results. My encoding speed is always set to “slow” or “superslow” (not much difference for my setup). I usually set the quality by making use of the preview function in handbrake, which transcodes just a short section of the video which I use for pixel peeping and checking for any major artifacts that would ruin the content. The resulting file also provides an estimate for how large the final transcoded file will be. If you’re happy with the quality setting, you can opt to mess with the encoder tuning. There are different presets for film, animated content and such. I usually do use film tuning if transcoding live-action media.

    All this generally leaves me with pretty compact file sizes for 1080p media. And transcoding usually happens at a rate of 60-75 fps depending on the resolution. Going up from “slow” to “medium” improves fps by about 25% and increases file size by about 10%. The ideal balance is up to you.

    Advanced tips: try using VMAF (objective video quality analysis algorithm developed by Netflix) to score and compare your different encoding settings. VMAF is neatly integrated into FFMetrics, which is a GUI for FFMpeg and a couple of video analysis algorithms. I also use MPV (open source media player) with FFMpeg command line arguments for playing videos synchronized in a 2x1 or 2x2 matrix. This helps compare the results for quality.


  • You might want to consider setting up a VPN tunnel to your own network. Main benefit is that you can access your home network as if you were connected to it locally. Which makes switching between mobile data and WiFi a non-issue.

    This requires some sort of VPN server and usually a single port-forwarding rule for the protocol which your VPN software of choice uses. For the simplest default configuration of OpenVPN this means setting UDP port 1194 to point to your OpenVPN server.

    Generally, keeping things simple, there’s two types of VPN you can set up:

    • split tunnel VPN, which gives you access to your home network but accesses the internet directly.
    • full tunnel VPN, which sends all of your traffic through your home router.

    It is a little more complicated than that, and there’s more nuance to it, such as wether to user your own DNS server or not, but all that is best left to some further reading.

    I’ve setup an OpenVPN server myself, wich is open source and completely free to mess around with. (Save for maybe some costs for registring your own domain or DDNS serviced. Those are all optional though, and mainly provide convienience and continuity benefits. You can definitely just setup a VPN server and connect with your external IP adress)


  • Wow that’s a cool setup, I’ll definitely steal some ideas.

    I’m used to slinging lots of data around and one of the more helpful tools for general purpose automation has been n8n. Though it might have limited use if you’re not trying to glue all kinds of services together. I also host actualbudget to keep track of finances. Both are running comfortably in their own little docker containers.

    I’m currently looking into setting up Nextcloud and experimenting some more with presence detection for Home Assistant. I’m considering CO2 sensors, which will either tell me my home is ventilated properly, or which rooms are occupied.