Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no video show #41

Open
shoyu666 opened this issue Dec 18, 2024 · 9 comments
Open

no video show #41

shoyu666 opened this issue Dec 18, 2024 · 9 comments

Comments

@shoyu666
Copy link

shoyu666 commented Dec 18, 2024

hi @davidzhao
This is a very useful project ; hope to continue updating it

Thanks

env and step

os: macbook pro (m2)
go1.22.5 
livekit:version": "1.8.0
lk version 2.3.0


go install github.com/livekit/gstreamer-publisher@latest

run cmd:
gstreamer-publisher --token $LIVEKIT_PUBLISH_TOKEN \
    -- \
    videotestsrc is-live=true ! \
        video/x-raw,width=1280,height=720 ! \
        clockoverlay ! \
        videoconvert ! \
        x264enc tune=zerolatency key-int-max=60 bitrate=2000 \
    audiotestsrc is-live=true ! \
        audioresample ! \
        audioconvert ! \
        opusenc bitrate=64000

i can see participant join room,but no video show 



cmd output


2024-12-18T13:27:26.660+0800    INFO    gstreamer-publisher     gstreamer-publisher/publish.go:212      found source    {"mimeType": "audio/x-opus"}
2024-12-18T13:27:26.660+0800    INFO    gstreamer-publisher     gstreamer-publisher/publish.go:212      found source    {"mimeType": "video/x-h264"}
2024-12-18T13:27:27.881+0800    INFO    gstreamer-publisher     [email protected]/localparticipant.go:130       published track {"name": "", "source": "CAMERA", "trackID": "TR_VCjs5pL959PjSK"}
2024-12-18T13:27:27.886+0800    INFO    gstreamer-publisher     [email protected]/localparticipant.go:130       published track {"name": "", "source": "MICROPHONE", "trackID": "TR_AMLzJjyXi4ZkX7"}

participant info (from livekit service)

{
"sid_": "PA_5zZgZzsKx3TE",
"identity_": "test3",
"state_": 2,
"tracks_": [
{
"sid_": "TR_AMLzJjyXi4ZkX7",
"type_": 0,
"name_": "",
"muted_": false,
"width_": 0,
"height_": 0,
"simulcast_": false,
"disableDtx_": false,
"source_": 2,
"layers_": [],
"mimeType_": "audio/opus",
"mid_": "2",
"codecs_": [],
"stereo_": false,
"disableRed_": false,
"encryption_": 0,
"stream_": "camera",
"version_": {
"unixMicro_": 1734499648069006,
"ticks_": 0,
"memoizedIsInitialized": -1,
"unknownFields": {
"fields": {}
},
"memoizedSize": -1,
"memoizedHashCode": 0
},
"audioFeatures_": [],
"audioFeaturesMemoizedSerializedSize": 0,
"memoizedIsInitialized": -1,
"unknownFields": {
"fields": {}
},
"memoizedSize": -1,
"memoizedHashCode": 0
},
{
"sid_": "TR_VCjs5pL959PjSK",
"type_": 1,
"name_": "",
"muted_": false,
"width_": 1280,
"height_": 720,
"simulcast_": false,
"disableDtx_": false,
"source_": 1,
"layers_": [
{
"quality_": 2,
"width_": 1280,
"height_": 720,
"bitrate_": 0,
"ssrc_": 1961616403,
"memoizedIsInitialized": -1,
"unknownFields": {
"fields": {}
},
"memoizedSize": -1,
"memoizedHashCode": 0
}
],
"mimeType_": "video/H264",
"mid_": "1",
"codecs_": [
{
"mimeType_": "video/H264",
"mid_": "1",
"cid_": "TR_g8uQuyNXFD7C",
"layers_": [
{
"quality_": 2,
"width_": 1280,
"height_": 720,
"bitrate_": 0,
"ssrc_": 1961616403,
"memoizedIsInitialized": -1,
"unknownFields": {
"fields": {}
},
"memoizedSize": -1,
"memoizedHashCode": 0
}
],
"memoizedIsInitialized": -1,
"unknownFields": {
"fields": {}
},
"memoizedSize": -1,
"memoizedHashCode": 0
}
],
"stereo_": false,
"disableRed_": false,
"encryption_": 0,
"stream_": "camera",
"version_": {
"unixMicro_": 1734499648078078,
"ticks_": 0,
"memoizedIsInitialized": -1,
"unknownFields": {
"fields": {}
},
"memoizedSize": -1,
"memoizedHashCode": 0
},
"audioFeatures_": [],
"audioFeaturesMemoizedSerializedSize": 0,
"memoizedIsInitialized": -1,
"unknownFields": {
"fields": {}
},
"memoizedSize": -1,
"memoizedHashCode": 0
}
],
"metadata_": "",
"joinedAt_": 1734499646,
"name_": "nicole_test3",
"version_": 5,
"permission_": {
"canSubscribe_": true,
"canPublish_": true,
"canPublishData_": true,
"canPublishSources_": [],
"canPublishSourcesMemoizedSerializedSize": 0,
"hidden_": false,
"recorder_": false,
"canUpdateMetadata_": false,
"agent_": false,
"memoizedIsInitialized": -1,
"unknownFields": {
"fields": {}
},
"memoizedSize": -1,
"memoizedHashCode": 0
},
"region_": "",
"isPublisher_": true,
"kind_": 0,
"attributes_": {
"isMutable": false,
"mode": "MAP",
"mapData": {},
"converter": {}
},
"disconnectReason_": 0,
"memoizedIsInitialized": -1,
"unknownFields": {
"fields": {}
},
"memoizedSize": -1,
"memoizedHashCode": 0
},
@shoyu666
Copy link
Author

image

@shawnpatel
Copy link

I'm facing the same issue. Were you able to resolve?

@davidzhao
Copy link
Member

What client are you using to validate the viewer? I'm unable to reproduce with meet.livekit.io

Which OS are you publishing from?

Screenshot 2024-12-31 at 11 39 22 PM

@shawnpatel
Copy link

shawnpatel commented Jan 1, 2025

Publishing from a Jetson Orin with GStreamer 1.20 and also tried to validate on meet.livekit.io.

Can you share the GStreamer version and libraries you had installed for this working version?

@shawnpatel
Copy link

I also tried this on MacOS 15.2 with GStreamer 1.24.9 and I'm getting the same issue.

Screenshot 2025-01-01 at 10 24 29 AM

@shawnpatel
Copy link

Update: The GStreamer pipeline is working correctly as I was able to intercept buffer.Bytes() in track.handleSample and decode it into the below image. It seems like the issue is somewhere in the LiveKit Go SDK in t.track.WriteSample.

output_image

@shawnpatel
Copy link

Update: I changed the encoder to vp8 and vp9 and it started to work. It doesn't work with h264 and av1. @davidzhao any idea why h264 doesn't work? I'm running this on a Jetson so I need the hardware encoding support!

@shawnpatel
Copy link

Got h264 to work with the following pipeline:

GST_DEBUG=3 gstreamer-publisher --token $LIVEKIT_PUBLISH_TOKEN \
    -- \
    videotestsrc is-live=true ! \
        videoconvert ! \
        video/x-raw,width=1280,height=720 ! \
        x264enc byte-stream=true tune=zerolatency speed-preset=ultrafast bitrate=2000 ! \
        video/x-h264,profile=baseline ! \
        h264parse

@shoyu666
Copy link
Author

shoyu666 commented Jan 8, 2025

#41 (comment)

mac os sonoma :14.5
Apple m2 pro

n@ndeMacBook-Pro ~ % gst-inspect-1.0 --version
gst-inspect-1.0 version 1.24.10
GStreamer 1.24.10
https://github.com/Homebrew/homebrew-core

i use ffplay view the video

Could you possibly list your environment so that I can copy my homework? @davidzhao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants