We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpVideo Capture,  Movie Playback,  Vision Libraries › New Cross-platfrom JMC Video Library Available
Pages: 1 2 3 4 5
New Cross-platfrom JMC Video Library Available (Read 24257 times)
Re: New Cross-platfrom JMC Video Library Available
Reply #15 - Feb 2nd, 2009, 8:12pm
 
i'm having the same "MediaUnsupportedException: Unsupported Media" problem. winxp 64. tried installing latest javafx and copy the libs. also tried installing k-lite 64bit codec pack: videojmc played garbled noise without image, videotexture returned the error of doom.
also tried installing k-lite 32bit full pack. videojmc now works, but videotexture still no go :/
Re: New Cross-platfrom JMC Video Library Available
Reply #16 - Feb 9th, 2009, 3:07pm
 
Hi, a newer version of the jmcvideo library has been posted at this site:

http://www.mat.ucsb.edu/~a.forbes/PROCESSING/jmcvideo/jmcvideo.html

The main change is that I now include separate versions for OSX, Windows, and Linux. I have tested them with various formats and the website includes a table describing what formats are supported on which platforms. FLV files play on all three. (You'll need to install a the k-lite codec pack to play flv on windows).

Following the suggestion of someone who posted above I've also split the demos into 2 zips. One contains a super basic "Video Loop" sketch for the 2D and OpenGL version of jmcvideo. And the other contains some other experiments and video files, so it is a fairly large download.

I haven't tested very many formats, let me know if a particular format works or doesn't work on your os.

Aslo, the klite codec pack for windows seems to cover a lot of formats, but I still can't get a .mov file to play on windows.

-Angus


Re: New Cross-platfrom JMC Video Library Available
Reply #17 - Feb 9th, 2009, 3:21pm
 
@ps

VideoTexture requires the processing and java opengl libraries. Do you know if they work on Windows 64bit? Since you are getting the VideoJMC sketch to work it seems like the problem is not with the JMC code itself. I've just tried out the VideoTexture sketch on WinXP (32-bit) with the klite codec and it is working.

@homesick_alien

I just uploaded a new version of the jmcvideo library. The download for windows comes with jmc1.0.1. This update works better on windows (but not as well on mac and linux, so those use jmc1.0.0). Try it out, it should resolve the "java.lang.UnsatisfiedLinkError: com.sun.media.jmcimpl.plugins.directshow.DShowEngine.ndsInit()Z" error you were getting.
  I've also made two simple demos. For the regular JMCMovie version of the program assumes that the video is in the dataPath (ie, the sketch/data/ directory). The VideoGL version requires you to pass in the full path to your file, or to call dataPath() on your file if it resides in the data directory. If you are on windows then .wmv files should definitely work, even without a codec pack. The other formats probably require additional codecs.

-Angus
Re: New Cross-platfrom JMC Video Library Available
Reply #18 - Feb 12th, 2009, 6:58am
 
On win XP, the demos work when run from the Processing IDE but do not work when I export them as windowed or fullscreen applications? The videos don't seem to load at all.
Am I forgetting something such as an import statement?

Thanks in advance!
Re: New Cross-platfrom JMC Video Library Available
Reply #19 - Feb 20th, 2009, 4:19pm
 
I've been working with the library in MAC OX 10.4 and trying to load different files over http:

1. I couldn't use the example loading an HD MOV over http. After calling the switchVideo() method it always adds the suffix "file/:Applications" and then Processing throws a MediaUnavailable exception. The only way I could get an url to be left alone was by making an URL object and sending it to  the VideoGL constructor. But should it actually work automatically? Is that absolute path specified somewhere?

2. Haven't found much info about ogg. After I got the URL thing to work, the program threw an "unsupported Media" message. Has anyone successed into loading .ogg files into processing?

Thanks for your comments
Re: New Cross-platfrom JMC Video Library Available
Reply #20 - Feb 21st, 2009, 12:47am
 
@poliph
I may have hard-coded the library to search the data directory by default and forgotten to update the switchVideo method to accept http as well as files in the data directory. I will fix this in the near future (within a couple of days) and post to this list when I have made the change. I haven't done a comprehensive test on all media formats. If you come across one that works (or that definitively doesn't work) on a particular platform please let me know and I will update the website with that information.

@XLd
I'm not sure why the video isn't playing within exported applications. I'll test it out soon and see if there is an issue with my code. What kind of error are you getting?

-angus
Re: New Cross-platfrom JMC Video Library Available
Reply #21 - Feb 21st, 2009, 5:13pm
 
Hi,

Well thanks for the update. I kept on testing and ended up downloading this qt components: http://www.xiph.org/quicktime/download.html
after that, the ogg files are being loaded and played. So I'm not sure if they're being loaded via QT or in some other way. Anyhow I'm eager about making it work online, so it would be perfect that the library itself could take care of the ogg, which i think is doable, but more urgently that it could be used in an applet. You think that will be possible?

thanks for the superb work

Re: New Cross-platfrom JMC Video Library Available
Reply #22 - Feb 21st, 2009, 7:56pm
 
I figured out the exported problem by manually adding a "data" folder with the source video inside to the exported program directory.

However, I tried your VideoTexture demo in the IDE but only sound plays. There is no error message and the screen is completely blank. This occurs on winXP SP3 but not on ubuntu 8.10. I need the added speed of openGL for playing higher res videos.

Thanks for your help!
Re: New Cross-platfrom JMC Video Library Available
Reply #23 - Feb 28th, 2009, 7:59pm
 
Hi, I am in the middle of doing a couple of updates, but wanted to let people know that I have verified that .ogg files are supported on Linux.

However, when testing on Ubuntu I am getting the following error when trying to stream video (I've tried .ogg, .mov, and .flv files which def. work when running locally):

"jackd not found at /sh"

Then I install jackd using apt-get, and then I get this error:

"JACK tmpdir identified as [/dev/shm]"

I am able to hear the video, but not see it.

Does anyone have any idea what might be a way to solve this?

Here's the code I'm using to stream using a video from wikipedia:

Code:

import jmcvideo.*;
import processing.opengl.*;
import javax.media.opengl.*;

VideoGL myMovie;

void setup() {
size(320, 240, OPENGL);
background(0);

// Load and play the video in a loop
String HTML_FILE = "http://upload.wikimedia.org/wikipedia/commons/3/3a/Harry_Truman_video_montage.ogg";
URL url = null;
try
{
url = new URL(HTML_FILE);
}
catch(Exception e)
{
println("errror!");
}
myMovie = new VideoGL(url);

myMovie.loop();
}

void draw()
{
PGraphicsOpenGL pgl = (PGraphicsOpenGL) g;

GL gl = pgl.beginGL();

myMovie.alpha = 20f/255f;
myMovie.image(gl, mouseX -(myMovie.vw/2)/2, mouseY-(myMovie.vh/2)/2,
myMovie.vw/2, myMovie.vh/2);

pgl.endGL();
}


Btw, this code works fine streaming .flv or .mov files on OSX.

Thanks, Angus
Re: New Cross-platfrom JMC Video Library Available
Reply #24 - Mar 3rd, 2009, 10:40pm
 
Hey am having trouble running any of the examples on vista home basic - tried video loop and video texture with .mov .flv and .avi and it either get error message "unsuported media" or it comes up a blank screen and then java crashes - Java platform SE bianary stopped woring etc.
Re: New Cross-platfrom JMC Video Library Available
Reply #25 - Mar 4th, 2009, 1:43am
 
Hi, you may have to install the k-lite codec pack to use certain media formats. I link to the download from the jmcvideo website (http://www.mat.ucsb.edu/~a.forbes/PROCESSING/jmcvideo/jmcvideo.html).

I don't have windows vista, so I haven't done any testing on it. It should work though. Let me know if installing the codec pack works. Thanks, Angus

Re: New Cross-platfrom JMC Video Library Available
Reply #26 - Mar 4th, 2009, 12:45pm
 
hey angus got the 2 basic examples working with the k-lite codec pack but none of the demo sketches seem to be workin
Most seem to be working but in the video grains demo still getting the unsupported media error but tried with a couple of different formats flv mov etc and in the video point it works for a couple of seconds before this error msg comes up....  

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0ed2e65a, pid=5996, tid=676
#
# Java VM: Java HotSpot(TM) Client VM (11.0-b15 mixed mode windows-x86)
# Problematic frame:
# C  [atioglxx.dll+0x6ee65a]
#
# An error report file with more information is saved as:
# D:\College Stuff\processing-1.0.1\hs_err_pid5996.log


And with the video texture  i keep getting an unsupported media error again for this line as if it can't find the files in the data directory.

videos[i] = new VideoGL(dataPath(filenames[i]));

thanks for your help

eoin
Re: New Cross-platfrom JMC Video Library Available
Reply #27 - Mar 4th, 2009, 7:47pm
 
@ekinsy

Thanks for testing on Vista. As long as the two basic examples work you should be able to make a project using the jmcvideo library. I wrote all of the more involved demos on OSX, and some of those demos have hard-coded media files which Vista may not support, or they test out backwards playback which only works for certain platform/format combos etc. Feel free to send me a link to or the code for a project that works on Vista and I can add it to the demos section of the site. As I get more feedback I'll try to include more basic demos that will work on all platforms.

-angus
Re: New Cross-platfrom JMC Video Library Available
Reply #28 - Mar 5th, 2009, 5:39pm
 
i'm working on a processing app right now in which I am using the JMCVideo lib to playback movie files that are used for the background. Currently, I'm loading 7 short videos (none longer than I'd say 10 seconds) at startup, stopping them all from playing inside the setup. Most of the time, only one video is being played back at a time except for when a crossfade is happening, which lasts 3 seconds.

Anyway, I am experiencing some weird performance issues. Often a video will take as long as 5 seconds or so from when bounce() is called to start playing back again and for the first few seconds of this hiccup in video playback, it will also stop up the Processing draw loop altogether. When I first experienced this, I drastically scaled back the size of my videos from 720x480 to 320x240. They are all encoded with Photo-JPEG compression, which to my knowledge is a very fast codec to decode.

I'd appreciate any suggestions for how I might improve performance. This project is being developed out of Eclipse and I'm allocating 4 gigabytes of memory to it. This is on a late-2008 MacBook Pro with the Nvidia 9600GT w/ 512 megs of ram.

Thanks for any advice you can give.
Re: New Cross-platfrom JMC Video Library Available
Reply #29 - Mar 5th, 2009, 7:25pm
 
@adm

send me a link to your sketch and data files if you want. i can take a look and see if i can help debug.

-angus
Pages: 1 2 3 4 5