[gst-devel] recording a file from stream

Terry Leung terry83 at gmail.com
Sat Sep 22 06:23:34 CEST 2007


Hi George,

Thx for your opinion. With the bug fix coming from cvs, I finally can record
the stream into a file
The previous issue is caused by the udpsrc cannot know the duration of
packet and amrdepayload doesnt calculate it as well. The duration is
important for the mux in order to reconstruct a file

However, now, I got another problem in synchronization with video and
audio(video too fast)

Here is my pipeline for recording:

gst-launch -m ffmux_3gp name=mux ! filesink location=/home/video/receive.3gp
\
{ udpsrc num-buffers=500 port=11002 name=audioudp 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"
! rtpamrdepay queue-delay=0 ! queue } ! mux.audio_0 \
{ udpsrc num-buffers=500 port=11000 name=videoudp caps="application/x-rtp,
media=(string)video, payload=(int)34, clock-rate=(int)90000,
encoding-name=(string)H263" ! gstrtpjitterbuffer ! rtph263depay
queue-delay=0 ! ffdec_h263 ! ffenc_h263 bitrate=45000 rtp-payload-size=500
gop-size=3 me-method=4 !queue } ! mux.video_0

I've also try to add jitter buffer around both amr and h263 but still no
successful
As you said that you've done it before, any idea on how to synchronize the
video and audio in a recorded file?

On 9/19/07, George Beasley <george.beasley at d2see.com> wrote:
>
> I don't think your issue is with your pipeline, I think it's with the
> way you terminate the stream. I've been recording from a rtp streams
> (h263 and amr) and I found that you cannot simply Ctrl-C to stop
> to-command-line streaming as the muxer needs to close down gracefully
> (essentially it needs to write a table of contents in the file) and
> that's why the file created doesn't play back. To test this add the
> num-buffers=50 property to the udpsrc; after receiving 50 buffers it
> will send an EOS message through the pipeline and close it down
> gracefully.
>
> I have had problems with the rtpamrdepay however the issues I had don't
> seem to be related to yours. My issues were that it would perpetually
> fail to recognise that I had provided it with a clock rate - however
> this has now been fixed in the version available from cvs.
>
>
> -----Original Message-----
> From: gstreamer-devel-bounces at lists.sourceforge.net
> [mailto:gstreamer-devel-bounces at lists.sourceforge.net] On Behalf Of
> Terry Leung
> Sent: Tuesday, 18 September 2007 09:57
> To: gstreamer-devel at lists.sourceforge.net
> Subject: Re: [gst-devel] recording a file from stream
>
> Hi all,
>
> I discover that even i do it without udpsink and udpsrc, it still
> doesnt work, I suspect this is a bug...
>
> The pipeline i use this time is:
> gst-launch -v ffmux_3gp name=mux ! filesink
> location=/home/video/jill3.3gp \
> {filesrc location=/home/video/jill.3gp ! qtdemux name=demuxer2 !
> rtpamrpay ! rtpamrdepay queue-delay=0 ! queue }! mux.audio_0
>
> without using rtpamrpay and rtpamrdepay, this pipeline work perfectly
> after adding this, the output file cannot be demux
>
> when i try to open the output file to demux and strema it like before,
> it shows that:
> Setting pipeline to PAUSED ...
> Pipeline is PREROLLING ...
> ERROR: from element /pipeline0/demuxer: This file contains no playable
> streams.
> Additional debug info:
> qtdemux.c(1444): gst_qtdemux_loop (): /pipeline0/demuxer:
> no known streams found
> ERROR: pipeline doesn't want to preroll.
> Setting pipeline to NULL ...
> FREEING pipeline ...
>
> The pipeline I use to stream is :
> gst-launch -v filesrc location=/home/video/jill3.3gp ! qtdemux
> name=demuxer \
> demuxer.!queue! rtpamrpay pt=98 ! udpsink host=172.20.122.9 port=11002
>
> anyone here has tried to use rtpamrdepay with success?
>
>
> On 9/17/07, Terry Leung <terry83 at gmail.com> wrote:
> > Hi all,
> >
> > I am writing a program to record rtp stream into a 3gp file(currently
> only amr)
> > I try to build a pipeline like the following:
> >
> > gst-launch ffmux_3gp name=mux ! filesink
> > location=/home/video/receive.3gp name=file \
> > {udpsrc port=11002 name=audioudp \
> > caps="application/x-rtp, media=audio, payload=96, clock-rate=8000,
> > encoding-name=AMR, ssrc=111111002 "\
> >  ! rtpamrdepay ! queue } mux.audio_0
> >
> > After i generate stream from another source, it shows that
> >
> > Setting pipeline to PAUSED ...
> > Pipeline is live and does not need PREROLL ...
> > Setting pipeline to PLAYING ...
> > New clock: GstSystemClock
> > ERROR: from element /pipeline0/audioudp: Internal data flow error.
> > Additional debug info:
> > gstbasesrc.c(1816): gst_base_src_loop (): /pipeline0/audioudp:
> > streaming task paused, reason not-negotiated (-4)
> > Execution ended after 12698510000 ns.
> > Setting pipeline to PAUSED ...
> > Setting pipeline to READY ...
> > Setting pipeline to NULL ...
> > FREEING pipeline ...
> >
> > anyone got idea on how to make it work?
> >
>
> ------------------------------------------------------------------------
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> This e-mail message (including any attachment) is confidential. If you
> have received this email in error please notify the sender immediately and
> delete this email from your system without copying or disseminating it or
> placing any reliance upon its contents. Any opinions expressed in this email
> (including attachments) are those of the author only.  This message
> (including any attachments) does not create any legally binding rights or
> obligations. D2see Limited is a company registered in England and Wales no.
> 5836806. Registered Office: 10 Barley Mow Passage, London W4 4PH, UK. VAT
> registered, no. 888 1076 85.  Tel +44 20 8819 5710
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> 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/20070922/d045ee9c/attachment.htm>


More information about the gstreamer-devel mailing list