Faster Video Seeking
Lasse Laursen
gazoo at 42.dk
Wed Mar 26 04:22:10 PDT 2014
Dear GStreamer-devel,
I am a little surprised that I've not been able to find any discussions
or thoughts on improving the seek-times of Gstreamer. Perhaps it's
because I'm in kind of a unique usage scenario? I'm using video
scrubbing as a means to test an interaction method, so I've created a
simple app where the user can drag a slider widget to scrub through a video.
I've built the playback pipeline using 'uridecodebin' and use it to
create a raw frame I can display on a texture in my app. I use the
'gst_element_seek_simple' function call to seek through frames in a
video. I run it in a separate thread and ignore any additional calls
until the original call has returned. The video is in webm format with a
resolution of 1280x720. Currently, it's very juttery. Seeking to a new
frame takes quite a while. Much longer than I need for properly testing
my interaction method. I'm assuming the slow seek times is due to
gStreamer accessing the video as stored on the HD? So slow HD access times.
Potential Solutions:
1) The easiest solution is undoubtedly to reduce the resolution. Not
great, but a last resort, if needed.
2) Load the entire video file into memory. Is this even possible via
gStreamer? The file is only about 1 minute long and fills 15 megs
encoded as a webm file. This would be my preferable solution - but
again, I worry if it's possible? Could only find 'uri' paths that point
to files or online locations.
3) Optimizing the gStreamer pipeline while still keeping the rest of my
code intact. Is using uridecodebin a bad thing? Is there a better/faster
way for me to display single frames in my app?
I hope someone can hint me towards the most viable approach.
Regards,
Lasse
More information about the gstreamer-devel
mailing list