Closed not404-found closed 4 years ago
Not sure if this is a bug or not. Can you share more of the setup code around this? In particular working gst-launch-1.0
line vs replicating Java code. Does reading the properties back give the right or wrong values? Also remember you may be able to use Gst.parseLaunch()
as a workaround.
Ok, I have Incoming stream from webrtcbin, then I send it to
Element queue = ElementFactory.make("queue", "my-videoqueue"); Element rtph264depay = ElementFactory.make("rtph264depay", "my-rtph264depay"); Element h264parse = ElementFactory.make("h264parse", "my-h264parse"); Element mpegtsmux = ElementFactory.make("mpegtsmux", "my-mpegtsmux"); Element hlssink = Gst.parseLaunch("hlssink max-files=10 playlist-location=playlist123.m3u8 location=chunk%d.ts target-duration=10");
Gst.parseLauch() - doesn't work too.
Does reading the properties back give the right or wrong values? It returns correct values
Here is gst-launch-1.0 working pipe:
So, the gst-launch-1.0
pipeline is different?! Try replicating that entirely first and see if the Java bindings work as expected. My guess is this is a difference in underlying GStreamer behaviour.
My bad. With the same pipeline all works correctly. But I still don't understand why in my pipeline default props are ignored?
Reading things like this align with what I assumed might be happening - target-duration
is just that, a target, and relies on aspects of the incoming stream, such as where keyframes are. I'm going to close this. It's not an issue with the Java bindings. You might want to follow up on the GStreamer mailing list, and also our mailing list if you get stuck with implementing any recommendation.
Hi there! I'm setting properties to hlssink but most of them are ingnored. Only location works but not correcty. Example below:
Element hlssink = ElementFactory.make("hlssink", "my-hlssink"); hlssink.set("max-files", 10); hlssink.set("location", "segment%05d.ts"); hlssink.set("playlist-location", "playlist.m3u8"); hlssink.set("target-duration", 10);
output:![image](https://user-images.githubusercontent.com/32771369/77674426-a1e5e180-6f9c-11ea-8dfc-33ce92983ddc.png)
All properties ignored: no playlist, no-new-chunks, chunk is bigger than 10 sec
But when use gst-launch-1.0 all works fine
Tech: Windows 10 open-jdk-12 gstreamer: gstreamer-1.0-mingw-x86_64-1.16.2 & gstreamer-1.0-devel-mingw-x86_64-1.16.2 java-gstreamer: gst1-java-core:1.1.0 java-jna: 5.2.0