Coder Social home page Coder Social logo

gst1-java-examples's Introduction

gstreamer-java (0.10 compatible)

An unofficial/alternative set of java bindings for the gstreamer multimedia framework.

Please use the gstreamer-java google group to discuss using gstreamer-java or to ask any questions.

Although gstreamer is commonly associated with the gnome desktop, gstreamer itself, and these bindings are portable across operating systems.

You need a recent JNA version in order to be able to use gstreamer-java.

The current release is known to run on MacOSX, Linux, Windows and - for the experimental developer with the latest code - on Android. Before using gstreamer-java - and especially before opening issues against gstreamer-java - try to run your pipelines using the Gstreamer gst-launch command-line utility directly.

Important: Current version of the gstreamer-java is NOT compatible with GStreamer 1.0 or above. This means the last usable version are GStreamer 0.10.

Please note: this is not an easy-to-use multimedia framework for beginners. It currently requires people to both know the java language, and be familiar with the gstreamer framework (or be prepared to apply things from tutorials on gstreamer programming in other languages (e.g. python or C#) to the java bindings).

gst1-java-examples's People

Contributors

krwenholz avatar neilcsmith-net avatar tendwong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gst1-java-examples's Issues

Include more sophisticated examples

Hi, very nice lib man!

I would like to see more complex/sophisticate examples on this repository.

Some ideias:

  1. Read file video and send to youtube (RTP)
  2. Capture video frames as Java AWT Images
  3. modify frames using Java AWT APIs.
  4. Mix two sources (file, webcam overlay) into one file.

I want to make a lib that can be used to add dynamic content to videos and stream it, like Prixe, but as a lib.

WebRTCSendRecv

Hello I have cloned your WebRTCSendRecv example and am encountering some weird issues. The program runs just fine for a second or two and I am able to see the ball test source in my web browser. However, after a couple of seconds the stream goes away and I encounter the following errors from the program.

SEVERE: Error from source : BaseSrc: [nicesrc0], with code : 1, and message : Internal data stream error. Jun 29, 2021 6:18:42 PM org.freedesktop.gstreamer.examples.WebRTCSendRecv lambda$setupPipeLogging$5 SEVERE: Error from source : Element: [queue2], with code : 1, and message : Internal data stream error. Jun 29, 2021 6:18:42 PM org.freedesktop.gstreamer.examples.WebRTCSendRecv lambda$setupPipeLogging$7 INFO: Pipe state changed from PLAYING to PAUSED Jun 29, 2021 6:18:42 PM org.freedesktop.gstreamer.examples.WebRTCSendRecv lambda$setupPipeLogging$7 INFO: Pipe state changed from PAUSED to READY

Any ideas? I am using Java JDK 14 and the latest version of both GStreamer and java GStreamer. My end goal is to create a Java webrtc app using GStreamer that would allow me to remotely drive a robot on the same network.

RTSP stream to MP4 with audio

Hello,
I'm using one of your examples. Exactly TestFootageCapture.java. I didn't change anything except aac codec because i can not install and use faac so i took voaacenc.

When i start recording i'm getting this message:
** (gst1-java-core:6290): CRITICAL **: 23:14:32.091: gst_app_src_push_internal: assertion 'GST_IS_BUFFER (buffer)' failed

I found solution for this. The solution is removing sample.dispose(); from newSample function but after removing the line my RAM is eaten like cookie by the JVM.

Is this a bug in your example or the aac codec is the issue?

tee plugin code example request

how to display and record at same time. attachment is my sample code.
it will works success if i use only queue1 or queue2 .
it will works fail when i use tee plugin to connect queue1 and queue2.
does it have any tee plugin code sample for java ?
test.txt

BufferProbe fails if 'autovideosrc' is not 800x600

My webcam is 1280x720, but the code expects 800x600. It works if I change the WIDTH / HEIGHT in the code to 1280x720. I'm not sure (yet) how to fix it for real since I'm just getting started with this. If I figure that out I will submit a PR.

0:00:01.737786518 217396 0x7f29b4778b00 WARN basetransform gstbasetransform.c:1378:gst_base_transform_setcaps: FAILED to configure incaps video/x-raw, format=(string)YUY2, width=(int)1280, height=(int)720, framerate=(fraction)10/1 and outcaps video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)10/1, format=(string)BGRx, pixel-aspect-ratio=(fraction)1/2147483647

Could not load library: gstreamer on OSX

When trying to run CameraTest on OSX i get the following ULE exception when running from eclipse. I've tried adding Library/Frameworks/GStreamer.framework/Versions/Current/lib/ to java.library.path but that doesn't seem to help. Any suggestions?

Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load library: gstreamer
at org.freedesktop.gstreamer.lowlevel.GstNative.load(GstNative.java:53)
at org.freedesktop.gstreamer.lowlevel.GstNative.load(GstNative.java:43)
at org.freedesktop.gstreamer.Gst.(Gst.java:77)
at org.freedesktop.gstreamer.examples.CameraTest.main(CameraTest.java:22)

troubleshoot window that stays black after choosing media

When I run the MultiSinkExample inside IntelliJ IDEA and choose one of the MP4 files I have on my hard drive the window stays black.

There is absolutely no output that helps me figure out what is going wrong. I don't know if it is a failure of gstreamer, a failure of the java bindings, or some weird environmental issue.

Linux herakleion 4.12.12-bob #38 SMP Sat Dec 9 23:32:34 EST 2017 x86_64 Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz GenuineIntel GNU/Linux

Play RTSP stream

Hi,
I'm trying to display a video from RTSP stream using gstreamer. I've modified CameraTest.java example to:
Bin bin = Bin.launch("rtspsrc location=rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov ! decodebin ! autovideosink", true);

When I launch gst-launch-1.0 rtspsrc location=rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov latency=0 ! decodebin ! autovideosink in terminal it's working ok, but when I launch a java example I got 2 windows like on the screen below.

screen shot 2018-08-13 at 16 50 38

There is also an error in console
(CameraTest:93274): GStreamer-CRITICAL **: guint64 _gst_util_uint64_scale_int(guint64, gint, gint, gint): assertion denom > 0' failed`

I'm using gst1-java-core 0.9.3 and osx. Can you help me to make this work? Thanks.

JavaFX support

Hi,

im trying to use the gst1-java with JavaFX. i'm trying to recode SimpleVideoComponent to be native JavaFX code without any swing component to utalise the javaFX hardware acceleration stack. the component that can replace JComponent is javafx.scene.canvas.Canvas but i couldn't manage it.

there is a way to embed swing in JavaFX using SwingNode but this is not the optimum solution as it will not be handled by JavaFX rendering stack (hardware acceleration might not be working in this case). in addition clean code is recommended in all cases.

any support is appreciated. is there a plan to import the code to JavaFX

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.