[gst-devel] dshowvideosrc with a mux

Julien Isorce julien.isorce at gmail.com
Wed May 14 15:53:21 CEST 2008


Hi,

The following pipeline works fine:

gst-launch-0.10 dshowvideosrc num_buffers=250 ! video/x-raw-yuv,
framerate=(fraction)25/1, width=320, height = 240 ! queue ! ffmpegcolorspace
! ffenc_mpeg4 ! queue ! avimux name=mux audiotestsrc num_buffers=400  !
queue ! ffenc_mp2 ! queue ! mux. mux. ! filesink location=record.avi

(in the log I can see : "New clock: GstSystemClock")

I mean record.avi file can be playback correctly, the video and the
testsound are ok.

Now I would like to use the dshowaudiosrc instead of the audiotestsrc :

gst-launch-0.10 dshowvideosrc num_buffers=250 ! video/x-raw-yuv,
framerate=(fraction)25/1, width=320, height = 240 ! queue ! ffmpegcolorspace
! ffenc_mpeg4 ! queue ! avimux name=mux dshowaudiosrc num_buffers=20  !
queue ! ffenc_mp2 ! queue ! mux. mux. ! filesink location=record.avi

(in the log I can see "New clock: GstAudioSrcClock")

But when I play the record.avi file, the video is not ok. The video is
played very very fast, about 0.5 sec, but the audio is ok.

So it seems to be a problem about the clock.

So I tryed to set the dshowaudiosrc provide-clock property to FALSE.
(default is TRUE) :

gst-launch-0.10 dshowvideosrc num_buffers=250 ! video/x-raw-yuv,
framerate=(fraction)25/1, width=320, height = 240 ! queue ! ffmpegcolorspace
! ffenc_mpeg4 ! queue ! avimux name=mux dshowaudiosrc num_buffers = 20
provide-clock=0 ! queue ! ffenc_mp2 ! queue ! mux. mux. ! filesink
location=record.avi

There is the log :

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
WARNING: from element /pipeline0/dshowaudiosrc0: Can't record audio fast en
ough
Additional debug info:
E:\devel-release\src_releases\gst-plugins-base\gst-libs\gst\audio\gstbaseau
diosrc.c(668): (function) (): /pipeline0/dshowaudiosrc0:
dropped 286650 samples

** (gst-launch-0.10:3704): CRITICAL **: file E:\devel-release\src_releases\
gstreamer\gst\gstsegment.c: line 450: assertion `segment->format == format'
 failed
Got EOS from element "pipeline0".
Execution ended after 16716824000 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
FREEING pipeline ...

The when playing the record.avi file with VLC, th video is ok but there is
no audio.
If I play the record.avi file with classic player, first the audio is played
without video, then the video is played without audio.

So It seems I have not correclty configured the dshowaudiosrc because the
first pipeline works fine.

Help would be appreciated.

Sincerely

Julien I.


2008/4/29 Julien Moutte <julien at moutte.net>:

>
> Try adding a queue between the src elements and the video/audio encoders.
>
> Julien
>
> Andy Sturges wrote:
> > Julien,
> >
> > thanks for replying to this question,  I'll give a bit more detail on
> > the problem I am seeing.  The pipeline in the email is not my original
> > pipe line - which as you suggested encodes the video and audio mux
> > them together and then save them to a file:
> >
> > gst-launch-0.10.exe dshowvideosrc ! ffmpegcolorspace ! videorate !
> > video/x-raw-yuv,framerate=15/1 ! ffmpegcolorspace ! theoraenc ! queue
> > ! oggmux name=mux dshowaudiosrc ! audioconvert ! vorbisenc ! queue !
> > mux. mux. ! queue ! filesink location=output.ogg
> >
> > But the encoded video was showing very slow video capture speed but
> > good audio capture.  Capturing the video on its own to a file has no
> > problems.  The example in my mail was just the simplest pipe I could
> > produce which would illustrate the problem.
> >
> > My video and audio source is a Logitech USB web cam  and I am using
> > the latest Windows binary downloads (which look like they may be based
> > an older gstreamer release than current source release) so if there
> > are some newer binaries available I would like to try them.
> >
> > thanks Andy
> >
> > On Mon, Apr 28, 2008 at 6:59 AM, Julien Moutte <julien at moutte.net>
> wrote:
> >
> >> First you probably have a latency issue as this is a live pipeline and
> >> avimux / avidemux could add some latency.
> >>
> >>  Second you should not try to play what you just muxed in the same
> pipeline.
> >> You should compress the video and then store to a file that you can play
> >> later on. If you want local feedback from the capture you should use tee
> >> after the source and have a preview branch.
> >>
> >>  Julien
> >>
> >>
> >>  On Apr 23, 2008, at 1:40, Andy Sturges <andy at sturges.me.uk> wrote:
> >>
> >>
> >>
> >>> I am trying to capture video and audio and mux them into a single file
> >>> on windows XP, but am seeing very slow video capture when using any
> form
> >>> of mux.  To illustrate the problem here a a couple of simple examples:
> >>>
> >>> This pipeline works fine:
> >>>
> >>>   gst-launch-0.10.exe dshowvideosrc ! ffmpegcolorspace  !
> directdrawsink
> >>>
> >>> but adding a mux/demux stage into the pipe causes the video to be very
> >>> slow:
> >>>
> >>>  dshowvideosrc ! ffmpegcolorspace ! avimux ! avidemux !
> >>> ffmpegcolorspace ! directdrawsink
> >>>
> >>> I have tried adding queues and videorate controls but this makes no
> >>> difference.
> >>>
> >>> Any input on this problem welcome,
> >>>
> >>> Andy
> >>>
> >>>
> -------------------------------------------------------------------------
> >>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> >>> Don't miss this year's exciting event. There's still time to save $100.
> >>> Use priority code J8TL2D2.
> >>>
> >>>
> >>
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> >>
> >>> _______________________________________________
> >>> gstreamer-devel mailing list
> >>> gstreamer-devel at lists.sourceforge.net
> >>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> >>>
> >>>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
>
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20080514/428ebe4b/attachment.htm>


More information about the gstreamer-devel mailing list