[gst-devel] filesink and pipe
Ron McOuat
rmcouat at smartt.com
Fri Nov 7 08:36:24 CET 2008
Terry Leung wrote:
> Hi all,
>
> I have a problem when i try to use a pipe as a file for filesink
>
> What I want to do is to make a proxy to convert a file rtp
> stream(audio,video) into a file for progressive download and the
> progressive download will start before the end of stream
>
Writing to a named pipe with no reader or a slow reader blocks the
writer once the pipe buffer is full (around 10k). This is very different
from a disk based file which blocks in the unlikely event the system
buffer cache is full or the disk device fails. Have you got a simple
pipe reader such as
cat </home/video/pipe >file.3gp
started before the gst-launch to see if that unsticks it.
I would look at the tcp plugin which has the multifdsink element where
the fd added as a sink could be a socket or file. There is a buffer in
this sink that can be sized as well as a strategy for when the
destination device is slower than the source.
> my testing pipeline is here:
>
> gst-launch -m -v ffmux_3gp name=mux ! filesink name=filesink
> location=/home/video/pipe \
> { udpsrc name=audioudp port=23456 num-buffers=1000
> caps="application/x-rtp, media=(string)audio, payload=(int)98,
> clock-rate=(int)8000, encoding-name=(string)AMR,
> encoding-params=(string)1, octet-align=(string)1" ! gstrtpjitterbuffer
> name=audiojitter latency=4000 ts-offset=1000000 ! rtpamrdepay
> queue-delay=0 name=audiodepay ! queue name=audioqueue } ! mux.audio_0
> \
> { udpsrc name=videoudp port=23458 num-buffers=1000
> caps="application/x-rtp, media=(string)video, payload=(int)34,
> clock-rate=(int)90000, encoding-name=(string)H263" !
> gstrtpjitterbuffer name=videojitter latency=0 ts-offset=1000000 !
> rtph263depay queue-delay=0 name=videodepay ! ffdec_h263 name=videodec
> ! videorate name=videorate ! video/x-raw-yuv,framerate=8/1 !
> ffenc_h263 name=videoenc rtp-payload-size=500 gop-size=24 me-method=4
> bitrate=40000 ! queue name=videoqueue } ! mux.video_0;
>
> It just recieve a h263 and amr stream and put it into a 3gp file
>
> snip----------------
More information about the gstreamer-devel
mailing list