I am building an application where it is essential to record my desktop. I decided to use gstreamer since i m using c++ to develop my application .
I use ximagesrc to record my dekstop.
this is how the line in the code looks
gst_parse_launch("ximagesrc ! queue ! videoscale ! video/x-raw-rgb,width=640,height=480,framerate=30/1 ! queue ! ffmpegcolorspace ! theoraenc ! queue ! oggmux ! filesink location=test.ogg",&error);
I am able to record the desktop. I am using dual core computer with 2 GB Ram . But the problem i have is , when i play the recorded video , at time it plays and at times, it hangs . I am not able rely on this completely. Is there any solution ? or am I doing anything wrong here ?
I posted the same question in the forum for gstreamer and i got some good responses.
One of them mentioned to use “use-damage=0” with ximagesrc. And i reduced the frame rate as well. Its looks like this.
This worked well and the machine didnt hang after this. The main reason i think its because, when you use use-damage=0, it sends the updates of the screen rather than sending the whole screen. Hence, it reduces the cpu as well and better the performance.