ofVideoPlayer verbose output

Ciao!

so I’m exploring the video playback capabilities and I’m getting something never seen on mac or win, when I start to play a video I get this text in the console:

6.291768First Position: 0, 41 Duration: 6291
Frame Rate: 24

Seeking pos: 1125- Real: 125000
Seeking pos: 1041- Real: 41000

and the Seeking pos message goes on and on and on following the screen upsates…

I was trying to turn it off as I’m working on a machine where I have to squeeze all the possible performances out, but with no luck.

I checked for printf commands writing Seeking… in ofVideoPlayer.cpp but found nothing… any suggestions?

Thanks!

This messages are hardcoded in fobs, the library we use to play video files in linux. So the only chance you have to disable them is by recompiling that library. In 0.06 we use the new fobs version that doesn’t output those messages. We are working just now to release 0.06 as soon as possible.

Anyway, don’t expect too much performance playing video under linux by now. In windows/mac, quicktime decodes videos in it’s own threads super efficiently, but in linux the decoding is done by fobs when you call idleMovie, so it’s really much slower.

ah! ok, thank you arturo!

I was noticing this performance gap testing with various video codecs. For example on my Aigo machine using the movie player embedded in the midinux distro I can play 640x480 30fps H264 @ 4mbit/sec while on the same machine in OF moviePlayerExample is impossible to playback the same video at 30fps, it goes approximately at 2-3fps, ten times slower, so now I understand why, is because of the fobs library we use in OF.

wouldn’t be possible to use the library Midinux is using? It looks like it is very well made and, as it is made to have great video playback performances on my Aigo device which is a very small x86 computer, should bring great performances to all the other computer as well!

I can research about this topic if you think can be useful in OF!

Thanks claudio

Yes, I’ve tried with several options to substitute fobs, there’s a vlc addon posted in extend, that should work in fedora. The problem is vlc doesn’t have an accurate speed control. Expect delays of 1sec since video pauses or changes position. But if you only need to play forward it’s much faster than fobs.

I suppose what you have in your distro is gstreamer, i’m currently trying to adapt some code from the new opencv release that use gstreamer as video input, But if you find something different, of course it will be super useful.

I think you are right arturo, if i check the basic packages my machine comes equipped with I see
these packages related to video

gstreamer-dbus-media-service - 0.1.12 -1.i386
gstreamer-python - 0.10.7.fc6.i386

libva - 0.29-6.i686 - Video acceleration library

pymidcam - 0.8.1-1.noarch - The midinux camera utilities

so gstreamer would be the way to go! why we’re using fobs instead?

well, gstreamer is a framework in itself, so trying to integrate with another framework is kind of difficult. There’s some code in the new opencv that seems promising, but I cannot control play speed, yet :wink:

Yeah I was playing a video using OF the other day and not only did I notice how slow it was, the frame rate was fluctuating wildly, which is _really_ bad, so I’m voting to get rid of FOBS as well. Video playback should be on a separate thread as well if possible.
I’ll have a look at gstreamer as well and see if I can help…

Ciao grimus!

I’ve found this

http://www.eisfuchs.info/eisfuchs/gstreamer/

maybe can be useful, it tells a personal experience using gstreamer and c++

Hi thanks, yeah I’ve seen that link.
I also came across this which was interesting:
http://scaletempo.sourceforge.net/0/

  
Hi thanks, yeah I've seen that link.  
I also came across this which was interesting:  
[http://scaletempo.sourceforge.net/0/](http://scaletempo.sourceforge.net/0/)  

It looked to me at first like speed control for the whole player, but i think is just some granular sampling over audio to do a time stretching so you can hear the audio at the same speed than video without pitch change, but don’t enhance speed control over the same video… (interesting anyway)

Yeah it’s mainly just for scrubbing audio without pitch effects, but I thought there might be some useful Gstreamer seeking code in there somewhere…

gstreamer supports faster seeking than vlc as far as I’ve tried, but the problem is you cannot call it at any time, gstreamer is a framework, what simplifiying means it calls you. It has its own loop as for example glut does, so the problem with seeking is doing it at the right time.