1 of 3
1
MT4j and gstreamer
Posted: 04 March 2010 11:39 AM   [ Ignore ]
Rank
Joined  2010-03-02
Total Posts:  9
New Member

Hello,

I’m having problems playing a video file with MT4j. The error:

0:00:11.008242000  3280   003F6060 ERROR                basesrc gstbasesrc.c:2834:gst_base_src_activate_pull:<sourceFailed to start in pull mode
ERROR during gstreamer playback
Could not open resource for reading.
ERROR during gstreamer playbackCould not open resource for reading.
ERROR during gstreamer playbackCould not open resource for reading.
ERROR during gstreamer playbackCould not open resource for reading.

Gstreamer is installed using an oSSBuild installer (from http://code.google.com/p/ossbuild/downloads/list), but also tried OABuild, WinBuild or those from gstreamer homepage directly.
At least he seems to find the gstreamer libraries, when I uninstall them, I get an UnsatisfiedLinkError.

Is this a codec/gst-plugin problem? Tried different videoformats (WMV9, MPEG2, MP4(H264), Cinepak AVI...)

Does somebody know, how to solve this? B.t.w. OS is Windows XP (32bit), but also tried Win7 (32bit) with same result.

thx,
sebungem

Profile
 
 
Posted: 04 March 2010 12:09 PM   [ Ignore ]   [ # 1 ]
Avatar
RankRankRank
Joined  2008-04-30
Total Posts:  283
Sr. Member

Hi,

try one of the OA builds from this site: http://sourceforge.net/projects/gsvideo/files/gsvideo/20080911/
Theyre a little older but worked for me and belong to the GSVideo library im using. I suggest uninstalling all previous gstreamer builds first.
Cheers,
Chris

 Signature 

MT4j - Multi-Touch for Java!

Profile
 
 
Posted: 04 March 2010 12:59 PM   [ Ignore ]   [ # 2 ]
Rank
Joined  2010-03-02
Total Posts:  9
New Member

Hi TherioN,

thanks for the reply, with the gstreamer build you posted at least videos without sound work. For all videos with sound gstreamer complains about “Missing element ‘volume’"…
Are there known audio-codec restrictions?
Will try some more files with different audiocodecs.

greetz,
sebungem

Profile
 
 
Posted: 04 March 2010 01:36 PM   [ Ignore ]   [ # 3 ]
Avatar
RankRankRank
Joined  2008-04-30
Total Posts:  283
Sr. Member

Most videos with sound worked for me. Dont know what the problem is. But since the gestreamer built is a bit old and the gstreamer java lib a bit experimental there definitely can be bugs etc. I also had my share of problems isntalling and running gstreamer. When I have time Ill look into updating to the newer versions. Most .wmv videos worked good for me with sound.

 Signature 

MT4j - Multi-Touch for Java!

Profile
 
 
Posted: 08 March 2010 08:54 AM   [ Ignore ]   [ # 4 ]
Rank
Joined  2010-03-02
Total Posts:  9
New Member

After trying many different Videos, I still had no luck with the sound.

ERROR during gstreamer playbackMissing element 'volume' check your GStreamer installation.

If I understand right, the libgstvolume.dll is what is missing, in a forum I read, that this is not included in OABuild (http://n4.nabble.com/GStreamer-on-Windows-td969337.html)
Tried to copy a libgstvolume.dll from an GSVideo-download, but (not surprisingly) this didn’t worK wink

So i have no clue what to do right now, regarding to the output of gst-inspect audio decoders for ac3, aac, mp3… are installed (from ffmpeg), or am i missing any configuration to tell gstreamer to use the ffmpeg stuff?

Profile
 
 
Posted: 08 March 2010 12:31 PM   [ Ignore ]   [ # 5 ]
Avatar
RankRankRank
Joined  2008-04-30
Total Posts:  283
Sr. Member

Hm, well then im also out of ideas for now. Btw, my installation has the libgstvolume.dll. I could sent it to you if you want to try with that one.
Other than that you will have to wait till I update the libraries accordingly (which is a bit complicated because I introduced some changes to make it work ).

 Signature 

MT4j - Multi-Touch for Java!

Profile
 
 
Posted: 09 March 2010 03:06 AM   [ Ignore ]   [ # 6 ]
Rank
Joined  2010-03-02
Total Posts:  9
New Member

Thats interesting… I downloaded and installed the GStreamerOABuild-20080911.exe.
If you could send me your libgstvolume, I would like to try if it works with my install too.
Additionally I attached a listing of my gstreamer’s lib-directory, maybe there are some more differences?

Thanks very much for your help!
sebungem

File Attachments
gstreamer-lib-dir.txt  (File Size: 4KB - Downloads: 48)
Profile
 
 
Posted: 10 March 2010 07:34 AM   [ Ignore ]   [ # 7 ]
Avatar
RankRankRank
Joined  2008-04-30
Total Posts:  283
Sr. Member

This is my directory:

File Attachments
Gstreamer.txt  (File Size: 5KB - Downloads: 68)
 Signature 

MT4j - Multi-Touch for Java!

Profile
 
 
Posted: 10 March 2010 08:53 AM   [ Ignore ]   [ # 8 ]
Rank
Joined  2010-03-02
Total Posts:  9
New Member

Ok, so there are some more files missing… seems you have a different build (your files are mainly from 2008/02/02, while mine are from 2008/09/11).
Do you know if this build still available for download somewhere, or could you provide the installer you used to me?

Profile
 
 
Posted: 10 March 2010 11:52 AM   [ Ignore ]   [ # 9 ]
Avatar
RankRankRank
Joined  2008-04-30
Total Posts:  283
Sr. Member

Well, I thought I was using the build installer from the link I gave you..
You could try an older version from here: http://forja.rediris.es/frs/?group_id=96
Or a very old one from here: http://gstreamer.freedesktop.org/pkg/windows/releases/

Ill try to get the latest GSVideo library integrated as soon as I have time.

 Signature 

MT4j - Multi-Touch for Java!

Profile
 
 
Posted: 11 March 2010 07:26 AM   [ Ignore ]   [ # 10 ]
Rank
Joined  2010-03-02
Total Posts:  9
New Member

Now it’s working with the installers from http://gstreamer.freedesktop.org/pkg/windows/releases/
(I thought, I had tried them out, but maybe I missed a restart or the PATH was broken...)
This is version 0.10.17 of gstreamer, while the version I had before was 0.10.20.

Installed all installers (gstreamer, plugins base, good, bad, ugly and gstffmpeg). Now my dirlisting looks exactly like yours wink
This installers required GTK2 runtime, I took gtk2-runtime-2.12.6-2008-02-02-ash.exe from here: http://gtk-win.sourceforge.net/home/index.php/en/Downloads
(newer versions had a DLL missing required by gstreamer)

So sound is working now, but the video quality is noticeable poorer. The playback is jerking and not smooth (tested with mp4 (h264), mov (h264), WMV 9 and an xvid AVI) The playback of the no-sound videos I got running with the 0.10.20 version is also not smooth any more in the 0.10.17 version.
The Java console reports some warnings

** (java.exe:1420): WARNING **: Add decoder dsicinvideo (97please

** (java.exe:1420): WARNING **: Add decoder gif (100please

** (java.exe:1420): WARNING **: Add decoder kmvc (88please

** (java.exe:1420): WARNING **: Add decoder nuv (87please

** (java.exe:1420): WARNING **: Add decoder smackvid (86please

** (java.exe:1420): WARNING **: Add decoder targa (96please

** (java.exe:1420): WARNING **: Add decoder tiertexseqvideo (98please

** (java.exe:1420): WARNING **: Add decoder tiff (99please

** (java.exe:1420): WARNING **: Add decoder VMware video (92please

** (java.exe:1420): WARNING **: Add decoder dsicinaudio (86045please

** (java.exe:1420): WARNING **: Add decoder imc (86046please

** (java.exe:1420): WARNING **: Add decoder smackaud (86042please

** (java.exe:1420): WARNING **: Add decoder wavpack (86044please
OIL
ERROR liboilcpu.c 282oil_cpu_i386_kernel_restrict_flags(): Operating syst
em is not known to support SSE
.  Assuming it doeswhich might cause problems

Maybe the last one is a problem, I tested on Win7 prof. 32bit. I will give it a try on Win XP now.

Edit:
It’s the same with XP. So I will keep an eye on the development and try again, when new GSVideo version is integrated.

Nevertheless the framework looks very well, good work!

Profile
 
 
Posted: 13 March 2010 05:19 PM   [ Ignore ]   [ # 11 ]
Avatar
RankRankRank
Joined  2008-04-30
Total Posts:  283
Sr. Member

Hey,

good news everyone wink
I’ve integrated the new GStreamer bindings into MT4j. I’ve tested it on windows using the GStreamer-WinBuild-0.10.3 which I recommend to use and install in the default directory (C:\gstreamer).

So to run Videos using the MTMovieClip class you need to install the following on Windows:
Install GTK
http://gtk-win.sourceforge.net/home/index.php/en/Downloads
Install Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)
http://www.microsoft.com/downloads/details.aspx?FamilyID=a5c84275-3b97-4ab7-a40d-3802b2af5fc2&DisplayLang=en
Install Gstreamer
http://forja.rediris.es/frs/download.php/1207/GStreamer-WinBuild-0.10.3.exe

Video runs alot smoother and alot of media are supported.
You can get the new version directly from the google code SVN. Would be nice if someone could test this and provide some feedback. Im currently overhauling the MTMovieClip class which was a bit hacked together.

Heres a sample picture of running a full divx movie with sound in MT4j. You can transform the movie in 3D space and of course with multi-touch gestures.
So, whos up for developing a MT Movieplayer/Browser? smile

Chris

Image Attachments
movie.jpg
 Signature 

MT4j - Multi-Touch for Java!

Profile
 
 
Posted: 15 March 2010 12:28 PM   [ Ignore ]   [ # 12 ]
Rank
Joined  2010-03-02
Total Posts:  9
New Member

Alright then,
now that I have a Day of testing with the new lib behind me, I can say, that the video performance/stability has improved!
My test pc was a Dell Optiplex 780 with Intel Core2 Quad 2.83GHz and NVidia GeForce GT 240 with 512MB. OS: Win7 professional 32Bit

At least I hoped to get a Full HD video (1920x1080p) playing smoothly, but this seems not to be possible due to the processing-based rendering mechanism (copying the videoframes as textures onto a MTComponent). With 30 fps this process shouldn’t last longer than 33.3 milliseconds for each frame. This worked quite well for videos up to 1024x576 (DivX).
If it comes to videos with 1280x720p the texture-copy-process starts lasting longer than those 33.3 ms resulting in the loss of roundabout one frame per second. This may be noticable or not, depending on the content (this was the same for DivX, MP4 H264 and MOV H264; all with about 5MBit/s)
Smooth playback of 1080p videos was not possible with my setup. This is not a gstreamer problem, HD videos run perfect when you start a pipeline from the command line.

There seems to be no other way to display a video than the copy-frame-to-texture method? At least i found none, an to say this again: It works very well for videos smaller than HD.
With a bigger PC and a better graphics card it might be possible to display bigger videos.

Profile
 
 
Posted: 15 March 2010 04:52 PM   [ Ignore ]   [ # 13 ]
Avatar
RankRankRank
Joined  2008-04-30
Total Posts:  283
Sr. Member

Yes, there is apparently no other method than copying the buffer into an opengl texture. Im already bypassing the processing pipeline and put the gstreamer pixel buffer directly into the opengl texture object for performance. But of course there is some overhead from the java bindings and the opengl pipeline (but hey, at least you can do all sorts of cool stuff with the movie as a texture in opengl wink)
As you said - with a high-end PC HD movies might play smoothly. Future versions may improve performance further. I’ve also heard from some people that the same videos run smoother on linux than on windows.

Chris

 Signature 

MT4j - Multi-Touch for Java!

Profile
 
 
Posted: 06 May 2010 11:34 AM   [ Ignore ]   [ # 14 ]
Rank
Joined  2009-10-27
Total Posts:  3
New Member

Hi!

I followed the instruction but all I get is the following error message:

** (javaw.exe:3148): WARNING **: Failed to load plugin ‘C:\gstreamer\lib\gstreamer-0.10/libgstffmpeg.dll’: The operating system cannot run %1.

** (javaw.exe:3148): WARNING **: Failed to load plugin ‘C:\gstreamer\lib\gstreamer-0.10/libgstmad.dll’: The operating system cannot run %1.

** (javaw.exe:3148): WARNING **: Failed to load plugin ‘C:\gstreamer\lib\gstreamer-0.10/libgstspeex.dll’: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.

Windows XP 32, Java 1.6.0_20

Any idea?

Profile
 
 
Posted: 06 May 2010 01:47 PM   [ Ignore ]   [ # 15 ]
Avatar
RankRankRank
Joined  2008-04-30
Total Posts:  283
Sr. Member

Have you downloaded the Microsoft Visual C++ 2008 SP1 Redistributable Package (x86) ?
Google seems to suggest that you download and install these:
http://www.microsoft.com/downloads/details.aspx?familyid=32BC1BEE-A3F9-4C13-9C99-220B62A191EE&displaylang=en

http://www.microsoft.com/downloads/details.aspx?FamilyID=200B2FD9-AE1A-4A14-984D-389C36F85647&displaylang=en

http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5FC2&displaylang=en

 Signature 

MT4j - Multi-Touch for Java!

Profile
 
 
   
1 of 3
1