Record wav file from rtp stream
Gstlili
ti_mourad at yahoo.fr
Tue Apr 22 07:56:31 PDT 2014
Thank you very much for your help
Le Mardi 22 avril 2014 12h40, Sebastian Dröge-3 [via GStreamer-devel] <ml-node+s966125n4666535h75 at n4.nabble.com> a écrit :
On Mo, 2014-04-21 at 06:57 -0700, Gstlili wrote:
> Hi, all !
>
> I need to record audio from incoming udp stream, and convert it to wav
> format.
>
> I have two problems:
>
> First:
>
> The following pipeline record the played video without sound !!!
>
> sender:
>
> gst-launch-0.10 -e -v filesrc location=/home/media/example.mp4 ! qtdemux !
> h264parse ! queue ! ffdec_h264 ! x264enc ! video/x-h264 ! rtph264pay pt=96 !
> udpsink host=127.0.0.1 port=1234 sync=false
>
> receiver:
>
> gst-launch-0.10 udpsrc port=1234
> caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264"
> ! gstrtpjitterbuffer latency=100 ! rtph264depay ! mpegtsmux ! filesink
> location=/home/mtlili/audio_record.mp4 This does not have any sound at all because you only handle the video
part of the file here. Take a look at the examples in
gst-plugins-good/tests/examples/rtp to see how to use the RTP elements
properly and with multiple streams, but basically you a) should use the
rtpbin element, b) use sync=true on all RTP udpsinks, c) have multiple
branches in your pipeline (one for audio, one for video).
(Also on the receiver you use mpegtsmux but write to a file called .mp4.
MPEG TS is not the same as MP4).
> Second:
> I change the receiver pipeline to save a wav file format but i doesn't work
> :
>
> gst-launch-0.10 udpsrc port=1234
> caps="application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264"
> ! gstrtpjitterbuffer latency=100 ! rtph264depay ! mpegtsmux ! audioconvert !
> wavenc ! filesink location=file.wav
>
> I receive : WARNING: erroneous pipeline: could not link mpegtsmux0 to
> audioconvert0. rtph264depay outputs an H264 video stream, mpegtsmux converts that to an
MPEG TS stream with H264 video... and audioconvert can only handle raw
audio. You'll have to stream the audio separately via RTP and use an
audio codec for that.
--
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
signature.asc (968 bytes) Download Attachment
________________________________
If you reply to this email, your message will be added to the discussion below:http://gstreamer-devel.966125.n4.nabble.com/Record-wav-file-from-rtp-stream-tp4666512p4666535.html
To unsubscribe from Record wav file from rtp stream, click here.
NAML
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Record-wav-file-from-rtp-stream-tp4666512p4666542.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140422/03a55bcc/attachment-0001.html>
More information about the gstreamer-devel
mailing list