[gst-devel] extract clip using gst-launch

Nathan Gray kolibrie at graystudios.org
Thu Aug 6 02:28:44 CEST 2009


I would like to extract a clip from a longer video.

For instance, if I have a 60 minute video called complete.ogg,
consisting of theora and vorbis in an ogg wrapper, and I want to
extract a 3 minute clip called clip.ogg starting at second 86.

It is simple enough to re-encode the whole file:

  gst-launch \
    filesrc location=complete.ogg \
      ! decodebin name=decode \
    decode. \
      ! queue \
      ! ffmpegcolorspace \
      ! theoraenc \
      ! oggmux name=mux \
    mux. \
      ! filesink location=clip.ogg \
    decode. \
      ! queue \
      ! audioconvert \
      ! vorbisenc \
      ! queue \
      ! mux.

It appears that gnonlin is the plugin I need to use (gnlsource
and gnlcomposition), but I have not been able to find any examples
of how it is used under gst-launch.

Please add to the above example the phrases I need to use in
order to extract a clip from the middle of the longer video.

Also, is it possible to losslessly extract the clip (since it is
already theora and vorbis, can I extract the segment I want
without decoding, and then re-wrap in an ogg container without
re-encoding)?

-kolibrie

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20090805/e2b3284b/attachment.pgp>


More information about the gstreamer-devel mailing list