[gst-devel] Gnonlin question: extract audio+video clip

Edward Hervey bilboed at gmail.com
Thu Jul 29 11:29:44 CEST 2010


Hi,

On Wed, 2010-07-28 at 19:08 +0200, Olivier Aubert wrote:
> Hello
> 
> I am looking for a way to extract a video+audio clip from a video file.
> The natural approach is to use gnonlin. I can extract the video with a
> simple gst-launch command line:
> gst-launch gnlfilesource name=video location=source.avi start=0 \
> duration=5000000000 media-start=22000000000 media-duration=5000000000 ! \
> identity single-segment=true ! progressreport update-freq=1 ! \
>  ffmpegcolorspace ! theoraenc ! oggmux name=mux ! filesink location=/tmp/ex.ogv
> 
> However, combining video+audio is another matter. According to the
> http://stackoverflow.com/questions/2481314/how-to-use-gnlcomposition-to-concatenate-video-files thread, I would need to use 2 gnlcompositions and  2 gnlfilesources to  achieve my goals. However, the following command line does not work:
> 
> gst-launch gnlfilesource name=video location=source.avi start=0 duration=5000000000 \
> media-start=22000000000 media-duration=5000000000 ! identity single-segment=true \
> ! progressreport ! ffmpegcolorspace ! theoraenc ! oggmux name=mux \
> ! filesink location=/tmp/ex.ogv \
> gnlfilesource name=audio location=source.avi start=0 duration=5000000000 \
> media-start=22000000000 media-duration=5000000000 ! identity single-segment=true \
> ! vorbisenc ! queue ! mux.

  You need to specify which stream you want for each gnlfilesource by
using the 'caps' property.
  Ex : gnlfilesource caps="video/x-raw-yuv" ! ....

> 
> and I think anyway that I should put a gnlcomposition in here, to keep
> both streams in sync. Anyway, I feel that this is not achievable through
> a gst-launch command-line, but would like to know if this feeling is
> justified? Does anyone use a gst-launch command line to do such things?

  You don't need a gnlcomposition if you're only using one file (like
you're doing above).

> 
> Supplementary question: the remuxer.py from gst-python examples should
> do this, but with some trickery (and I did not manage to get it to
> successfully extract anything). Given its last real update dates back
> from 2006, is it still considered as reference code?
> 
> Regards,
> Olivier
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of $1 Million in cash or HP Products. Visit us here for more details:
> http://p.sf.net/sfu/dev2dev-palm
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel






More information about the gstreamer-devel mailing list