Fastest way to navigate to needed frame (????? ?????)

Marianna Smidth Buschle msb at qtec.com
Wed Aug 16 12:18:50 UTC 2023


Well, I guess that depends on what exactly you are getting out of the 
decodebin.
You can fx from caps define that you want completely RAW and decoded 
frames or something in between: demuxed buffers, etc.

If you consider fx h264 buffers I suppose you would be getting both key 
frames and B frames and I guess you could kind of speed things up by not 
decoding all frames, but only decoding when you are at the desired index 
(remembering that if the frame you want is not a KF you need the 
previous KF in order to decode it).

Anyway I think the best is to play around with the SEEK and see if you 
can make that work in the desired way, because I would expect it to be 
the most efficient way.

On 15/08/2023 14.00, gstreamer-devel-request at lists.freedesktop.org wrote:
> Send gstreamer-devel mailing list submissions to
> 	gstreamer-devel at lists.freedesktop.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> or, via email, send a message with subject or body 'help' to
> 	gstreamer-devel-request at lists.freedesktop.org
>
> You can reach the person managing the list at
> 	gstreamer-devel-owner at lists.freedesktop.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of gstreamer-devel digest..."
>
>
> Today's Topics:
>
>     1. Re: Fastest way to navigate to needed frame (????? ?????)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 14 Aug 2023 20:11:25 +0300
> From: ????? ????? <sharov_am at mail.ru>
> To: Marianna Smidth Buschle <msb at qtec.com>
> Cc: gstreamer-devel at lists.freedesktop.org
> Subject: Re: Fastest way to navigate to needed frame
> Message-ID: <1692033085.783629846 at f750.i.mail.ru>
> Content-Type: text/plain; charset="utf-8"
>
>
> Hi, Marianna! Thank you for reply!
> ?
>> but something like H264 is dependent on key-frames?
> ?
> Am I right that in case of mp4 files it means that?there is no faster way to get k-th?frame if only call
> pull-sample method k-times ??
> ?
> ?
>> ???????, 11 ??????? 2023, 9:55 +03:00 ?? Marianna Smidth Buschle <msb at qtec.com>:
>> ?
>> I would try seeking as you mentioned.
>>
>> Though I'm not sure if you can get the frame number directly or if you
>> need to convert based on time.
>>
>> I guess part of it also depends on your encoding, like a MJPEG allows
>> for individual frames, but something like H264 is dependent on key-frames...
>>
>>
>> Best Regards
>>
>> Marianna
>>
>> On 08/08/2023 19.55,  gstreamer-devel-request at lists.freedesktop.org wrote:
>>> Message: 2
>>> Date: Tue, 08 Aug 2023 15:54:18 +0300
>>> From: ????? ?????<sharov_am at mail.ru>
>>> To:gstreamer-devel at lists.freedesktop.org
>>> Subject: Fastest way to navigate to needed frame
>>> Message-ID:<1691499258.975972799 at f711.i.mail.ru>
>>> Content-Type: text/plain; charset="utf-8"
>>>
>>>
>>> Hi.
>>> ?
>>> Given pipeline ?filesrc ! decodebin ! appsink???I need fastest way to navigate to given frame number in file.
>>> Say, I need frame number 9, what is the fastest way to obtain this frame ??iterate in cycle and skip frames via
>>> PullSample, like :
>>> ? ? ? ? ? ? ? ??
>>> ? ? ? ? ? ? ? ??var step = 0;
>>> ? ? ? ? ? ? ? ? while (step < frameNumber)
>>> ? ? ? ? ? ? ? ? {
>>> ? ? ? ? ? ? ? ? ? ? appSink.PullSample();
>>> ? ? ? ? ? ? ? ? ? ? step++;
>>> ? ? ? ? ? ? ? ? }
>>> ? ? ? ? ? ? ? ??var neededSample = appSink.PullSample();
>>> ?
>>> or there is better and faster option like Seek with some parameters like buffer and so on?
>>> ?
>>> Thanks in advance.
>>> ?
>>> KR
>> --
>> Best regards / Med venlig hilsen
>> ?Marianna Smidth Buschle?
> ?
> ?
> --
> ? ?????????,
> ????? ?????
> ?
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230814/f9168198/attachment-0001.htm>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
> ------------------------------
>
> End of gstreamer-devel Digest, Vol 151, Issue 28
> ************************************************

-- 
Best regards / Med venlig hilsen
“Marianna Smidth Buschle”



More information about the gstreamer-devel mailing list