<div dir="ltr">Hi all,<div><br></div><div>for an (open source) application I'm building (<a href="https://github.com/ibooij/big-ring">https://github.com/ibooij/big-ring</a>) I'm using gstreamer to display video content according to the speed in which the camera is travelling in a simulation.</div><div><br></div><div>Currently I'm using a single playbin element, coupled to an appsink. From the appsink, I upload the</div><div>frame to a OpenGL texture. The conversion from YUV to RGB and the scaling is done using shaders.</div><div><br></div><div>What I'm doing now is the following:</div><div>1. Measure the power a cyclist is generating (using an ANT+ power meter)</div><div>2. Calculate the (approximate) speed the cyclist is travelling using power, current speed, weight and grade. The grade comes from a meta-data file that comes with the video.</div><div>3. Calculate the distance (from the start) at which the cyclist is.</div><div>4. Calculate the video frame that needs to be displayed.</div><div>5. If the a new frame needs to be displayed, I send a step event to the playbin.</div><div><br></div><div>A new simulation step is performed every 1/30th of a second. For some parts of a course, mainly downhills, the "cyclist" will travel faster than the original camera speed, which means that the step event in step 5 will perform a step of more than 1 frame.</div><div><br></div><div>I have 2 questions about this use of gstreamer:</div><div><br></div><div>1. The CPU-use seems be quite high. I was wondering if doing these step events might be inefficient. I've tried to simply change the speed of the video multiple times a second, but that did not work out, as the video seemed to step back (to a key-frame?) when changing speed. What would be the (most) correct way to do this?</div><div>2. I use a playbin now. Because I obviously cannot use any sound from the videos (most don't have any as they are made just for this kind of use), would it perhaps be smarter to build a pipeline that omits any sound decoding? </div><div><br></div><div>The videos I'm using are (at the moment) all mpeg-4, in an AVI container. The resolutions and frame rates vary.</div><div><br></div><div>Thanks for taking the time to read these question,</div><div>cheers,</div><div>Ilja Booij</div><div><br></div></div>