princec
|
 |
«
Reply #30 - Posted
2012-02-29 10:50:11 » |
|
The woe of using native code  Cas 
|
|
|
|
Cero
|
 |
«
Reply #31 - Posted
2012-02-29 15:31:48 » |
|
The woe of using native code  yes, well, we are outta options but once someone with OpenGL skill can make it work, its a theora player that works great
|
|
|
|
theagentd
|
 |
«
Reply #32 - Posted
2012-02-29 16:12:52 » |
|
I know OpenGL. Give me a buffer with frame data and I'll put it on screen.
|
Myomyomyo.
|
|
|
Games published by our own members! Check 'em out!
|
|
Danny02
|
 |
«
Reply #33 - Posted
2012-02-29 16:32:23 » |
|
why not use https://github.com/pirelenito/MovieGLseems like a solid opengl movie player based on JMF, I know that this doesn't support many formats, but there a plugins for it like jffmpg(instead of fobs, what is suggested by this project). One wouldn'T have any natives libs, what would be great.
|
|
|
|
|
Cero
|
 |
«
Reply #34 - Posted
2012-02-29 16:36:58 » |
|
I know OpenGL. Give me a buffer with frame data and I'll put it on screen.
I was hoping you would show up. well knock yourself out, that eclipse project should run the jme example is there, I'm sure you can get this to work
|
|
|
|
theagentd
|
 |
«
Reply #35 - Posted
2012-02-29 17:28:32 » |
|
|
Myomyomyo.
|
|
|
Cero
|
 |
«
Reply #36 - Posted
2012-02-29 17:38:00 » |
|
Took me about 5 minutes...
I knew it would =) Great !
|
|
|
|
theagentd
|
 |
«
Reply #37 - Posted
2012-02-29 17:59:21 » |
|
Well, if you give me a ByteBuffer containing perfectly formatted RGB data and tell me to display it with OpenGL...
The code is pretty stupid, it just uploads the data every single frame instead of only when it changes, but it should get you going.
|
Myomyomyo.
|
|
|
nsigma
|
 |
«
Reply #38 - Posted
2012-02-29 19:38:05 » |
|
Then there is only license problems ... Make your code GPL, or at least that part that uses/communicates with VLCJ
hmm ... yeah ... that doesn't sound exactly legit!  Luckily, you missed out the important news of the month. libVLC 2.0 is now LGPL. Just need to convince the developer of VLCJ to follow suit ... Slightly OT - I've finally got around to looking at forking out the GSVideo code from Processing to enable bundling of GStreamer binaries, so that'll be another LGPL solution. I was almost not going to bother since it's pretty easy to install a system version on Linux and Windows, but Mac on the other hand is a PITA. I'm also considering VLC as a backup video lib in Praxis. Hm, okay, how are the buffer blits synced? You never request a new frame, and without any request, it must be running on another thread, which will cause lots of tearing as the buffer can be modified during upload.
One way to handle that might be to fork the code for DefaultDirectMediaPlayer, use two native buffers, and swap between them using the lock/unlock callbacks. That way you can let VLC get on with writing to one buffer while you make use of the other.
|
|
|
|
ra4king
|
 |
«
Reply #39 - Posted
2012-02-29 19:46:30 » |
|
I don't know why you are all struggling so much when bobjob already made a video player applet that just runs the ffmpeg exectuable in the background and reads its data from an InputStream..... 
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Cero
|
 |
«
Reply #40 - Posted
2012-02-29 19:57:45 » |
|
I don't know why you are all struggling so much
thats because you never tried to write video playback which - runs on every platform - without having to install anything - running decent video, fluently, in decent quality - in opengl - while being able to legally redistribute it: codecs and libraries are licensed I have made and took part in countless thread these last years because of this. Even jme has currently no video playback because stuff either sucked so hard or had implementing/licensing issues. Then there is only license problems ... Make your code GPL, or at least that part that uses/communicates with VLCJ
hmm ... yeah ... that doesn't sound exactly legit!  Luckily, you missed out the important news of the month. libVLC 2.0 is now LGPL. Just need to convince the developer of VLCJ to follow suit ... I talked about it with the creator of vlcj again per mail, as we talked before. My version is already using vlc 2 and stuff yeah the vlcj license is still old, he is considering offering 2 separate licenses soon anyway, its all good.
|
|
|
|
princec
|
 |
«
Reply #41 - Posted
2012-02-29 20:48:52 » |
|
And what about the audio syncing? Cas 
|
|
|
|
Cero
|
 |
«
Reply #42 - Posted
2012-02-29 21:01:55 » |
|
And what about the audio syncing?
seems perfect let me render a long theora video and have a look btw: TheoraConverterDotNet is great.
|
|
|
|
Cero
|
 |
«
Reply #43 - Posted
2012-02-29 21:49:32 » |
|
22min show 576x432 Filesize @ Quality 9 (video & Audio) -> 243MB
Perfect sync and all.
Going to test some more on weaker machines, but I expect performance to be like a normal mediaplayer / like VLC So yeah, its good.
Still need to test on the other OS' of course
|
|
|
|
theagentd
|
 |
«
Reply #44 - Posted
2012-03-01 10:53:14 » |
|
And what about the audio syncing? Cas  Syncing is handled by the native library. The Java program just gets notified when a new frame has been decoded and displays it.
|
Myomyomyo.
|
|
|
davedes
|
 |
«
Reply #45 - Posted
2012-03-01 18:54:42 » |
|
What is used for audio playback? OpenAL?
|
|
|
|
Cero
|
 |
«
Reply #46 - Posted
2012-03-01 18:58:11 » |
|
What is used for audio playback? OpenAL?
since we dont do anything and its native code, I guess on windows it uses DirectSound but not sure. it uses whatever the vlc player uses of course
|
|
|
|
princec
|
 |
«
Reply #47 - Posted
2012-03-01 20:10:44 » |
|
Ah I see, so it actually handles the sound playback. Not so good if your frame display rate doesn't match the video rate. This particular problem is a rather more complicated issue than it looks at first. The video display needs to be actually triggered by audio playback, not vice versa. Cas 
|
|
|
|
Cero
|
 |
«
Reply #48 - Posted
2012-03-01 21:20:17 » |
|
Ah I see, so it actually handles the sound playback. Not so good if your frame display rate doesn't match the video rate. This particular problem is a rather more complicated issue than it looks at first. The video display needs to be actually triggered by audio playback, not vice versa.
like I said, I watched a 20min show without desync. I added a Display.sync(video framerate) - but it doesnt seem to make difference. One of my guys tried it on a weak netbook with a intel gma Java2D worked (although playing HD on a netbook is of course slow by itself) LWJGL didnt work and he says its probably because the texture isnt power of 2 matters little as we render it ourself I think having a 512x256 and a 1024x512 for each video is the best going to test the gpu's texture size before and then playing whatever is more appropriate.
|
|
|
|
theagentd
|
 |
«
Reply #49 - Posted
2012-03-02 11:37:10 » |
|
LWJGL didnt work and he says its probably because the texture isnt power of 2 matters little as we render it ourself
I think having a 512x256 and a 1024x512 for each video is the best going to test the gpu's texture size before and then playing whatever is more appropriate.
This can be easily fixed. You only have to change the call to glTexImage2D to create the texture with a power-of-2 size and change the texture coordinates when rendering to correct values ((float)videoSize / textureSize; for both width and height). The call used to update the texture with new video data, glTexSubImage2D, can take non-power-of-2 since it only updates a subsection of the texture.
|
Myomyomyo.
|
|
|
Swift
Junior Newbie
|
 |
«
Reply #50 - Posted
2013-01-20 16:45:56 » |
|
Any chance somebody could reboot this, IE: Make some kind of library for this, I really need something like this, but I dont want to have to manually code a vlcj port.
Swift
|
|
|
|
|
matheus23
|
 |
«
Reply #51 - Posted
2013-01-20 16:50:01 » |
|
Any chance somebody could reboot this, IE: Make some kind of library for this, I really need something like this, but I dont want to have to manually code a vlcj port.
Just because of the lack of a Java video player, Riven, our forum moderator, built a tool for video Playback: YUNPM (Why you no play Movies)
|
|
|
|
Swift
Junior Newbie
|
 |
«
Reply #52 - Posted
2013-01-20 17:07:22 » |
|
Thanks, been looking for ages, but it seems google doesn't pick that kinda stuff up, its pretty much what I needed. Swift
|
|
|
|
|
nsigma
|
 |
«
Reply #53 - Posted
2013-01-20 19:44:09 » |
|
There is also a GStreamer solution around here. Depends whether you need the extra features GStreamer brings in over FFMPEG / libav. Incidentally, the video playback in JavaFX is GStreamer based - let's hope that as it develops we get nice easy access to a built in media library!
|
|
|
|
Cero
|
 |
«
Reply #54 - Posted
2013-01-20 19:47:21 » |
|
VLCJ was mostly abandoned by us because of GPL licensing issues. Similar problem with YUNPM, however its the codecs contained, that are GPL, not the code. GStreamer doesn't have these problems.
|
|
|
|
|