How to get the last frame of a video file ?

adrien_sch adrien.schwartzentruber at gmail.com
Fri Jan 24 03:24:05 PST 2014


Hello guys,

My goal here is to get few snapshots of a video file. My plan is to use the
pngenc element like this : 

filesrc ! matroskademux ! h264parse ! avdec_h264 ! videoconvert ! pngenc !
appsink. 

My first step is to navigate inside the stream using the seek query, and my
goal is to get 3 snapshot, the first frame of the video file, middle ( =>
duration / 2), and the last. I observed that when I seek to the last frame
(position = duration) the demux element throw a EOS event and I didn't get
the last frame. My question is, how can I achieve this ? 

I tried to use step event, but I had the sample result. 

My second question is, can I actually use the pngenc in preroll to create my
snapshot ? Indeed, the pipeline is in PAUSED state during the navigation,
and I'm not sure if the pngenc element can work in this state ( videoencoder
class also).

Thx in advance for your help. 

Gstreamer version : 1.2
Video sample :
http://www.auby.no/files/video_tests/h264_1080p_hp_4.1_10mbps_dts_unstyled_subs_monsters.mkv
Source Code : http://pastebin.com/0KqiRQyk



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-to-get-the-last-frame-of-a-video-file-tp4664849.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list