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

Michal Benes michal.benes at itonis.tv
Mon Oct 2 20:08:30 CEST 2006


> > > 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?

> 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 ...

Hi Mike,

	remuxing without reencoding may be tricky, especially using gst-launch
because you can do not control in what order is the pipeline linked. 

	Try to run only one part (audio or video) of the pipe (ommit "d.audio !
queue ! m." or "d.video ! queue ! m.") To see what part hangs the
pipeline. Add -v parameter to gst-launch for verbose mode. You can also
try to add --gst-debug-level=2 parameter. Send us the output of the
problematic command.

	Also try to run the demuxing pipeline
gst-launch-0.10 -v filesrc location="in.mkv" ! matroskademux
with verbose mode turned on (-v parameter), you will need to stop the
pipeline manually by ctrl-C This should reveal the real caps of audio
and video stream. It could help to put caps filter between the queue and
muxer (well this video/mpeg, version=4 was only an example, I do not
know if you really have a file with mpeg 4 video).

	Michal





More information about the gstreamer-devel mailing list