Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (579)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 2 [3] 4
  ignore  |  Print  
  Cortado works!  (Read 12981 times)
0 Members and 1 Guest are viewing this topic.
Offline bobjob

JGO Knight


Medals: 10
Projects: 6


David Aaron Muhar


« Reply #60 - Posted 2010-02-15 18:00:25 »

"Weasel word", not "weasel".

http://en.wikipedia.org/wiki/Weasel_word
shit. Well I learnt something today.
sry for being so ready to assume the worst of ya  Undecided

My Projects
Games, Webcam chat, Video screencast, PDF tools.

Javagaming.org with chat room
Offline Momoko_Fan

Junior Member


Medals: 2



« Reply #61 - Posted 2010-02-15 19:27:08 »

Quote
Anyway... I'm hacking all the Cortado stuff out of Cortado, and just getting something really basic working. Eventually. I hope.
Thanks! This would be VERY useful for me. If you could make it work with LWJGL then it will be good. I already have a working OGG/Vorbis -> LWJGL-OpenAL so I don't need the sound part.
Offline nsigma
« Reply #62 - Posted 2010-02-15 19:56:39 »

Can you name a commercial software licence that works in the same way? They typically work on one of two bases: either you can use it but not distribute it; or you can distribute it, sometimes with fixed royalties per instance distributed. The most they're likely to insist I do with my own code is obfuscate the entire project.

IMO they're the same thing.  In the first case, you can do exactly that with GPL code.  In the second, you pay a royalty of "£10 per user" or you pay a royalty of "release all your code to each user".  Either is a cost to you, and you make a decision whether that cost is worthwhile, and the author protects their investment in the code.  Even more liberal licences have some cost, even if it's only attribution!  There are a lot of companies releasing dual licensed code as well (GPL and commercial) so you get to take your pick, and they benefit from the protection.  If you're intending on making money from your code then GPL probably doesn't offer the best solution, if you make money tangentially to your code (as I do) then the cost to me of using GPL code is better value.  I'm no free software zealot, just pragmatic! Smiley

And my only objection to the word "contaminate" is because it's too linked to the idea of the GPL being "viral".  This is a reaction from companies who thought that the only valid transaction for software licensing was monetary.  People make huge numbers of transactions all the time that are not monetary!

So, in a vague attempt to get this (or me!) back on topic Smiley

I would like to see a theora video solution for Java that's LGPL, and fulfils all our needs - that's why I delurked in the first place!  I don't believe the GPL is anywhere near as ambiguous as stated, and I don't think that hacking around the GPL code and hoping no-one notices is a viable or ethical option either.  I'm also happy to help out or do the refactoring myself, though I don't have any free time for a month.

I think that attempting to use the Java port of GStreamer from Cortado is a good idea, as it offers a ready built framework which could be made to work with other pure Java codecs in future.  I am also a great disbeliever in reinventing the wheel without good cause!  Might be worth an email to Fluendo first to see if they won't just re-licence the offending classes though.

I'm without t'internet for the rest of the week, so don't expect any further postings from me for a bit ... yeah, I heard that sigh of relief at the back!  Grin

Best wishes, Neil


Praxis LIVE - open-source intermedia toolkit and live interactive visual editor
Digital Prisoners - interactive spaces and projections
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #63 - Posted 2010-02-15 20:12:23 »

Anything I produce will be under no license at all (as in, public domain), or the LWJGL-style BSD license.

Cas Smiley

Offline elias4444

Junior Member





« Reply #64 - Posted 2010-02-15 20:17:59 »

I'd recommend using a BSD style license... just so no one steals your code and licenses it themselves (it's actually happened to me).

Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #65 - Posted 2010-02-15 21:41:48 »

I suppose so. Though I honestly couldn't care less. I'd only steal it back...

Cas Smiley

Offline Chagma

Senior Newbie





« Reply #66 - Posted 2010-02-26 04:00:55 »

Has anyone made any progress on this, i.e. getting synchronized video and audio playback from Java?  I found Xuggler but it makes use of native libraries and has synchronization issues on Linux.  I need a pure Java implementation that just works!

-Chagma
Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #67 - Posted 2010-02-26 10:26:56 »

Well, as I say, Cortado works, but it's got complex licensing problems and doesn't integrate with OpenGL too well. I'll probably have something working in a few weeks but it will be heavily hacked to my own frameworks unfortunately.

Cas Smiley

Offline Chagma

Senior Newbie





« Reply #68 - Posted 2010-02-26 10:34:12 »

Does "my own frameworks" include LWJGL?  If you can get something that synchronises Theora video and audio and outputs the video as buffered images or such then I'll be able to do the rest for my applet.  I am at the point where I need to make a big decision: whether to go with the technology I have developed or abandon it in favour of something else entirely.  It all comes down to being able to play back Theora in an applet.  If it can't be done then it's back to the drawing board for me.
Offline Serethos

Junior Member




Java games rock!


« Reply #69 - Posted 2010-03-22 15:47:28 »

CommanderKeith noticed, that you might be interested in this alternative:

http://www.java-gaming.org/index.php?topic=21813.new%3btopicseen#new

I had quite a long and disappointing trip finding a video framework available for all
important platforms. Now I have dicovered Xuggler and it works..
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #70 - Posted 2010-03-22 16:12:39 »

Looking now... seems promising if I can get the size down a bit.

Cas Smiley

Offline Chagma

Senior Newbie





« Reply #71 - Posted 2010-03-22 16:36:25 »

I have reservations about Xuggler namely:

• They say themselves that video playback is experimental at best and not to be used in production.
• They say themselves that video/audio synch doesn't work on Linux and they have no solution.
• It has a massive footprint.
 
 
 
 
Offline i30817

Junior Member





« Reply #72 - Posted 2010-04-14 02:43:28 »

What are these guys doing:
http://code.google.com/p/jcodec/

h264 ? Isn't it patented to hell and back? And with the MIT license?
Offline Chagma

Senior Newbie





« Reply #73 - Posted 2010-04-14 03:13:54 »

That looks interesting.  Some recent activity but no releases yet.
Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #74 - Posted 2010-04-14 10:56:44 »

I tried contacting them but no reply.

Cas Smiley

Offline i30817

Junior Member





« Reply #75 - Posted 2010-04-14 14:34:04 »

How could you? They have no mail or group. Anyway you can check out the source i guess.
Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #76 - Posted 2010-04-14 15:27:57 »

The author's got a gmail address somewhere. I dug around a little and found it but no reply from it, so it might be just a "login" sort of address rather than on in actual use.

Cas Smiley

Offline xinaesthetic

Senior Member


Medals: 1



« Reply #77 - Posted 2010-04-23 11:55:47 »

Has anyone tried this library?
http://www.mat.ucsb.edu/~a.forbes/PROCESSING/jmcvideo/jmcvideo.html
Quote
The jmcvideo library is a wrapper for playing videos and grabbing video data for any of the formats that the JMC library supports. It works on Windows, OSX, and Linux, using native bindings when possible. The framerates for playback are very fast, up to 300fps fullscreen for multiple YouTube quality .flv videos playing simultaneously. There are two versions of the library, one that interfaces with Processing and one directly for Java using the Java openGL bindings.
By 'the Java openGL bindings' they mean JOGL.
Offline Chagma

Senior Newbie





« Reply #78 - Posted 2010-04-23 12:02:11 »

The question is what is the license?  The JavaFX licenese prohibits separate distribution of any of its components.
Offline whome

Junior Member




Carte Noir Java


« Reply #79 - Posted 2010-04-23 22:06:43 »

Has anyone tried this library?
http://www.mat.ucsb.edu/~a.forbes/PROCESSING/jmcvideo/jmcvideo.html  'the Java openGL bindings' they mean JOGL.
I downloaded and tried it, maybe its my +4 year old laptop with ancient OGL driver but it was not a fast playback. Must copy files to a desktop machine when at home and try again. Anyway, functionality point of view it does work and am slightly impressed.

Running demos was a pain first as I know nothing about Processing toolkit. Its a some sort of simplified programming language and graphics runtime environment running on Java. It has some very nice graphics demos, I recommend try it out.

This is what I did.
WindowsXP, Java6
* download processing 1.1 without java
* uninstall to c:/projects/processing-1.1
* git clone jmcvideo project to have sources and dependency libraries
* copy jmcvideo folder from jmcvideo.git/processing/libraries_windows/*  to processing-1.1/libraries/ folder
* download jmcvideo.jar v1.2 and overwrite old jar in a processing-1.1/libraries/jmcvideo/library/
* download few demos from jmcvideo site and unzip to c:/projects/examples/ folder
* run processing IDE and load .pde scripts

I tried few mpeg2, .mp4 and .mkv files. WMVPro video files was audio only and ocassionally crashed. Image quality is not that great but maybe I am spoiled with my DirectX EVR renderer Delphi players.
Offline Momoko_Fan

Junior Member


Medals: 2



« Reply #80 - Posted 2010-04-27 05:31:18 »

I have jheora (from cortado) working inside jMonkeEngine3. It is easy to get started, but synchronization can be a real pain, especially if you're using multithreading. Often times the audio packets arrive very late in comparison to the video frames and you essentially have no choice but to buffer the video frames or you'll be deadlocked when trying to synchronize them.
Once I get proper syncing working, it will be possible to use this, it "just works". You throw in a theora/vorbis video and it plays just like that, even from a web-server. There are a ton of easy-one-click converters online for all video formats into theora/vorbis. Compression is decent, format is patent-free, only downside is jheora is under LGPL which means you gotta include the jar and source for it separately from app's jar.
So yeah, hopefully I'll be able to get the issues out, and then somebody can port it out of jME3 for general public use, or, there's always the option of everyone switching to jME3 Tongue
Offline delt0r

JGO Coder


Medals: 22


Computers can do that?


« Reply #81 - Posted 2010-04-27 09:39:08 »

syncing is in general difficult to get right because you don't control the multiplexing. In some cases players simply fail if the interleaving is too bad and some have a "cache" option that permits the user to set how bad the plexing needs to be before failure.

Whats the performance like? My tests meant that HD was still a no go for jheora. While the C theora player is now doing quite a bit better than x264 for HD (720p) stuff.

ps I am writing a GLSL iDCT for fun, this may make jheora a bit faster if you skip the java iDCT.

I have no special talents. I am only passionately curious.--Albert Einstein
Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #82 - Posted 2010-04-27 11:17:52 »

I've been doing syncing here @ work and basically the way it would appear to do it is you drive everything off of the audio, and buffer video frames behind. With the MPEG2 streams I'm dealing with the number of buffers I need is never more than 3 though, so it's not a big deal for us.

Cas Smiley

Offline Momoko_Fan

Junior Member


Medals: 2



« Reply #83 - Posted 2010-04-28 17:37:53 »

syncing is in general difficult to get right because you don't control the multiplexing. In some cases players simply fail if the interleaving is too bad and some have a "cache" option that permits the user to set how bad the plexing needs to be before failure.
Yeah you gotta cache more if you want better sync.

Whats the performance like? My tests meant that HD was still a no go for jheora. While the C theora player is now doing quite a bit better than x264 for HD (720p) stuff.
It works fine but you gotta queue up more frames for less choppiness. I tried a 720p 30 fps video with a lot of action and it skipped frames in some places. Hopefully a 24 fps video with less moving things will do better.

ps I am writing a GLSL iDCT for fun, this may make jheora a bit faster if you skip the java iDCT.
Lol good luck with that  Tongue. DCT is actually used in a lot of places and in various ways inside a video codec, you might need to make a lot of mods to the jheora to make it work.

Quote
I've been doing syncing here @ work and basically the way it would appear to do it is you drive everything off of the audio, and buffer video frames behind. With the MPEG2 streams I'm dealing with the number of buffers I need is never more than 3 though, so it's not a big deal for us.
Here I am using 5 buffers and syncing to the system clock and it seems fine for the most part. When you try to sync to audio it's not really accurate because OpenAL queues up data in large pieces rather than in bytes.
Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #84 - Posted 2010-04-28 17:53:20 »

I'm queueing up audio buffers which contain the audio for 1 video frame; when I detect OpenAL has processed the audio for buffer (by polling every millisecond), I tell OpenGL to draw the next video frame, and by the time the buffer swap's occurred, OpenAL is well underway rendering the sound for that frame. This seems to be working out just great - sound seems to be perfectly synchronized with video.

Cas Smiley

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 605
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #85 - Posted 2010-04-28 17:58:14 »

I'm queueing up audio buffers which contain the audio for 1 video frame; when I detect OpenAL has processed the audio for buffer (by polling every millisecond), I tell OpenGL to draw the next video frame, and by the time the buffer swap's occurred, OpenAL is well underway rendering the sound for that frame. This seems to be working out just great - sound seems to be perfectly synchronized with video.

Cas Smiley

I can imagine it working perfectly, but also a tad slower, like losing a few millis every second in playback speed.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Offline delt0r

JGO Coder


Medals: 22


Computers can do that?


« Reply #86 - Posted 2010-04-28 18:04:49 »

Quote
Lol good luck with that  Tongue. DCT is actually used in a lot of places and in various ways inside a video codec, you might need to make a lot of mods to the jheora to make it work.
In theora its used in one place (I have read the spec and even hacked the jheora a bit a while ago.). This is not h.264. Its a much simpler codec and its decoding performance is quite a bit higher. In particular it doesn't do much intra frame prediction like h.264. This makes a iDCT in glsl theoretically possible. My 4x4 one is working pretty good. But the iDCT was only about 60% of the CPU usage the last time i profiled.

As for syncing, syncing of sound is what quite a few apps do. The reason is that it only matters that the sound matches the video, and a few milliseconds is not going to make any difference (1 ms per sec is about 3.6 seconds per hour.).  Even more important if your sound card clock is not matching the pc clock (some cards this is true) the voice will have drifted compared to the video, so you would need some way of time shifting the audio. Its easier just to match what matters, and use the sound card as the clock.

I have no special talents. I am only passionately curious.--Albert Einstein
Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #87 - Posted 2010-04-28 19:23:16 »

I can imagine it working perfectly, but also a tad slower, like losing a few millis every second in playback speed.
It can't lose any time without gaps in the audio - of which there are of course none. So playback is at precisely the correct rate, which is very accurately controlled by OpenAL's underlying audio backend.

Cas Smiley

Offline Momoko_Fan

Junior Member


Medals: 2



« Reply #88 - Posted 2010-04-28 19:52:01 »

I profiled jheora performance on the HD video:

31% - A method called "ReconInterHalfPixel2"
28% - DeBlocking filter
16% - Huffman and in general decoding from file
9%  - A method called "ExpandKFBBlock"
6%  - A method called "ReconInter"
5%  - YUV to RGB, OggDemux, audio

Notice that IDCT is not even in this list, its only 0.1%...
Btw, the decoding thread is seperate from the GL thread in my video player.

Quote
I'm queueing up audio buffers which contain the audio for 1 video frame; when I detect OpenAL has processed the audio for buffer (by polling every millisecond), I tell OpenGL to draw the next video frame, and by the time the buffer swap's occurred, OpenAL is well underway rendering the sound for that frame. This seems to be working out just great - sound seems to be perfectly synchronized with video.
Ah cool. I don't think I can do that tho. I have a better idea on how to make the audio clock more accurate.
Offline delt0r

JGO Coder


Medals: 22


Computers can do that?


« Reply #89 - Posted 2010-04-28 20:14:58 »

I don't have my profiling results handy. It was last year so the hardware was not that old. So I don't really trust your results. I will believe that halfpel and De blocking filter are high on the list since they really suck up a lot of raw mem bandwidth. But Huffman decoding is really fast even done badly while  YUV->RGB (720p?) in java only using 5%? Even that's surprising (but perhaps not on faster modern CPUs). 

What profiling tool did you use, how long did you collect stats for?  Note i added some of my own timing stuff since these days i am finding hard to get a accurate profiler.  Even then i replace the "slowdown" areas with a no op to see if it really does change the timings.

I have no special talents. I am only passionately curious.--Albert Einstein
Pages: 1 2 [3] 4
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (31 views)
2014-04-15 18:08:23

BurntPizza (28 views)
2014-04-15 03:46:01

UprightPath (43 views)
2014-04-14 17:39:50

UprightPath (26 views)
2014-04-14 17:35:47

Porlus (43 views)
2014-04-14 15:48:38

tom_mai78101 (64 views)
2014-04-10 04:04:31

BurntPizza (124 views)
2014-04-08 23:06:04

tom_mai78101 (224 views)
2014-04-05 13:34:39

trollwarrior1 (190 views)
2014-04-04 12:06:45

CJLetsGame (198 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!