[gst-devel] gst-launch questions
Ronald Bultje
rbultje at ronald.bitfreak.net
Wed Jan 21 00:53:00 CET 2004
Hi Mike,
On Tue, 2004-01-20 at 22:56, W. Michael Petullo wrote:
> 1. I am pretty comfortable using gstreamer's demultiplexing plugins
> with gst-launch. However, multiplexing is a different matter. I can
> not figure out how to multiplex the audio and video portions of an
> MPEG-2 stream. Could someone provide me an example pipeline that uses
> the mplex plugin to do this?
Oh no!
First: start simple. Use AVI or the like. I'll explain why below. This
pipeline works for me:
gst-launch { avimux name=mux ! filesink location=file.avi } filesrc
location=file.mpg ! mpegdemux name=demux .video_00 ! { queue ! mpeg2dec
! divxenc ! queue ! mux.video_%d } { demux.audio_00 ! queue ! mad ! lame
! queue ! mux.audio_%d }
The result is a divx/mp3 AVI file.
Now, MPEG would work alike, using mpeg2enc/ffenc_mp2 instead of divx/mp3
encoding. Don't use FFMPEG's AC3 yet, there's a memleak in our version
of ffmpeg. It'll take up to 1GB of mem for a reasonable-sized video. To
encode DVD, use mpeg2enc format=9 and mplex format=9.
Now, the issue with mplex is that it's heavily under development. It's
really meant only for testing purposes right now. It works for me, and
I've succeeded in encoding DVDs with it, but it really doesn't work up
to a good standard yet. The same goes for mpeg2enc. Both have several
issues. Both need to run in their own thread because the lib's main loop
doesn't return, both handle EOS and errors in a very complicated and
wrong way, etc. So don't expect too much yet. I'm intending to work on a
DVD authoring app in the long-term, but for now... It's just playing.
> 2. I am also interested in taking an arbitarary sized, interlaced,
> etc. video and scaling it to use on a Video CD. Does anyone have any
> experience doing this? Currently, I use yuvscaler to do this but I am
> interested in doing it with gstreamer/gst-launch. I found the videoscaler
> plugin but wanted to see if anyone else had any experience doing this
> before I tried (Video CD players can be quite picky).
Use filtered caps and videoscale. Example (file.mpg is e.g. 384x288):
gst-launch filesrc location=file.mpg ! mpegdemux .video_00 ! mpeg2dc !
videoscale ! video/x-raw-yuv,width=352,height=288 ! ffcolorspace !
ximagesink
HTH,
Ronald
--
Ronald Bultje <rbultje at ronald.bitfreak.net>
Linux Video/Multimedia developer
More information about the gstreamer-devel
mailing list