.ogg theora video in openFrameworks?

I prefer to use .ogg theora for my video. I can’t get oF to open and play my .ogg video files. Is this possible? If so, is there something I’m missing? I’m running Ubuntu 9.10 64bit, oF0061 with codeblocks.

The linux video player in 0.061 uses Gstreamer which should be able to handle .ogg theora files. Can you play your files with Totem (which uses Gstreamer), the default movie player for Ubuntu? Otherwise if you can put one of the files online somewhere for testing that would be helpful.

By the way I just converted the default video for the OF movieplayer example (fingers.mov) to ogg theora using the command line tool ffmpeg2theora and it plays fine (on ubuntu 9.10 32 bits)…perhaps it’s best to upload of the videos that doesn’t play to investigate what the problem is, or perhaps you have some 64bits issue.

Many thanks Grimus. I think I may have a 64bit issue here.

I tested it out in the moviePlayer example. I converted the sample video “fingers.mov” to “fingers.ogv” and made the change in the .cpp. The build returns no errors, but running in the moviePlayer window I get the message:

Segmentation fault.

Process returned 139 (0X8B) execution time …

I also tried running several other .ogv files. No dice. But the same videos will play in .avi format.

Any thoughts?

Probably better if Arturo has a look, he wrote the Gstreamer player and last time I checked he was using a 64-bit Ubuntu system…

hi

can you post a video that is not working. ogg should work without problem, indeed is supported in ubuntu by default without needing to install any additional codecs.

I uploaded an .ogv version of the oF example fingers.mov here: http://jarednielsen.com/fingers.ogv

I made the conversion with ffmpeg2theora. The .mov extension plays fine in oF, but the .ogv will not.

tried this ogv file on my karmic 64bit and i got a segmentation fault just like jared…

but it works fine with totem

Hi,

It would be great to know if anyone had any luck with this?

I am having the same problem with ogg videos.
Default movie player plays them fine but I get the segmentation fault when in OF.

I am also getting the same segmentation fault randomly (roughly one in ten times) when using other formats like H.264 .mov exported on using Mac Quicktime

I am running 0061 on ubuntu 9.04 64-bit

Thanks,

Dave

i think its a bug in oF.

tried to play the video with

  
gst-launch -v filesrc location=fingers.ogv ! decodebin ! xvimagesink  

and this works well on lucid 64bit.

maybe you can try that?

ben

hi

just had a moment to test this, it’s working without problem for me in lucid 64bit with the last version in github

have made some changes to how the videoplayer is setup so perhaps that solved the problem

Hello,

Still no luck for me on Jaunty -

Ben’s gstreamer test worked as expected but the last version on github still gives me the segmentation fault with the fingers.ogv test file every time.

I don’t know if the issue is related but the segmentation fault is also still occuring randomly with other videos (H.264) too. Not the easiest thing to test but has anyone else noticed this as well?

I am going to look at upgrading to Lucid in the next few days - hopefully that will stabilise things.

Thanks

I just tested around and noticed that the ogg playback works on lucid 32bit out of the box!
but can’t get the problems fixed on 64bit.

the output:

  
OF_VERBOSE: loading file:///home/ben/code/openFrameworks/apps/myApps/moviePlayerExample/bin/data/movies/fingers.ogv  
  
(<unknown>:10632): GStreamer-CRITICAL **: gst_event_new_new_segment_full: assertion `start <= stop' failed  
  
(<unknown>:10632): GStreamer-CRITICAL **: gst_event_set_seqnum: assertion `GST_IS_EVENT (event)' failed  
Segmentation fault  
  

I tried to debug the app and tracked down line 880 in ofGstUtils.cpp

  
gst_element_get_state(gstPipeline,&state,NULL,2*GST_SECOND);  

but there I’m stuck :frowning:

ok I think I got it!
Its a problem with the fmodex libs!

can you do this steps to confirm this:

open up the openframeworks project located in libs/openframeworksCompiled/project/linux64

comment out this lines in ofMain.h (shoudl be line 32 & 33)

  
  
#include "ofSoundStream.h"  
#include "ofSoundPlayer.h"  
  

open app/ofAppRunner.cpp
comment out this line (should be 56)

  
ofSoundPlayer::closeFmod();  

Compile the Project (debug target).

copy and open the moviePlayerExample
right click on project -> properties -> project’s build options -> linker settings
there remove fmodex.
add a ogv file to play.
recompile it all.

Yep - this has solved it for me.

Thanks very much for your efforts ben!

benben,
I followed all of your steps above and still get a Segmentation fault when I run moviePlayerExample with an .ogv file. Any suggestions?

I’m following the steps as listed above by BenBen and when I compile I get:

  
  
error: ofSoundStreamClose' was not declared in this scope  
  

and a highlight on line 61 of ofAppRunner.cpp where ofSoundStreamClose() is called.

So I tried commenting that out and receive this notification:

You must select a host application to “run” a library…

Of course, I proceed and thus far have not encountered any errors.

I just want to verify whether or not I’ve done a bad bad thing.