[gst-devel] Desperate @ wits end; newbie help please!

Zaheer Merali zaheermerali at gmail.com
Sun Feb 24 13:52:30 CET 2008


On 2/22/08, Sheshadri Mantha <sheshadri.mantha at schange.com> wrote:
>
>  hi Wim;
>  Thx for your reply.  Onto newer things now... again any help appreciated.
>
>  (this is more for those who may be traveling down the path i am than for
> informing you specifically)
>
>
> Got libmpeg2 code, built it;  BTW: libmpeg2 must be built in Multithreaded
> mode if you are using VisualStudio 2005 - otherwise linking the lib with
> mpeg2dec will give a link error on libcd.lib.
>
> then (after much searching) found mpeg2dec in the ext folder under
> gst-plugins-ugly.  Built that as Win32 DLL and
>  copied it to GST_PLUGIN_PATH folder;
>
> removed the registry file and ran inspect to verify that mpeg2dec was
> available. Then i tried the playbin using:
>
> gst-launch-0.10.exe playbin uri="file:///c:/dvds/Aeon_Flux.mpg"
>  This worked.   However the CPU Usage oscillated between 40% to 60%+.
>
>  One of my reasons for looking at gstreamer was to cut down the cpu
> utilization on software decoding.  Any hints on how to do this??  The
> machine is a Intel Dual Core 2CPU, 2.00GHz, with 2GB RAM.
>
>  BTW: Aeon_Flux.mpg is Mpeg-2 ts with MP2 audio -- its not h.264 or other
> formats; its the trailer to Aeon Flux the movie.
>
>  Thinking that it maybe due to queues/buffers, i tried the following
> pipelines and none work.
>
>  BTW: i did copy the old pipelines with the { and tried to embelish them...
> as I reported, a) they were on the man pages -- which did not mention
> specific 0.10 or 0.8 version) and b) 'cause Julien recommended it, c) 'cause
> all/any pipeline examples on devel have them.
>
>  Pipelines that don't work:
>
> C:\downloads\gstreamer>gst-launch-0.10.exe filesrc
> location="c:/dvds/Aeon_flux.mpg" ! flutsdemux name="d"
> .video_00 !mpegvideoparse ! mpeg2dec! ffmpegcolorspace ! directdrawsink !
> d.audio_00 !queue ! mp3parse ! dshowadec_mpeg1 ! autoaudiosink
>
>  ** (gst-launch-0.10:5212): WARNING **: error while parsing
>  WARNING: erroneous pipeline: link without source element
>  Guess the problem with the above pipeline is that i was trying to link
> directdrawsink to d.audio_00, sooo..... (removed the ! 'tween directdrawsink
> and d.audio_00)
>
> C:\downloads\gstreamer>gst-launch-0.10.exe filesrc
> location="c:/dvds/Aeon_flux.mpg" ! flutsdemux name="d"
> .video_00 !mpegvideoparse ! mpeg2dec! ffmpegcolorspace ! directdrawsink
> d.audio_00 !queue ! mp3parse ! dshowadec_mpeg1 ! autoaudiosink
>  Setting pipeline to PAUSED ...
>  Pipeline is PREROLLING ...
>  ^C
>  C:\downloads\gstreamer>gst-launch-0.10.exe filesrc
> location="c:/dvds/Aeon_flux.mpg" ! flutsdemux name="d"
> .video_00 ! queue ! mpegvideoparse ! mpeg2dec! ffmpegcolorspace !
> directdrawsink  d.audio_00 !queue ! mp3parse ! dshowadec_mpeg1 !
> autoaudiosink
>  Setting pipeline to PAUSED ...
>  Pipeline is PREROLLING ...
>  ^C
>  That helped with the error, but it did not render either audio or video.
>
> C:\downloads\gstreamer>gst-launch-0.10.exe filesrc
> location="c:/dvds/Aeon_flux.mpg" ! flutsdemux name="d"
> .video_00 ! queue ! mpegvideoparse ! mpeg2dec! ffmpegcolorspace !
> directdrawsink
>  Setting pipeline to PAUSED ...
>  Pipeline is PREROLLING ...
>  ^C
>  your email reply says to use single quotes instead of double quotes... so
> altered to that... but " seems to be what works in Win32.
>
> C:\downloads\gstreamer>gst-launch-0.10.exe filesrc
> location="c:/dvds/Aeon_flux.mpg" ! flutsdemux name='d'
> .video_00 ! queue ! mpegvideoparse ! mpeg2dec! ffmpegcolorspace !
> directdrawsink  d.audio_00 !queue ! mp3parse ! dshowadec_mpeg1 !
> autoaudiosink
>  WARNING: erroneous pipeline: No element named "d" - omitting link
>  Well... trying with just video... and nada!
>
> C:\downloads\gstreamer>gst-launch-0.10.exe filesrc
> location="c:/dvds/Aeon_flux.mpg" ! flutsdemux name="d"
> .video_00 ! queue ! mpegvideoparse ! mpeg2dec! ffmpegcolorspace !
> directdrawsink
>  Setting pipeline to PAUSED ...
>  Pipeline is PREROLLING ...
>  ^C
>  This pipeline specification on command line, the lack of correct
> documentation of 10.x etc. makes adoption of gstreamer quite challenging!
>
>  I'm glad for the devel assistance and at times feel that basics are
> missing... its not that i want "hand-holding", not understanding the impl
> begs for much trial and error, lost time and perhaps PITA q's on devel to
> those who are in "the Know".
>
>  Unless I'm able to get the CPU usage down drastically, i can't see myself
> using gstreamer... since i want a win32 solution, maybe i'll go with
> directx.  will see... hoping that there are some silver bullet answers ;-)
>
>  kindest regards,
>  s-


I don't know about why your performance is not good but I will tell
you why your handmade pipelines do not work.

The pads output by flutsdemux are not done in any order and so are not
video_00 and audio_00. The pad names are video_xxxx and audio_xxxx
where xxxx is the hex of the es pid they are on. In a file where there
is only one audio and one video track, you can leave out the pad names
doing say:

gst-launch-0.10.exe filesrc location="c:/dvds/Aeon_flux.mpg" !
flutsdemux name=d ! queue ! mpegvideoparse ! mpeg2dec!
ffmpegcolorspace ! directdrawsink  d !queue ! mp3parse !
dshowadec_mpeg1 ! autoaudiosink

You may also want to add: max-size-buffers=0 max-size-time=0 to the 2 queues.

Zaheer




More information about the gstreamer-devel mailing list