[gst-devel] how to run a media file using gst-launch

sandeep siroya siroya at gmail.com
Wed Nov 15 03:05:10 CET 2006

On 11/14/06, Zaheer Merali <zaheermerali at gmail.com> wrote:
> On 11/14/06, sandeep siroya <siroya at gmail.com> wrote:
> > Hi,
> > I have installed gstreamer-0.10 on a fedora core 5 system.
> > I wanted to write a plugin to decrypt an encrypted mpeg file and pass
> > it to the other gstreamer elements to decode and play it. I have the
> > decryption code.
> > I was looking to start with gst-launch. From the man pages of
> > gst-launch, the command :
> > gst-launch filesrc location=JB_FF9_TheGravityOfLove.mpg ! mpegdemux
> > video_%02d!src { queue ! mpeg2dec ! xvideosink } does not work.
> > Can someone please explain the meaning of 'video_%02d!src'? I read a
> > few manuals in the documentation but did not find any info there.
> What type of mpeg file is it?  A transport stream or a program stream?

Its a program stream.

> { and } are no longer needed in GStreamer 0.10.
> in Gstreamer 0.10, xvideosink no longer exists, use xvimagesink.

thanks for the info. unfortunately, I was looking at the older man
pages earlier. I googled gst-launch and xvimagesink and got the mpeg
file running with the following commands:

gst-launch-0.10 filesrc
location=/home/mythtv/clips/Alexander_Trailer_1080p.mpg ! mpegdemux !
mpeg2dec ! ffmpegcolorspace ! xvimagesink
gst-launch-0.10 -v playbin filesrc

are there any alternative ways to play?

i can also run the same mpeg file served by a media server on my
network with the command:
gst-launch-0.10 -v playbin
gst-launch-0.10 gnomevfssrc
! decodebin name=debin ! queue ! xvimagesink debin. ! queue ! alsasink

my next task is to write a plugin that will authenticate the system to
a media server, download and decrypt an encrypted media (wmv or wma or
mpeg-ps) file from a media server (using dtcp-ip) and play it;
something like:

gst-launch-0.10 <dtcp-ip plugin-name> location=<url> ! decodebin
name=debin ! queue ! xvimagesink debin. ! queue ! alsasink

I think the source pad of this plugin should be similar to that of filesrc.
.. your comments are most welcome..

> video_%02d is a template for dynamic pads.  read about dynamic pads in
> the GStreamer documentation.
> Zaheer


More information about the gstreamer-devel mailing list