Hi<br><br>I finally resolved my problem by using theora and vorbis instead of ffenc_mpeg4 and ffenc_mp2. I was suprised that the cause was the encoders.<br><br>The following pipeline works fines :<br><br>gst-launch-0.10 dshowvideosrc num_buffers=250 ! video/x-raw-yuv, framerate=(fraction)25/1, width=720,height = 576, format=(fourcc)YUY2 ! ffmpegcolorspace ! theoraenc ! queue ! oggmux name=mux dshowaudiosrc provide-clock=0 num_buffers = 20 ! audioconvert ! vorbisenc ! queue ! mux. mux. ! filesink location=record.ogg<br>
<br>J. I.<br><br><div class="gmail_quote">2008/5/14 Julien Isorce <<a href="mailto:julien.isorce@gmail.com">julien.isorce@gmail.com</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Hi,<br>
<br>
The following pipeline works fine:<br>
<br>
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<br>
<br>
(in the log I can see : "New clock: <span style="color: rgb(51, 51, 255);">GstSystemClock</span>")<br>
<br>
I mean record.avi file can be playback correctly, the video and the testsound are ok.<br>
<br>
Now I would like to use the dshowaudiosrc instead of the audiotestsrc :<br>
<br>
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<br>
<br>
(in the log I can see "New clock: <span style="color: rgb(51, 51, 255);">GstAudioSrcClock</span>")<br>
<br>
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.<br>
<br>
So it seems to be a problem about the clock.<br>
<br>
So I tryed to set the dshowaudiosrc <span style="color: rgb(51, 51, 255);">provide-clock</span> property to FALSE. (default is TRUE) :<br>
<br>
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<br>
<br>
There is the log :<br>
<br>
Setting pipeline to PAUSED ...<br>
Pipeline is live and does not need PREROLL ...<br>
Setting pipeline to PLAYING ...<br>
New clock: <span style="color: rgb(51, 51, 255);">GstSystemClock</span><br>
WARNING: from element /pipeline0/dshowaudiosrc0: Can't record audio fast en<br>
ough<br>
Additional debug info:<br>
E:\devel-release\src_releases\gst-plugins-base\gst-libs\gst\audio\gstbaseau<br>
diosrc.c(668): (function) (): /pipeline0/dshowaudiosrc0:<br>
dropped 286650 samples<br>
<br>
** (gst-launch-0.10:3704): CRITICAL **: file E:\devel-release\src_releases\<br>
gstreamer\gst\gstsegment.c: line 450: assertion `segment->format == format'<br>
failed<br>
Got EOS from element "pipeline0".<br>
Execution ended after 16716824000 ns.<br>
Setting pipeline to PAUSED ...<br>
Setting pipeline to READY ...<br>
Setting pipeline to NULL ...<br>
FREEING pipeline ...<br>
<br>
The when playing the record.avi file with VLC, th video is ok but there is no audio.<br>
If I play the record.avi file with classic player, first the audio is
played without video, then the video is played without audio.<br>
<br>
So It seems I have not correclty configured the <span style="color: rgb(51, 51, 255);">dshowaudiosrc</span> because the first pipeline works fine.<br>
<br>
Help would be appreciated.<br>
<br>
Sincerely<br>
<br>
Julien I.<br><br><div class="gmail_quote">2008/4/29 Julien Moutte <<a href="mailto:julien@moutte.net" target="_blank">julien@moutte.net</a>>:<div><div></div><div class="Wj3C7c"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Try adding a queue between the src elements and the video/audio encoders.<br>
<br>
Julien<br>
<br>
Andy Sturges wrote:<br>
> Julien,<br>
><br>
> thanks for replying to this question, I'll give a bit more detail on<br>
> the problem I am seeing. The pipeline in the email is not my original<br>
> pipe line - which as you suggested encodes the video and audio mux<br>
> them together and then save them to a file:<br>
><br>
> gst-launch-0.10.exe dshowvideosrc ! ffmpegcolorspace ! videorate !<br>
> video/x-raw-yuv,framerate=15/1 ! ffmpegcolorspace ! theoraenc ! queue<br>
> ! oggmux name=mux dshowaudiosrc ! audioconvert ! vorbisenc ! queue !<br>
> mux. mux. ! queue ! filesink location=output.ogg<br>
><br>
> But the encoded video was showing very slow video capture speed but<br>
> good audio capture. Capturing the video on its own to a file has no<br>
> problems. The example in my mail was just the simplest pipe I could<br>
> produce which would illustrate the problem.<br>
><br>
> My video and audio source is a Logitech USB web cam and I am using<br>
> the latest Windows binary downloads (which look like they may be based<br>
> an older gstreamer release than current source release) so if there<br>
> are some newer binaries available I would like to try them.<br>
><br>
> thanks Andy<br>
<div><div></div><div>><br>
> On Mon, Apr 28, 2008 at 6:59 AM, Julien Moutte <<a href="mailto:julien@moutte.net" target="_blank">julien@moutte.net</a>> wrote:<br>
><br>
>> First you probably have a latency issue as this is a live pipeline and<br>
>> avimux / avidemux could add some latency.<br>
>><br>
>> Second you should not try to play what you just muxed in the same pipeline.<br>
>> You should compress the video and then store to a file that you can play<br>
>> later on. If you want local feedback from the capture you should use tee<br>
>> after the source and have a preview branch.<br>
>><br>
>> Julien<br>
>><br>
>><br>
>> On Apr 23, 2008, at 1:40, Andy Sturges <<a href="mailto:andy@sturges.me.uk" target="_blank">andy@sturges.me.uk</a>> wrote:<br>
>><br>
>><br>
>><br>
>>> I am trying to capture video and audio and mux them into a single file<br>
>>> on windows XP, but am seeing very slow video capture when using any form<br>
>>> of mux. To illustrate the problem here a a couple of simple examples:<br>
>>><br>
>>> This pipeline works fine:<br>
>>><br>
>>> gst-launch-0.10.exe dshowvideosrc ! ffmpegcolorspace ! directdrawsink<br>
>>><br>
>>> but adding a mux/demux stage into the pipe causes the video to be very<br>
>>> slow:<br>
>>><br>
>>> dshowvideosrc ! ffmpegcolorspace ! avimux ! avidemux !<br>
>>> ffmpegcolorspace ! directdrawsink<br>
>>><br>
>>> I have tried adding queues and videorate controls but this makes no<br>
>>> difference.<br>
>>><br>
>>> Any input on this problem welcome,<br>
>>><br>
>>> Andy<br>
>>><br>
>>> -------------------------------------------------------------------------<br>
>>> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference<br>
>>> Don't miss this year's exciting event. There's still time to save $100.<br>
>>> Use priority code J8TL2D2.<br>
>>><br>
>>><br>
>> <a href="http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone" target="_blank">http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone</a><br>
>><br>
>>> _______________________________________________<br>
>>> gstreamer-devel mailing list<br>
>>> <a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
>>> <a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
>>><br>
>>><br>
<br>
-------------------------------------------------------------------------<br>
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference<br>
Don't miss this year's exciting event. There's still time to save $100.<br>
Use priority code J8TL2D2.<br>
<a href="http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone" target="_blank">http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
</div></div></blockquote></div></div></div><br>
</blockquote></div><br>