streaming delay

Lee Matthews lma at spaceapplications.com
Thu Feb 13 05:25:23 PST 2014


Thanks for the responses.

When using the blocksize property if I set the block size to anything other than 4608 I get the following error : could not initialize encoder (wrong parameters?)

But I guess this is not a major issue as I'm going to start using the lossy codecs instead.

I have measured the latency without an encoder, as you suggested, plain audio over TCP. I heard no perceptible delay.

As for opus, I'm unable to use it as apparently there is no such element : 
gst-inspect opusenc
No such element or plugin 'opusenc'

I've tried looking at the status of the gstreamer1.0-plugins-bad package using dpkg -s and I get : 

Package: gstreamer1.0-plugins-bad
Status: install ok installed
Multi-Arch: same
Priority: extra
Section: libs
Installed-Size: 2907
Maintainer: Ubuntu Developers <ubuntu-devel-discuss at lists.ubuntu.com>
Architecture: amd64
Source: gst-plugins-bad1.0
Version: 1.0.5-1ubuntu1~ubuntu12.04.1~ppa1
Replaces: gstreamer1.0-plugins-base (<< 0.11.94)
Provides: gstreamer1.0-audiosink, gstreamer1.0-audiosource, gstreamer1.0-videosink, gstreamer1.0-videosource, gstreamer1.0-visualization
Depends: libass4 (>= 0.9.7), libbz2-1.0, libc6 (>= 2.15), libcurl3-gnutls (>= 7.16.2-1), libdca0, libdvdnav4, libdvdread4, libfaad2, libflite1, libgcc1 (>= 1:4.1.1), libglib2.0-0 (>= 2.32), libgme0 (>= 0.5.5), libgsm1 (>= 1.0.13), libgstreamer-plugins-bad1.0-0 (= 1.0.5-1ubuntu1~ubuntu12.04.1~ppa1), libgstreamer-plugins-base1.0-0 (>= 1.0.0), libgstreamer1.0-0 (>= 1.0.0), libmimic0, libmms0 (>= 0.4), libmodplug1, libopus0, liborc-0.4-0 (>= 1:0.4.16), librtmp0 (>= 2.3), libschroedinger-1.0-0 (>= 1.0.9), libsoundtouch0, libspandsp2 (>= 0.0.6~pre18), libstdc++6 (>= 4.1.1), libvo-aacenc0 (>= 0.1.0~rc1), libvo-amrwbenc0, libzbar0 (>= 0.10), gstreamer1.0-plugins-base
Pre-Depends: multiarch-support
Suggests: frei0r-plugins
Conflicts: gstreamer1.0-plugins-base (<< 0.11.94)
Description: GStreamer plugins from the "bad" set
 GStreamer is a streaming media framework, based on graphs of filters
 which operate on media data.  Applications using this library can do
 anything from real-time sound processing to playing videos, and just
 about anything else media-related.  Its plugin-based architecture means
 that new data types or processing capabilities can be added simply by
 installing new plug-ins.
 .
 GStreamer Bad Plug-ins is a set of plug-ins that aren't up to par compared
 to the rest. They might be close to being good quality, but they're missing
 something - be it a good code review, some documentation, a set of tests, a
 real live maintainer, or some actual wide use.
Homepage: http://gstreamer.freedesktop.org/modules/gst-plugins-bad.html
Gstreamer-Decoders: application/sdp; application/x-hls; application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], encoding-name=(string){ TELEPHONE-EVENT, X-GST-OPUS-DRAFT-SPITTKA-00 }; application/x-yuv4mpeg, y4mversion=(int)2; audio/mpeg, mpegversion=(int)4, stream-format=(string){ raw, adts }; audio/mpeg, mpegversion=(int)2; audio/ms-gsm; audio/x-adpcm, layout=(string){ microsoft, dvi }; audio/x-ay; audio/x-dts; audio/x-gbs; audio/x-gsm; audio/x-gym; audio/x-hes; audio/x-it; audio/x-kss; audio/x-mod; audio/x-nsf; audio/x-opus; audio/x-private1-dts; audio/x-s3m; audio/x-sap; audio/x-siren, dct-length=(int)320; audio/x-spc; audio/x-stm; audio/x-vgm; audio/x-xm; image/x-portable-anymap; image/x-portable-bitmap; image/x-portable-graymap; image/x-portable-pixmap; video/mpeg, mpegversion=(int){ 1, 2 }, systemstream=(boolean){ true, false }; video/mpeg, mpegversion=(int)4, systemstream=(boolean)false; video/mpegts, systemstream=(boolean)true; video/x-cdxa; video/x-dirac; video/x-divx, divxversion=(int)[ 4, 5 ]; video/x-h263, variant=(string)itu; video/x-h264
Gstreamer-Elements: adpcmdec, adpcmenc, asfmux, asfparse, assrender, audioparse, audiosegmentclip, autoconvert, autovideoconvert, bayer2rgb, bpmdetect, bulge, burn, bz2dec, bz2enc, checksumsink, chopmydata, chromahold, chromium, circle, coloreffects, compare, curlfilesink, curlftpsink, curlhttpsink, curlsmtpsink, dataurisrc, debugspy, diffuse, dilate, diracparse, dodge, dtmfdetect, dtmfsrc, dtsdec, dvbbasebin, dvbsrc, dvbsuboverlay, dvdspu, exclusion, faad, festival, fieldanalysis, fisheye, flitetestsrc, fpsdisplaysink, gaussianblur, gdpdepay, gdppay, gmedec, gsmdec, gsmenc, h263parse, h264parse, hlsdemux, id3mux, interaudiosink, interaudiosrc, interlace, intersubsink, intersubsrc, intervideosink, intervideosrc, irtspparse, kaleidoscope, liveadder, marble, mimdec, mimenc, mirror, mmssrc, modplug, mpeg4videoparse, mpegpsdemux, mpegpsmux, mpegtsmux, mpegvideoparse, opusdec, opusenc, opusparse, pcapparse, pinch, pitch, pnmdec, pnmenc, removesilence, rgb2bayer, rotate, rsndvdbin, rtmpsink, rtmpsrc, rtpasfpay, rtpdtmfdepay, rtpdtmfsrc, rtpopusdepay, rtpopuspay, schrodec, schroenc, sdpdemux, shmsink, shmsrc, sirendec, sirenenc, smooth, solarize, spacescope, spanplc, spectrascope, speed, sphere, square, srtenc, stretch, synaescope, tsdemux, tsparse, tunnel, twirl, videoparse, videosegmentclip, voaacenc, voamrwbenc, waterripple, wavescope, webvttenc, y4mdec, zbar
Gstreamer-Encoders: application/x-bzip; application/x-gdp; application/x-rtp, media=(string)audio, payload=(int)[ 96, 127 ], encoding-name=(string)X-GST-OPUS-DRAFT-SPITTKA-00; application/x-rtp, media=(string){ audio, video, application }, encoding-name=(string)X-ASF-PF; application/x-subtitle; audio/AMR-WB; audio/mpeg, mpegversion=(int)4, stream-format=(string){ adts, raw }, base-profile=(string)lc; audio/x-adpcm, layout=(string){ dvi }; audio/x-gsm; audio/x-opus; audio/x-siren, dct-length=(int)320; image/x-portable-anymap; image/x-portable-bitmap; image/x-portable-graymap; image/x-portable-pixmap; text/vtt; video/mpeg, mpegversion=(int)2, systemstream=(boolean)true; video/mpegts, systemstream=(boolean)true, packetsize=(int){ 188, 192 }; video/x-dirac; video/x-mimic; video/x-mp4-part; video/x-ms-asf, parsed=(boolean)true; video/x-qt-part
Gstreamer-Uri-Sinks: rtmfp, rtmp, rtmpe, rtmps, rtmpt, rtmpte, rtmpts
Gstreamer-Uri-Sources: data, dvb, dvd, mms, mmsh, mmst, mmsu, rtmfp, rtmp, rtmpe, rtmps, rtmpt, rtmpte, rtmpts
Gstreamer-Version: 1.0
Original-Maintainer: Maintainers of GStreamer packages <pkg-gstreamer-maintainers at lists.alioth.debian.org>


Here opusenc, opusdec and opusparse are visible, but I can't access them. Does anyone know why?

Thanks
Lee


----- Original Message -----
From: "Tim Müller" <tim at centricular.com>
To: gstreamer-devel at lists.freedesktop.org
Sent: Wednesday, 12 February, 2014 7:33:20 PM
Subject: Re: streaming delay

On Wed, 2014-02-12 at 16:33 +0100, Lee Matthews wrote:

> I'm guessing it's because flacenc needs a certain number of samples
> before it can compress a block, it therefore has to wait longer with a
> lower sample rate ? 
> 
> Is there any way that I can reduce the sample rate whilst keeping a low delay ?

You can play with flacenc's "blocksize" property, see gst-inspect-1.0
flacenc.

Have you measured the latency without any encoder at all? That is just
plain audio/x-raw over TCP ? You can parse it on the other end with
audioparse, see gst-inspect-1.0 audioparse.

For low-latency streaming maybe also consider UDP/RTP (there's no flac
payloader but there's a generic gst payloader which should work in that
case, and if it doesn't have to be lossless, maybe consider Opus, as
pointed out already by someone).

Cheers
 -Tim

-- 
Tim Müller, Centricular Ltd - http://www.centricular.com

_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list