Settings

Theme

Show HN: Send me an IRL message and watch it arrive

hi.benren.au

41 points by GSGBen 2 years ago · 20 comments · 1 min read

Reader

- This page is running directly on the Pico W in the stream, using microdot (but proxied out via cloudflare tunnel).

- There's a buzzer that plays a sound as well but the stream has no audio.

- There's a Pi Zero 2 W with a Camera Module 3 streaming the video. Streaming low latency video is painful. I tried mjpeg, Nginx+HLS/DASH, YouTube and Twitch. Twitch is definitely the easiest and best-performing.

- There's still a few seconds delay between sending your message and the video updating.

forgotthetimer 2 years ago

(OP, temp user, forgot to disable the HN procrastination timer)

For anyone trying to do this in the future, here's the command to stream from a modern Pi camera module / driver to twitch. IIRC I also had to install the full version of the libcamera tools to use the libav switches.

    libcamera-vid -v 0 -t 0 --codec libav --libav-format flv -o "rtmp://<twitch stream url>/<twitch stream key>" --rotation 180 --width 1920 --height 1080 --framerate 30 --bitrate 4000000 --autofocus-mode auto --autofocus-window 0.25,0.15,0.5,0.5
  • forgotthetimer 2 years ago

    Update: there's been a bunch of great messages so far, from people all over. But most importantly we've had a

        ');DROP TABLES;
  • jbit 2 years ago

    Check out the `--shutter` option for `libcamera-vid`, it allows you to tweak the camera's exposure time which might help with the screen refresh banding. `--shutter 60` sets the exposure time to 60ms, which might be a good starting point.

    EDIT: Ah, actually the unit is microseconds, so `60000` would be 60ms

    • GSGBenOP 2 years ago

      Hey thanks, this was a good catch. `--shutter 12000` fixes the screen, and is bright but not too bright.

  • GSGBenOP 2 years ago

    Update 2: The servo's gears are absolutely grinding at the moment

vachina 2 years ago

You need to increase the camera’s exposure time (integration time) and decrease the ISO. Could barely see the screen.

tamimio 2 years ago

I send it and only partial parts showed, I think the camera recording the steam is on a different Hz than the screen, out of sync, could not see it properly.

globalnode 2 years ago

your other game project 'grab n throw' looks hilarious, what made you think of that? its like a funny 3d version of pong (without stuff coming back)

  • GSGBenOP 2 years ago

    Hey, thanks! I was thinking about game ideas while stepping into the shower one day (where all great ideas are born), and "throwing people in a first-person view might be fun?" came across my mind. I mentally fleshed it out a bit, and wrote it down. When the idea I was already working on turned out to not be fun, I shelved that and started working on this instead. When I prototyped the basic throw feel and it already felt fun, I decided to run with it.

    • globalnode 2 years ago

      having them fall down with all that ragdoll physics is the best part, also crashing into crowds like bowling balls. anyway, best of luck with it all, seems like a really original and entertaining idea.

gus_massa 2 years ago

Should I see in the video the text that I had sent?

I see only the hand moving.

  • forgotthetimer 2 years ago

    Yep, it should show on the screen but unfortunately the camera refresh rate is out of sync with the screen's refresh rate so it's a bit hard to see. I need to read the datasheet again and drop the screen's refresh rate - I tried adjusting the camera's instead but it was never quite right.

    • gus_massa 2 years ago

      Can you cheat and just repeat the same letter a few times, like "Hello!!!" -> "HHHeeellllllooo!!!" or it shows a dark frame between leters?

      • forgotthetimer 2 years ago

        Getting the data onto the screen is fine, and IRL I can't see any flicker, but the OLED screen itself is apparently refreshing at something like 107 or 133 Hz.

        • liminalsunset 2 years ago

          One way to potentially resolve this is to place the setup in a darker place and/or add a piece of tinted transparent material in front of the camera. The camera will automatically adjust the shutter speed (not the frame rate) because of the reduced light to 1/30 or so which will allow more of the screen to be captured.

    • tamimio 2 years ago

      Ah, just seen your comment, try to use obs and adjust the rate from there before streaming it.

averageRoyalty 2 years ago

Ooh, a .au. Don't see them often in the wild.

Down now, but sounded interesting!

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection