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

Olivier Aubert olivier.aubert at liris.cnrs.fr
Wed Jul 28 19:08:09 CEST 2010


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.

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?

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








More information about the gstreamer-devel mailing list