<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
<br>
On 06/02/2011 03:58 PM, Jose Antonio Santos Cadenas wrote:
<blockquote
cite="mid:BANLkTi=nBUxVr9agjYtSksGvz7JyhEgPEA@mail.gmail.com"
type="cite">
<pre wrap="">Hi,
2011/6/2 Paulo Paiva <a class="moz-txt-link-rfc2396E" href="mailto:paivalhao@gmail.com"><paivalhao@gmail.com></a>:
</pre>
<blockquote type="cite">
<pre wrap="">Hello all!
I'm struggling here trying to play the video acquired from the web-cam and
stream it simultaneously but it isn't working. Here goes my pipeline
(inspired in the examples given):
#!/bin/sh
# Destination of the stream
DEST=127.0.0.1
# Tuning parameters to make the sender send the streams out of sync. Can be
used
# ot test the client RTCP synchronisation.
VOFFSET=0
AOFFSET=0
# Video setup
VELEM="v4l2src "
VCAPS="video/x-raw-yuv,width=352,height=288,framerate=20/1"
VSOURCE="$VELEM ! $VCAPS ! queue ! ffmpegcolorspace"
VENC="x264enc tune=zerolatency byte-stream=true bitrate=550 threads=0
speed-preset=3"
# Video transmission setup
VRTPSINK="udpsink port=5000 host=$DEST ts-offset=$VOFFSET name=vrtpsink"
VRTCPSINK="udpsink port=5001 host=$DEST sync=false async=false
name=vrtcpsink"
VRTCPSRC="udpsrc port=5005 name=vrtpsrc"
# Audio setup
AELEM="pulsesrc"
ASOURCE="$AELEM ! queue ! audioconvert"
AENC=" faac! rtpmp4apay"
# Audio transmission setup
ARTPSINK="udpsink port=5002 host=$DEST ts-offset=$AOFFSET name=artpsink"
ARTCPSINK="udpsink port=5003 host=$DEST sync=false async=false
name=artcpsink"
ARTCPSRC="udpsrc port=5007 name=artpsrc"
# Pipeline construction
gst-launch -v gstrtpbin name=rtpbin \
$VSOURCE ! tee name=v ! autovideosink v. ! $VENC ! rtph264pay !
rtpbin.send_rtp_sink_0 \
rtpbin.send_rtp_src_0 ! $VRTPSINK \
rtpbin.send_rtcp_src_0 ! $VRTCPSINK \
$VRTCPSRC ! rtpbin.recv_rtcp_sink_0 \
$ASOURCE ! $AENC ! rtpbin.send_rtp_sink_1 \
rtpbin.send_rtp_src_1 ! $ARTPSINK \
rtpbin.send_rtcp_src_1 ! $ARTCPSINK \
$ARTCPSRC ! rtpbin.recv_rtcp_sink_1
Has all can see I got a tee after the acquisition, after that autovideosink
in order to displays and I pass on the video flux for streaming.
The output of execution is:
$ sh v4l2server.sh
Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstPulseSrc:pulsesrc0: actual-buffer-time = 47551927
/GstPipeline:pipeline0/GstPulseSrc:pulsesrc0: actual-latency-time = 9977
/GstPipeline:pipeline0/GstPulseSrc:pulsesrc0.GstPad:src: caps =
audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)16,
depth=(int)16, rate=(int)44100, channels=(int)1,
channel-positions=(GstAudioChannelPosition)<
GST_AUDIO_CHANNEL_POSITION_FRONT_MONO >
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not
negotiate format
Additional debug info:
gstbasesrc.c(2811): gst_base_src_start ():
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Check your filtered caps, if any
Setting pipeline to NULL ...
/GstPipeline:pipeline0/GstPulseSrc:pulsesrc0.GstPad:src: caps = NULL
Freeing pipeline ...
The last message makes suggestion to look at the caps, but removing the tee
element and the autovideosink it works.
Any ideas/suggestions would be great!!
</pre>
</blockquote>
<pre wrap="">
Have you tried using a queue on each tee branch as is recomended on
tee documentation page?
<a class="moz-txt-link-freetext" href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-plugins/html/gstreamer-plugins-tee.html#gstreamer-plugins-tee.description">http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-plugins/html/gstreamer-plugins-tee.html#gstreamer-plugins-tee.description</a>
Regards
</pre>
</blockquote>
Thanks for the quick reply Jose Cadenas!<br>
<br>
Well after doing a easier version of what I'm trying to do, just
record and play, I came up with the solution (lines changed):<br>
<br>
<font face="monospace">VCAPS="video/x-raw-yuv,width=352,height=288,framerate=20/1
! tee name=v"<br>
<br>
gst-launch -v gstrtpbin name=rtpbin \<br>
$VSOURCE ! $VENC ! rtph264pay ! rtpbin.send_rtp_sink_0 \<br>
rtpbin.send_rtp_src_0 ! $VRTPSINK \<br>
rtpbin.send_rtcp_src_0 ! $VRTCPSINK \<br>
$VRTCPSRC ! rtpbin.recv_rtcp_sink_0 \<br>
v. ! queue ! ffmpegcolorspace ! autovideosink \<br>
$ASOURCE ! $AENC ! rtpbin.send_rtp_sink_1 \<br>
rtpbin.send_rtp_src_1 ! $ARTPSINK \<br>
rtpbin.send_rtcp_src_1 ! $ARTCPSINK \<br>
$ARTCPSRC ! rtpbin.recv_rtcp_sink_1</font> <br>
<br>
Cheers all!<br>
Paulo Paiva<br>
</body>
</html>