How to encode a partial video by using "encodebin"?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to encode a partial video by using "encodebin"?

Victor-2
Hi everyone,

How to re-encode a partial video by using "encodebin"? The last time I
tried, the "encodebin" element encoded the whole video stream, and it
did not help if `gst_element_seek_simple` to the position I wanted to
start extracting from. Yes, it was dumb I knew. Just tried and wished to
be lucky. Anyway, there must be something missing. What objects shall be
modified before they arrive at "encodebin", the buffers, events or
queries? It obviously is doable to re-encode a partial video file and
save to a new one, because that is what GES is doing, to re-encode only
a part of a whole. I tend not to use GES, because sometimes prefer
extracting videos without re-encoding, and it seems inevitable for GES
to re-encode the clip. So, what data shall be modified before they flow
into the "encodebin" element? Thanks.

Victor

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to encode a partial video by using "encodebin"?

Gst-Geek
On which element did you try gst_element_seek_simple.
seek may not work on all the element. Most of the time seek is handled by
demuxer.



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to encode a partial video by using "encodebin"?

Victor-2
In reply to this post by Victor-2
Thanks, ShilVin.
> On which element did you try gst_element_seek_simple.
The entire pipeline. I didn't even know that it's allowed to seek in
individual elements inside a pipeline.
> seek may not work on all the element. Most of the time seek is handled by
> demuxer.
Below is the pipeline description:

filesrc name=SRC         \
! decodebin name=DECODER \
DECODER.                 \
! video/x-raw            \
! timeoverlay            \
! ENCODER.video_0        \
DECODER.                 \
! audio/x-raw            \
! ENCODER.audio_0        \
encodebin name=ENCODER
profile=video/x-matroska:video/x-theora:audio/x-vorbis \
! filesink name=DST

I just tried calling gst_eleemnt_seek_simple on the encoder, but it
still doesn't work.
Below is the link to the image converted from the .dot file that was
created when the pipeline is in playing state.
https://imgur.com/TVCdcSK

Regards,
Victor
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to encode a partial video by using "encodebin"?

Gst-Geek