Comments (5)
You can do this easily enough -- you instantiate a playbin
, set the video-sink
property with the element you want (or you use a gst_parse_launch()
variant), and then set the pipeline
property on the GstSyncClient
to that playbin
instance.
from gst-sync-server.
Solved. Thanks.
TLDR; I followed your suggestion + moved to RaspOS Bullseye 64 bits with gstreamer 1.18
The detailed solution:
I added:
GstElement *sinkk = gst_element_factory_make("kmssink", "video-output");
g_object_set(G_OBJECT(self->pipeline), "video-sink", sinkk, NULL);
here: sync-client after instantiate playbin
And it works, but only ~ 1 in 10 times, usually throws a segmentation fault.
Before I tried more changes, I tested the same code modification on my x86 setup and it works without problems.
So I conclude that this was a raspi platform specific problem and changed my RaspOS lite Buster 32 bits gstreamer 1.14 to RaspOS Bullseye lite 64bit gstreamer 1.18.
It seems to work now.
In fact the autovideosink works with this setup, but there are a weird color problem (i believe there area swap in the reds and blues or something like that), so I use the kmssink.
Thank you very much again!
PS I have zero experience with the gst API so I ask ChatGPT for an example setting video-sink and use it with some deductions to apply an ugly AI-enabled-glue-coding. :D
from gst-sync-server.
Nice! Just for reference, how you might do this in the client (rather than the library code) is to change the code over here:
// Put this at the top with other declarations
GstElement *pipeline, *sink;
// Now scroll down to this line
client = gst_sync_client_new (addr, port);
// And add these lines
sink = gst_element_factory_make("kmssink", "video-output");
g_object_get (G_OBJECT (client), "pipeline", &pipeline, NULL);
g_object_set (G_OBJECT (pipeline), "video-sink", sink, NULL);
gst_object_unref (pipeline);
from gst-sync-server.
I tested and it works with my RPi setup.
Obviously to not touch the library code is a preferred option, so I will use this solution.
Audio is not working, but I suspect that is an alsasink related problem that perhaps could be solved changing some alsa config or moving to pulseaudiosink.
However for this particular project I don't need audio, so I will not go deep for now.
But when I have a little more time I will check it and report it for other users.
Meanwhile, again, thanks for your work and generosity.
EDIT: Changing to Fake KMS and installing pulseaudio solves the problem with hdmi audio. (In /boot/config/txt
, replace dtoverlay=vc4-kms-v3d
with dtoverlay=vc4-fkms-v3d
)
from gst-sync-server.
That's good to hear -- happy to help!
from gst-sync-server.
Related Issues (12)
- Input uri format? HOT 1
- reserved identifier violation
- Can't compile on ubuntu 22.04 HOT 4
- Client connection error HOT 5
- Fails to compile from GIT HOT 1
- Can this use in panoramic stitch ? HOT 2
- building gst-sync-server on windows HOT 5
- Synchronizing different parts of a video HOT 4
- Running on Raspberry PI HOT 8
- Network set-up, video on remote client not playing (Ubuntu 18.04LTS) HOT 2
- Syncronizing Multiple Rtsp Streams
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gst-sync-server.