Opentrons / buildroot

The Opentrons fork of buildroot for building the OT2 system. Our default branch is opentrons-develop.
http://buildroot.org
Other
10 stars 7 forks source link

Example of streaming from OT-2 camera? #190

Open arogozhnikov opened 1 year ago

arogozhnikov commented 1 year ago

Need a somewhat-live stream of what's happening in opentrons. Can be low framerate and with delay. Here is what I have so far:

I tried HLS (a simple way to get streaming that works in some browsers off-the-bat and requires only http access). But seems that OT2's ffmpeg does not provide HLS as all commands with HLS in it were reported as incorrect.

I tried using mpegts, another protocol

# This one starts streaming in tcp mode, because SSH forwards TCP, not UDP
ffmpeg -y \
    -video_size 320x240 \
    -i /dev/video0 \
    -framerate 4 \
    -f mpegts tcp://127.0.0.1:8000

# This command forwards port
ssh -R 8000:localhost:8000 <opentrons>

# This command converts TCP to UDP on laptop
socat TCP-LISTEN:8000 udp-sendto:localhost:8102

I next use VLC to connect to localhost:8102, but image is like this:

Screen Shot 2022-12-07 at 6 49 33 PM