Buffering video file in memory

Sebastian Dröge sebastian at centricular.com
Fri Nov 4 15:59:48 UTC 2016


On Fri, 2016-11-04 at 01:55 -0700, Mikl wrote:
> Hello,
> 
> I have a "small" video files. About 30-50 Mb
> 
> It is my use case to seek back and forward around one of the frames multiply
> times. Like you are finding best focus using microscope. And then move to
> next frame to seek around it.
> 
> Pipeline is this 1 video and 4 subtitles:
> video: filesrc ! matroskademux ! queue ! jpegdec ! videoconvert ! appsink
> subtitles: filesrc ! matroskademux ! queue ! appsink
> 
> I see some delay, caused my hard disk IO operations. Because in our time
> even 100 Mb is not a big deal, i want to load it in a memory.
> 
> My question is:
> *Can i modify my pipeline so, it will buffer complete file in a memory
> (better on a fly when loading frames) and latter perform seek from a
> memory?*
> 
> Otherwise, i need to make an internal buffer in my app.

You could use the queue2 or downloadbuffer elements after the
filesrc. By either storing in memory, or using a file on e.g. a tmpfs.

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161104/7a16d979/attachment.sig>


More information about the gstreamer-devel mailing list