VLC and Java pipeing

Erm… actually this project was only intended as private Project, so what are you even talking about :smiley:
Also, yes, I know VLCJ but it is simply overkill. I just wanted to play a random music file. I’ve done that with 162 Lines?!? thats it.

And Cero, if you are looking for Video playing in opengl, then you could switch to / wrap between LWJGL and JOGL, and play the video with JogAmp’s video player :wink:

That’s why I talked about com.jogamp.opengl.util.av.GLMediaPlayerFactory.

Yep. I know that class :slight_smile: It’s the class I was referring to :wink:
But using that would be overkill, because - as I said - I don’t want it to be a big project or anything. Just some private code, one little file. I don’t want to install natives or anything.

Don’t be alarmed - I think your thread got hijacked! ;D

video playback is so important, threads gonna get hijacked =D

what gstreamer java binding do you use; or did you write your own ? I might take a look into it again
if praxis cannot play audio im not gonna look into it yet - cortado was perfect without audio, but playing audio and not desyncing is an essential problem - which vlcj solved imo

if jogamp can play ogg video and audio thats good I guess, but since Im using LWJGL, someone would have to combine it somehow

I’m dealing with threads. I’m using gstreamer via Runtime.getRuntime().exec(…), a.k.a. command-line, so I don’t need any wrapper.

What I’ve seen is gstreamer-java, a gstreamer wrapper for java. Seems to be about as easy as using gstreamer with command-line, and could even give you pausing, unpausing, volume etc.

Yeah was talking to nsigma
for a general solution for video playback, we need something that renders direct to texture n stuff

I’m using GStreamer-Java with the prebuilt libs from Processing repo and a fork of their library loading code.

GStreamer supports audio fine. I just haven’t got around to getting the audio into the Praxis audio pipeline yet. It’s irrelevant for your usage.

Do you use the old 1.5 version or 2.0 pre-releases ?

I forked the current Processing 2.0 library code (GStreamer isn’t in 1.5 is it?)

Anyway (as I’ve pointed you to before :stuck_out_tongue: ) the forked library loader (for Windows) is here - http://code.google.com/p/praxis/source/browse/praxis.video-gstreamer-win/src/net/neilcsmith/praxis/video/gstreamer/windows/LibraryLoaderImpl.java?repo=ext You’ll need to change the lines with InstalledFileLocator (from NetBeans platform) to point at the folder you put the native libs in. You’ll probably want to make load() public too.

You’ll need the GStreamer native libs themselves - easier than checking out Processing will be to download the Praxis plugin from http://code.google.com/p/praxis/downloads/list. An *.nbm file is just a rebadged Zip, so extract it and you’ll find the libs.

The GStreamer libs from Processing include a few GPL plugins. Unfortunately, I’m not entirely sure which are the GPL ones (Praxis is GPL anyway), so you’ll have to figure it out and just delete them. Removing plugins you don’t need shouldn’t break anything.

You’ll need to write a simple player, and upload to the texture using the code that theagentd gave you as a base. Some of the code in my PlaybinDelegate might help you - ignore the GPL, I’ll let you use what you want! :wink: You’ll also want to take out the line that sets the audio sink to null, which is why audio doesn’t work in Praxis - I need to write a custom audio sink to get the audio into Praxis’ audio pipeline.

OSX is also doable (and should be easier to port from Processing) but I don’t have access to a Mac to test on at the moment.

Anything else, just ask. And if you want to check all the native libs link properly, try Praxis and the plugin first. They work here fine, so hopefully the same for you.

Best wishes, Neil

Might have another crack at Cortado again soon.

Cas :slight_smile:

You keep us posted - I’m gonna try out some gstreamer.

Okay… yet another attempt from me, to fill some free time - this time there is no need for a ramdisk :slight_smile:

[x] I use ffmpeg to extract an audio stream from any movie, as PCM16 stereo 44.1kHz
[x] I use ffmpeg to extract a video stream from any movie, as MJPEG (sequence of JPEGs in 1 file)

I read the STDOUT of both processes, do some buffering, syncing, and play it back (AWT + OpenAL).

The code:
[x] http://pastebin.java-gaming.org/68a0b47182a

It smoothly plays back HD content (1080p, JPEG quality: 100%) with 20% CPU usage for java and 18% CPU usage for ffmpeg.


http://indiespot.net/files/published/jgo-ffmpeg-camp.png

NOPE NOPE NOPE NOPE NOPE NOPE NOPE NOPE NOPE NOPE NOPE NOPE NOPE…

That’s pretty neat!

Why do you need AWT? Xerxes and Sven succeeded in playing a short video in Raspberry Pi and some smartphones without it, by using LibAV, OpenGL-ES and our native windowing toolkit.

I don’t need AWT. I picked it because it was the least amount of work for this three hour project…