Skip to content

lk cli: Try to restart publishing if track unpublished #668

@haffi-mazhar-oxa

Description

@haffi-mazhar-oxa

When using lk cli to publish a stream from a socket, it could try to republish the track for X seconds/minutes if the stream stops and starts again. Currently, it just logs out "unpublished track" when the tcp stream stops.

Steps I used:

  1. Start a gstreamer pipeline to tcp port
  2. Publish to livekit from port
  3. Confirm video is coming through
  4. Stop the gstreamer pipeline
  5. See "unpublished track" event log in the lk cli logs
  6. Restart gstreamer pipeline

i.e

GStreamer:

gst-launch-1.0 videotestsrc pattern=ball ! clockoverlay font-desc="Sans, 36" ! video/x-raw,format=I420,width=640,height=480,framerate=30/1 ! x264enc key-int-max=10 ! h264parse config-interval=1 ! video/x-h264,stream-format=byte-stream ! tcpserversink host=127.0.0.1 port=5004

Lk:

lk room join --api-key={key} --api-secret={secret} --url={lk_url} --identity=video-test --room test-room --publish h264://127.0.0.1:5004

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