[gst-devel] Using gst-launch to convert between video formats on the command line?

Michael R. Head burner at suppressingfire.org
Mon Oct 2 19:26:32 CEST 2006


Thanks for the help Zaheer and Michal!

On Mon, 2006-10-02 at 07:48 +0200, Zaheer Merali wrote:
> On 10/2/06, Michael R. Head <burner at suppressingfire.org> wrote:
> > Hi,
> >
> > I've got some video files in the matroska format that I would like to
> > repack into the avi format. The codecs used in the file are Xvid and and
> > AAC, and I'd like to simply reuse the audio and video bitstreams in the
> > new file (I don't want to do any transcoding). So far, I've figured out
> > how to take the video stream and put it into the avi, like so:
> >
> > gst-launch-0.10 filesrc location="in.mkv" ! matroskademux ! avimux ! filesink location=out.avi
> >
> > But the audio channel gets lost. What am I missing?
> >
> 
> Yes one of the channels will get lost because demuxers create pads for
> each media channel inside the stream, so your pipeline only linked one
> of these pads.

Yeah, I thought it this was the problem, but I haven't quite grokked the
pipeline syntax.

> Try:
> 
> gst-launch-0.10 avimux name=mux ! filesink location=out.avi filesrc
> location=in.mkv ! matroskademux name=d ! queue ! mux. d. ! queue !
> mux.

OK, I tried that, but there was a problem:
$ gst-launch-0.10 avimux name=mux ! filesink location=out.avi filesrc \
 location=in.mkv ! matroskademux name=d ! queue ! mux. d. ! queue ! mux.
WARNING: erroneous pipeline: could not link queue0 to mux

> Zaheer

On Mon, 2006-10-02 at 11:37 +0200, Michal Benes wrote: 
> Hi Mike,
> 	your pipeline remuxes only the first stream detected by matroska. Try
> gst-launch-0.10 filesrc location="in.mkv" ! matroskademux name=d \
>                 d.video_00 ! queue ! m. \
>                 d.audio_00 ! queue ! m. \
>                 avimux name=m ! filesink location=out.avi

I tried this, too: 
$ gst-launch-0.10 filesrc location="in.mkv" ! matroskademux name=d \
 d.video_00 ! queue ! m. d.audio_00 ! queue ! m.  avimux name=m ! \
 filesink location=out.avi
WARNING: erroneous pipeline: could not link queue1 to m


> If it does not work, try to specify the complete capabilities
> (e.g. ... queue ! video/mpeg, version=4 ! m.)

So then I tried that, and the pipeline appeared to hang:
$ gst-launch-0.10 filesrc location="in.mkv" ! matroskademux name=d \
 d.video_00 ! queue ! video/mpeg, version=4 ! m. d.audio_00 ! queue ! \
 m.  avimux name=m ! filesink location=out.avi
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...


Any more suggestions?

> 	Michal

Thanks,
mike


-- 
Michael R. Head <burner at suppressingfire.org>
suppressingfire.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20061002/3a84f34f/attachment.pgp>


More information about the gstreamer-devel mailing list