Problems with playing video

Marco Trapanese marcotrapanese at gmail.com
Wed Sep 24 07:41:34 PDT 2014


Hi,
I wrote a very simple class to play mp4 h264 videos in my application. 
I'm working on a Rasbperry with a buildroot environment without X.
You might find this class here:

https://dl.dropboxusercontent.com/u/4143780/qplayer.h
https://dl.dropboxusercontent.com/u/4143780/qplayer.cpp

The use is pretty straightforward. The GUI calls play(), pause(), 
resume() and stop() functions as requested.

It works, but there are several weird behaviors I must fix:

1) when I call play("/path/to_my_video.mp4", true); it takes several 
seconds before the playing actually start. During this time you can see 
some "artifacts" on the screen, like colored diagonal lines - not so 
nice to see...

2) in the same way it takes several seconds to stop playing and you 
might see stuttering in both audio and video. Not good!

3) the most important issue is this one: sometimes happens the video 
doesn't start at all and each subsequent call will fail. I need to 
restart the application. As you can see in the play() function I make a 
new playbin element, so I don't understand why it doesn't work. And of 
course why it fails!

I put here a sample of the videos I have to play:

https://dl.dropboxusercontent.com/u/4143780/sample.mp4

Any hint is very appreciated!
Thanks
Marco



More information about the gstreamer-devel mailing list