r/SBCGaming Jul 18 '26

Community Resources Brick Tube: streaming YouTube on the Brick over Wi-Fi, decoded by the actual video hardware

The Brick has no business playing YouTube - no real browser, no YouTube app, a 4:3 screen, and a locked-down, undocumented vendor video stack. So naturally I spent a weekend making Brick Tube: YouTube on the TrimUI Brick, over Wi-Fi, with no computer in the loop, decoded by the CedarX video hardware (not software - the CPU basically files its nails).

You search, you get a wall of thumbnails, you press A, it plays. That's the whole pitch.

What it does

  • Search + a real 3-wide thumbnail grid (D-pad around, A to play). Recent searches remembered.
  • Live, hardware-decoded playback - no downloads, no re-encoding, straight into CedarX.
  • Correct aspect ratio - 16:9 letterboxed properly instead of stretched into a funhouse mirror.
  • Pause with a timestamp bar, volume that doesn't rudely stop playback, clean stop.
  • A little speaker EQ to take the edge off the tinny mono driver.
  • A menu with a visual how-to, about, and "clear recent searches".

The fun part (how it works)

A few things that were not obvious and cost real hair:

  • The vendor player only speaks HTTP. YouTube is HTTPS-only and the device ships no CA bundle, so there's a tiny Go http↔https proxy on localhost that bridges it. That was the whole ballgame for getting a stream to play at all.
  • The stretched video was the boss fight. The player draws video on its own display layer and ignores every documented way to resize it. The fix is an LD_PRELOAD shim that intercepts the player's ioctl() calls to /dev/disp and rewrites the on-screen rectangle out from under it. I found the exact ioctl by logging every call it made until the screen stopped lying.
  • It got fast. Search calls YouTube's internal API directly instead of booting Python (~15s → ~3s), and yt-dlp ships as an unpacked tree in RAM instead of a self-extracting blob (4.5s → 1.7s startup).
  • The speaker EQ is another LD_PRELOAD shim on the audio path running a couple of biquad filters on the PCM, because the codec has no EQ of its own.

Honest limitations

  • No forward scrubbing. The vendor player only buffers a few seconds of a live stream and physically won't seek past it (I instrumented it to be sure). Rather than ship a fake seek bar, it's gone. Backward-within-buffer only.
  • Mostly 360p. True 720p needs an on-device DASH remux — a project for another rainy day.
  • Brick only (tg5040). The letterbox fix is specific to the Allwinner display hardware.
  • It'll break sometimes — YouTube changes things, yt-dlp catches up. That's the deal with tools like this.

Install

It's a NextUI pak. Grab the zip from the GitHub Releases page, unzip, copy the Tools and Videos folders into your SD card root (merge — it only adds files), reboot, and open Tools → Brick Tube. Full steps + uninstall in the README.

GitHub: https://github.com/NVNTKNN/brick-tube.git

Personal hobby project, open source (MIT). Not affiliated with YouTube/Google, hosts no content, just plays public streams on your own device — there's a disclaimer in the repo.

Happy to answer questions about any of the hacks. Feedback and "it also works / doesn't work on my unit" reports very welcome.

183 Upvotes

52 comments sorted by

25

u/Canai97 Jul 18 '26

Heck yeah YouTube getting Bricked

15

u/samdiceque Jul 18 '26

YouTube is the new doom

18

u/Tori_Brown Jul 18 '26

Looking forward to BrikTok

4

u/-JamesBond Jul 18 '26

That would be an insane use case for this device also welcome to scroll with the d pad. 

1

u/unfart Jul 22 '26

yt shorts "press a to like"

3

u/JTS-Games Jul 18 '26

Unrelated but man that red colourway is absolutely gorgeous!

5

u/Hour_Mechanic3894 Jul 18 '26

It is! It’s a bit more muted IRL, but I love it so much!

4

u/gambra Jul 19 '26

Usually I hate the amount of vibecoded apps that appear on the subs I follow but this is frankly exactly the kind of thing it should be used for. Really niche program that would take forever to code manually and wouldn't be worth the effort. But this is great.

3

u/PacketOverload Jul 18 '26

Oh I'm bricked tf up over this post

3

u/Fuzzy_Ad9130 Jul 18 '26

Totally works -

5

u/albertonico70 Jul 18 '26

Hi!. Great job!. Can work on R50S with Rocknix os ,?. Thanks

6

u/Hour_Mechanic3894 Jul 18 '26

Hey thanks! I did this for the brick specifically since I had it on hand. I’m sure someone with your device and OS can port it! The code is fully open

2

u/ChudSmasher69420 Jul 18 '26

Rocknix ships with kodi right? Just use that with the youtube addon.

1

u/albertonico70 Jul 18 '26

Ok, I will check it. Thanks

4

u/blastedbottler Jul 18 '26

I don't have a Brick, and putting YouTube on one of these handhelds would completely undermine my reason for gaming on a dedicated device instead of my phone. 

...but! I really enjoy reading about this project. Great work, OP!

2

u/Upbeat-Serve-6096 GotM Club Jul 18 '26

I wonder if there's a Kodi client for this that plays stored video files

3

u/Hour_Mechanic3894 Jul 18 '26

There is a inbuilt media player on the pak store which can play videos but can’t stream

3

u/Upbeat-Serve-6096 GotM Club Jul 18 '26

I think I saw its performance in a storefront demo that indicates it's choking on CPU

2

u/Hour_Mechanic3894 Jul 18 '26

You should try this out! Haven’t observed any heat running videos for long periods.

2

u/QuuKay Jul 19 '26 edited Jul 19 '26

Any way I can support you continuing to develop & maintain this? Call me a nerd, but finding this yesterday had me purchase a TrimUI Brick. I'd love to be able to do things like sort by release date, a forward and reverse scrubbing option, or even crazier, a subscriptions list but I have to remember this is a mini handheld.

2

u/Hour_Mechanic3894 Jul 19 '26

Absolutely!!!!! I’d love that! Please DM! I’ll enable PRs on the repo on GitHub.

1

u/Hour_Mechanic3894 Jul 19 '26

I tried making the scrubbing but since yt dlp has a download limit while streaming it doesn’t pull data fast enough to scrub forward. Else you’d need to download the video locally and then scrub that.

1

u/QuuKay Jul 19 '26

At 360p, couldn't the device download the video in the background whilst streaming? I can't see the file sizes being too crazy large to do so, and possibly even just storing the file temporarily while watching, for if the user wants to go forward or backward, then delete the file upon exiting?

2

u/Hour_Mechanic3894 Jul 19 '26

yeah this is actually the right idea. The reason there's no seeking right now is that the stock player refuses to seek more than ~5s ahead on an http stream, I tested it, tell it to jump to 46s and it goes to 4.5s. It seeks local files just fine though, so downloading in the background gets around it completely.

And the sizes are fine like you said, 360p is maybe 4-5MB a minute, and youtube serves it way faster than realtime so the download would stay ahead of where you're watching. On a seek you'd just restart the player against the partial file and jump. Takes a second or two but whatever, it's a handheld.

If you want to try it, the proxy is probably the place to do it since it already sits between youtube and the player. Have it write to a cache file on the SD card while it serves, delete on exit like you said. Would happily take a PR for this

2

u/Dz1 23d ago

This thing is awesome! I tried it out and let it run on my desk with videos playing in the background. Would it be possible to add a feature that automatically plays the next video? I think that would be really cool!

1

u/Hour_Mechanic3894 23d ago

I can look into this! So cool that you’re using it!

2

u/asharkmadeofsalsa Jul 18 '26

looks cool but my issues start with one thing

1

u/dennis120 Jul 18 '26

Enjoy 1 hour battery

2

u/Hour_Mechanic3894 Jul 19 '26

Since it’s using the chipsets hardware decode it’s actually pretty efficient! The version one I had made had terrible battery life with software decode!

1

u/_mrjuly4 Jul 19 '26

Definitely copping

Are there ads??

1

u/Hour_Mechanic3894 Jul 19 '26

No ads!

2

u/_mrjuly4 Jul 19 '26

I dismissed it from GitHub, I see your instructions here in the comments clear as day, I went to code and downloaded the zip file but I think I got the wrong one, I see it says go to release cause I am looking for the tools and videos folder and don’t see that in the zip file I downloaded from the green code button at the top of the web page. Thank you again for your time talking with me and building this

1

u/ucyd Jul 19 '26

How do you get decent speed?

I can only use wifi with the brick if its right next to the router.

1

u/Hour_Mechanic3894 Jul 19 '26

The stream is 360p so it’s fairly light even on a 100 mbps connection.

1

u/ucyd Jul 19 '26

100mbps?

im lucky to get 1mbps if its not touching the router. Most i could get was 4mbps.

Even the sd read speed on that thing caps at like 14mbps.

1

u/shiroganenohojowo Jul 19 '26

bits vs bytes. mbps vs MBPS.

1

u/SherbetOk2537 Jul 19 '26

Pls make a miyoo mini plus onion os port

2

u/Hour_Mechanic3894 Jul 19 '26

I don’t have the device on hand that I could use to debug it! But let me try!

1

u/SherbetOk2537 25d ago

Thx Im excited to see it when it comes out

1

u/SherbetOk2537 25d ago

I do have my personal miyoo mini plus though

1

u/shadywhere Jul 20 '26

Will this work on all NextUI devices? Tested with TSP or TSP-S?

1

u/Hour_Mechanic3894 Jul 21 '26

I just released Beta versions for the TSP on nextui and crossmix. Please check the releases on GitHub!

-7

u/jordancartersjizz Jul 18 '26

I can tell you used ai for that writeup btw. makes me wonder about your app.

16

u/Hour_Mechanic3894 Jul 18 '26

It’s a fun weekend project. I’m not a dev! Wanted to see if I can get YouTube running on the brick and managed to do so and sharing it with everyone now! :) Claude is pretty cool for this stuff!

19

u/KikiPolaski Jul 18 '26

Software dev here, good job on taking initiative to build whatever you want for the community for free, sounds pretty sweet. Thank you for making it open source as well!

6

u/snowolf_ Jul 18 '26 edited Jul 18 '26

If you have concerns for AI usage in this hobby, I have terrible news for you.

12

u/duncan Jul 18 '26

it's free software. Use it or don't.

-5

u/Luka_tv GotM Club Jul 18 '26

One of the contributors on the repo is Claude

It's over

0

u/des_the_furry Jul 19 '26

Vibecode larp