Skip to content

Example of streaming from OT-2 camera? #190

Open
@arogozhnikov

Description

@arogozhnikov

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions