Gstreamer-java and Gnonlin / DV

91 views
Skip to first unread message

Squiker

unread,
Feb 19, 2008, 6:41:05 AM2/19/08
to gstreamer-java
Hi everyone on gstreamer-java,

I just found this project and am very excited to learn more about it.

Currently i'm investigating juse of Gstreamer in java for a small
project for interfacing (2 way traffic) with DV cameras and in
particular with Harddisk video recorders that only support DV cams and
do not excange data to a PC. (The goal beeing to make the pc behave as
a DV camera). In the future I also might want to take this project a
litle further and do some basic editing.


So I guess my questions to you are:

1. Is Gstreamer-java up to the task of 2 way DV (firewire)
communication?

2. Is Gstreamer-java up to the task of controlling a DV (firewire)
device and receiving specific data commands from a device (e.g. play,
stop, record, fwd, etc)?



3. Is it possible to use Gnonlin with gstreamer-java and do basic
editing on files?


4. Will all interfaces to gstreamer work in the same manner (as it
seems to be promised by the Gstreamer framework) on diferent OS'es and
behave the same way? Or would one have to keep in mind different
behaviours on different systems? (in the end if the program works I
would be interested to have the program work on Linux, Mac and
Windows).


Thanks for any help you can give and keep up the good work!

Stefan.

Wayne Meissner

unread,
Feb 19, 2008, 9:41:01 PM2/19/08
to gstream...@googlegroups.com
On 19/02/2008, Squiker <squ...@zonnet.nl> wrote:
>
> Hi everyone on gstreamer-java,

> So I guess my questions to you are:
>
> 1. Is Gstreamer-java up to the task of 2 way DV (firewire)
> communication?
>
> 2. Is Gstreamer-java up to the task of controlling a DV (firewire)
> device and receiving specific data commands from a device (e.g. play,
> stop, record, fwd, etc)?

I don't know anything about DV using gstreamer. In theory, if
gstreamer supports it, then you should be able to do it in java.

If you're worried about performance, for most things, the performance
of gstreamer using java will be about the same as when using C or
python.


> 3. Is it possible to use Gnonlin with gstreamer-java and do basic
> editing on files?

I haven't used gnonlin myself, but it looks like a standard gstreamer
plugin, so it will probably work.

Worst case, there might be some parts of gstreamer that aren't wrapped
yet for java, that you need to use - but just submit a bug report and
they'll get added quickly.


> 4. Will all interfaces to gstreamer work in the same manner (as it
> seems to be promised by the Gstreamer framework) on diferent OS'es and
> behave the same way? Or would one have to keep in mind different
> behaviours on different systems? (in the end if the program works I
> would be interested to have the program work on Linux, Mac and
> Windows).

Although they're making progress on MacOSX and Windows, gstreamer is
still a fair way from being as easily usable on those platforms as it
is on linux (the windows install is terrible, but for MacOS, you just
need to install from macports).

I don't recommend gstreamer for production quality on windows or
MacOS, as you might be in for a bumpy ride. if you need rock-solid
support on either platform, especially in the short term, you might
want to look at something other than gstreamer.

I'm not sure about accessing devices such as DV cameras on either
Windows or MacOS - they might have different interfaces to the
hardware, so you probably need to use a different source element in
your pipeline.

Squiker

unread,
Feb 29, 2008, 2:25:06 PM2/29/08
to gstreamer-java
Hi Wayne,

I'll have a look around the net to see how the IEEE1394/DV and Gnonlin
plugins work. At least it has gotten me very interested.. I would
appreciate any help you or other users can provide tho.

I'm not concerned with performance at the moment, since I'm not
working on this on a commercial basis. I did read some articles on the
JNA site about performance and JNA is some what slower than native
JNI. Did you ever experience any performance problems?

Gstreamer seems very promising to me and if they can keep it working
for multiple platforms it could provide an excellent platform for
manipulating media in Java as well (the media api's for Java are not
really up to standard I hear..)

If I do run in to trouble ill get back here!



On Feb 20, 3:41 am, "Wayne Meissner" <wmeiss...@gmail.com> wrote:

pkolloch

unread,
Mar 8, 2008, 5:01:14 PM3/8/08
to gstreamer-java
Hi Stefan,

> 3. Is it possible to use Gnonlin with gstreamer-java and do basic
> editing on files?

at least with gstreamer-java directly from the repository, it is not
possible to directly use gnonlin, I think. I am quite new to gstreamer
and to gstreamer-java (read today was the first time I used it) so I
might have missed something.

The problem is that

final Element comp = ElementFactory.make("gnlcomposition", "comp");

returns an object of the element class and thus you cannot add
filesources etc to it. You cannot cast it: It's really an Element
class.

The good news is that this is trivial to fix:

--- a/src/org/gstreamer/ElementFactory.java Wed Mar 05 23:41:27
2008 +1300
+++ b/src/org/gstreamer/ElementFactory.java Sat Mar 08 22:56:27
2008 +0100
@@ -178,6 +178,7 @@ public class ElementFactory extends Plug
put("decodebin", DecodeBin.class);
put("typefind", TypeFind.class);
put("fakesrc", FakeSrc.class);
+ put("gnlcomposition", Bin.class);
}};

private static Element elementFor(Pointer ptr, String
factoryName) {

But I am not sure if I like this solution. For any new bin plugin etc.
you would have to extend the list. Currently, I don't see a
possibility for this without directly modifying the gstreamer-java
source. Am I missing something?

Maybe it is directly possible to export GObject-casts in the JavaAPI
somehow?

Peter

P.S.: gstreamer-java looks really great! Thanks for your excellent
work!

Wayne Meissner

unread,
Mar 9, 2008, 7:27:30 PM3/9/08
to gstream...@googlegroups.com
On 09/03/2008, pkolloch <pkol...@gmx.net> wrote:

> Maybe it is directly possible to export GObject-casts in the JavaAPI
> somehow?

I could add something like:

ElementFactory.mapFactoryType(String factoryName, Class<? extends
Element> elementType);

Which just puts the mapping into the list.

There is probably some way that the factory can be interrogated to
determine the GObject inheritance hierarchy, so this can be done
automatically.

Squiker

unread,
Apr 2, 2008, 5:11:02 PM4/2/08
to gstreamer-java
I did not have the time to look at this but what I have learned so far
about Gstreamer is that GNonlin is the preferred way to use non linear
editing with Gstreamer. So support for this plugin seems very wanted
to me..

Does anyone know any good tutorials to follow on Gstreamer plugins?
Right now it all seems very confusing to me, and i realy want to learn
this stuff...



On Mar 10, 1:27 am, "Wayne Meissner" <wmeiss...@gmail.com> wrote:

Wayne Meissner

unread,
Apr 8, 2008, 5:53:59 AM4/8/08
to gstream...@googlegroups.com
On 03/04/2008, Squiker <squ...@zonnet.nl> wrote:
>
> I did not have the time to look at this but what I have learned so far
> about Gstreamer is that GNonlin is the preferred way to use non linear
> editing with Gstreamer. So support for this plugin seems very wanted
> to me..

Feel free to put in an issue in the bug tracker for anything thats
missing - otherwise its likely to get lost.

I think I added one patch post 0.6 for gnonlin type mapping.

>
> Does anyone know any good tutorials to follow on Gstreamer plugins?
> Right now it all seems very confusing to me, and i realy want to learn
> this stuff...

gstreamer plugin writing is a black art. For some simple stuff (i.e.
byte stream) it looks simple enough, but for things that require video
frames, it seems to require a degree in advanced magical studies.

Squiker

unread,
Apr 8, 2008, 6:42:22 AM4/8/08
to gstreamer-java
I'll break out the Harry Potter books then... #;-)

By the way, my question about the Plugins was more related on how to
use plugins from within Gstreamer-java than for development of
plugins.... I just want to use Gstreamer(-java) for my development and
(I'm sorry to say) have less interest in developing for the framework
it self..

Annyway.. It seems I will take my time to learn this stuff, but if i
find any short commings I will let you know..




On 8 apr, 11:53, "Wayne Meissner" <wmeiss...@gmail.com> wrote:
> >  > automatically.- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

Wayne Meissner

unread,
Apr 9, 2008, 11:41:21 PM4/9/08
to gstream...@googlegroups.com
Ahh, I misread what you were asking.

Can you list and/or add an issue in the issue tracker for any and all
problems (no matter how trivial) you hit when using common plugins?

I want to gather as much use-case info as possible to see what needs
to be changed to add support (hopefully in a generic way so I don't
have to special case them all .. but if needs be I can) for all the
plugins people want.

Squiker

unread,
Apr 11, 2008, 6:28:06 PM4/11/08
to gstreamer-java
Hi Wayne,

I thought I'd try to follow a simple Python tutorial on GNonlin and
implement the sample code provided in it in java. I'm afraid that
Peter (see posts above) was right. In order to use GNonlin you would
have to add sources to the GNonlin source and right now this is not
possible...

Perhaps a look in to the Python bindings can shed some light in to a
viable solution to this?? I for one would find a working solution for
use of GNonlin a real issue to fix for the next gstreamer-java
release.. I'll try and look in to it my self as well.

Just in case you are interested, the tutorial i tried to follow can be
found at:
http://www.ocf.berkeley.edu/~brandon/wiki/index.php5?title=Introducing_GNonLin

Thanks again for your time and excellent work!!

Stefan.


On Apr 10, 5:41 am, "Wayne Meissner" <wmeiss...@gmail.com> wrote:
> Ahh, I misread what you were asking.
>
> Can you list and/or add an issue in the issue tracker for any and all
> problems (no matter how trivial) you hit when using common plugins?
>
> I want to gather as much use-case info as possible to see what needs
> to be changed to add support (hopefully in a generic way so I don't
> have to special case them all .. but if needs be I can) for all the
> plugins people want.
>
Reply all
Reply to author
Forward
0 new messages