Opus via RTP

Miha Nedok mike at mike.si
Mon Sep 12 21:43:26 UTC 2016


Thanks guys I was missing a few elements, I tried with fakesink so long
that it worked.

But now I have a different question I have to mux and transport audio and
video combined.
I have to use MPEGTS, but when I use the MPEGTS muxer instead of mp4 an
empty file is created and nothing happens,
i thought that MPEGTS container can have x264 and AAC.

My mp4mux pipeline is now like this:
OUT_FILE="stream.mp4"

LISTEN_AUDIO_PORT=1236
LISTEN_VIDEO_PORT=1234

ACAPS="\"application/x-rtp, media=(string)audio, clock-rate=(int)48000,
encoding-name=(string)OPUS,payload=111\""
VCAPS="\"application/x-rtp, media=(string)video, clock-rate=(int)90000,
encoding-name=(string)VP8,framerate=30/1,payload=100\""

GST_PARAMS="-e -m -v --gst-debug=**:4 "

gst-launch-1.0 $GST_PARAMS \
 udpsrc port=$LISTEN_VIDEO_PORT caps=$VCAPS ! rtpjitterbuffer latency=3000
do-retransmission=true ! queue ! rtpvp8depay ! vp8dec ! videoscale
sharpen=1 method=2 ! videoconvert \
! queue ! x264enc bitrate=102400 subme=5 ! queue \
! muxer.video_0 \
udpsrc port=$LISTEN_AUDIO_PORT caps=$ACAPS ! rtpjitterbuffer latency=3000
do-retransmission=true ! queue ! rtpopusdepay ! opusdec ! audioconvert \
! queue ! lamemp3enc bitrate=64000 ! queue ! muxer.audio_0 \
mp4mux name=muxer streamable=true \
! filesink location=$OUT_FILE  \



And if somebody could give me a hint how could i put this MP4 into a single
udpsink?





On Mon, Sep 12, 2016 at 6:16 PM, Olivier Crête <olivier.crete at collabora.com>
wrote:

> Hi,
>
> What version of GStreamer are you using? You may be using a very old
> version. This  gst-launch-1.0 line works fine here on 1.8.x.
>
> Olivier
>
> On Sun, 2016-09-11 at 14:24 +0200, Miha Nedok wrote:
>
> I know that :)
>
> but even if i ad rtpopusdepay i always get the same result.
>
> gst-launch-1.0 -vvvvv udpsrc port=1236 caps="application/x-rtp,media=
> (string)audio,clock-rate=48000,encoding-params=2,
> encoding-name=(string)OPUS,payload=111"  ! rtpopusdepay ! opusdec !
> audioconvert
> Setting pipeline to PAUSED ...
> Pipeline is live and does not need PREROLL ...
> Setting pipeline to PLAYING ...
> New clock: GstSystemClock
> /GstPipeline:pipeline0/GstUDPSrc:udpsrc0.GstPad:src: caps =
> "application/x-rtp\,\ media\=\(string\)audio\,\ clock-rate\=\(int\)48000\,\
> encoding-params\=\(int\)2\,\ encoding-name\=\(string\)OPUS\,\
> payload\=\(int\)111"
> /GstPipeline:pipeline0/GstRTPOpusDepay:rtpopusdepay0.GstPad:src: caps =
> "audio/x-opus\,\ channel-mapping-family\=\(int\)0"
> /GstPipeline:pipeline0/GstOpusDec:opusdec0.GstPad:sink: caps =
> "audio/x-opus\,\ channel-mapping-family\=\(int\)0"
> /GstPipeline:pipeline0/GstRTPOpusDepay:rtpopusdepay0.GstPad:sink: caps =
> "application/x-rtp\,\ media\=\(string\)audio\,\ clock-rate\=\(int\)48000\,\
> encoding-params\=\(int\)2\,\ encoding-name\=\(string\)OPUS\,\
> payload\=\(int\)111"
> /GstPipeline:pipeline0/GstOpusDec:opusdec0.GstPad:src: caps =
> "audio/x-raw\,\ format\=\(string\)S16LE\,\ layout\=\(string\)interleaved\,\
> rate\=\(int\)48000\,\ channels\=\(int\)2\,\ channel-mask\=\(bitmask\)
> 0x0000000000000003"
> /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps =
> "audio/x-raw\,\ format\=\(string\)S16LE\,\ layout\=\(string\)interleaved\,\
> rate\=\(int\)48000\,\ channels\=\(int\)2\,\ channel-mask\=\(bitmask\)
> 0x0000000000000003"
> /GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps =
> "audio/x-raw\,\ format\=\(string\)S16LE\,\ layout\=\(string\)interleaved\,\
> rate\=\(int\)48000\,\ channels\=\(int\)2\,\ channel-mask\=\(bitmask\)
> 0x0000000000000003"
> ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: Internal
> data flow error.
> Additional debug info:
> gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/
> GstUDPSrc:udpsrc0:
> streaming task paused, reason not-linked (-1)
> Execution ended after 0:00:00.020207760
> Setting pipeline to PAUSED ...
> Setting pipeline to READY ...
> Setting pipeline to NULL ...
> Freeing pipeline ...
>
> On Sun, Sep 11, 2016 at 2:11 PM, Sebastian Dröge <
> sebastian at centricular.com> wrote:
>
> On So, 2016-09-11 at 04:17 -0700, MikeSI wrote:
> > I cannot reeive opus via RTP. Even If i set payload it's always the
> > same.
> >
> > gst-launch-1.0 -vvvvv udpsrc port=1236
> > caps="application/x-rtp,media=(string)audio,clock-
> > rate=48000,encoding-params=2,encoding-name=(string)OPUS"
>
> This is not a complete pipeline, you're missing at least the RTP
> depayloader, possibly a decoder and converters, and a sink. E.g.
>
> gst-launch-1.0 -vvvvv udpsrc port=1236 caps="application/x-
> rtp,media=(string)audio,clock-rate=48000,encoding-params=2,encoding-
> name=(string)OPUS" ! rtpopusdepay ! opusdec ! fakesink
>
> --
> Sebastian Dröge, Centricular Ltd · http://www.centricular.com
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
> _______________________________________________
> gstreamer-devel mailing listgstreamer-devel at lists.freedesktop.orghttps://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> --
>
> Olivier Crête olivier.crete at collabora.com
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160912/dceceb90/attachment.html>


More information about the gstreamer-devel mailing list