Today's Dev #12

November 24, 2024

Well, I was expecting some sort of long post for today talking about all the cool things I did with Koto during the planned stream for today. Unfortunately, that didn't happen. Instead, everything failed and it sucked. You see, I had decided a long while back to use my Intel Arc A770 over Oculink to my Minisforum MiniPC to use AV1 encoding for streaming. That way, my AMD hardware in the MiniPC wouldn't have to spend a bunch of compute on the stream in addition to whatever I was streaming, typically coding. Otherwise, I'd risk framedrops and stuttering, or things just freezing in general. It happened back in the day when I was streaming Solus stuff on Twitch and quickly learned to limit my all-core workloads. So anyways, this Oculink-based solution "just worked". I needed to add i915.force_probe=56a0 to my cmdline (added it via grubby as well) just to make sure it was really loading, and used the i915 option enable_guc=2 as well. But no struggles, no framedrops, AV1 encoding at the perfect bitrate. Chef's kiss. Well one day, it just stopped working. What day? I have no idea. I don't stream every day or every week (my bad), so over the course of a few weeks something on my system changed and suddenly, it just doesn't work. Reinstalling a bunch of packages, intel-media-sdk, using an older kernel, using a newer kernel, nada. Thought last night it might by the dock itself, so plugged in an old NVIDIA GTX 1060 I had laying around and that showed up! So okay, I'll just yoink the NVIDIA RTX 4070 from my desktop (now just used for gaming), install the NVIDIA driver from RPM Fusion alongside the cuda bits, and I should be golden. Right? That's what I thought at first too. I had to disable Secure Boot to get the module to load and not fall back to nouveau, but it showed up in OBS Studio and I was able to configure it to be the same as what I had for AV1 on my Intel Arc. Set bitrate to 8000 Kbps. Turned off Look-ahead and Adaptive Quantization, set Multipass Mode to Single pass. Tested out with recording and hey 60fps, everything is good. Fired up the stream and immediately tanked to 45FPS. Okay I didn't hit that "go live" button yet, no problem. Stopped streaming, changed preset to P4: Medium quality, dropped bitrare to 6000Kpbs (still perfectly fine for AV1), tried again and it was 60FPS. Weird that a GPU theoretically much beefier than my A770 was struggling and the A770 wasn't breaking a sweat, but hey NVIDIA always sucked under Linux so chalk it up to that right? Cool well anyways, let's go live. Start moving around windows and talking. 25FPS. Constant buffering in the stream itself. Shit. Okay well I have one last option then otherwise I'm up shit creek without a paddle. Switch video encoder to OpenH264 so it uses my MiniPC's CPU encoder. I'll just be careful to not have too much open and ensure I don't do all-core workload of compiling and limit it. YouTube doesn't take the encoder change at all. Understandable, switching codecs would probably not go well, but it's all I had. Frames were going out but YouTube kept saying "no data". I don't think it's the first time I have ever cancelled a stream. There may have been some Solus ones from years and years ago that I may have. None that I can recall. But the Intel, NVIDIA, and YouTube gods didn't bless today. I guess I didn't pay my Intel tax (haven't bought anything after 12th gen), NVIDIA tax (bad Josh for only getting a 4070), nor did I get YouTube Premium. Mea cupla my trillion dollar company overlords, I will do better next time. Guess I'll be setting up some unlisted streams throughout the week and testing out the integrated media encoder in the AMD Radeon 780M in my minipc, at least until I am able to figure out what the heck is going on with my Intel Arc detection. Hopefully the AV1 encoder in that will be sufficient, or god forbid I have to stream it at 1080p instead of 1440p or 4K. Oh no the humanity! /s But for today, that's enough of complex technology. I think I will do some much needed pruning of my chili plants instead.
Did you know?
You can follow me on Bluesky, Mastodon, or Threads!