MPEG-4 Audio & Generic payloaders depayloaders
MPEG-4 Audio
Pipelines
gst-launch-1.0 audiotestsrc is-live=true ! fdkaacenc ! rtpmp4apay2 ! udpsink host=127.0.0.1 port=5004
gst-launch-1.0 udpsrc caps='application/x-rtp,media=audio,clock-rate=90000,encoding-name=MP4A-LATM,payload=96,config=(string)40002410' ! rtpjitterbuffer ! rtpmp4adepay2 ! decodebin3 ! audioconvert ! audioresample ! autoaudiosink
MPEG-4 Generic
Notable changes for the payloader:
- Uses a larger mode
Config
'ssizelength
thanrtpmp4gpay
for video otherwise some large AU can't be payloaded.rtpmp4gpay
uses bit shifts to have the AU data size fit in 13 bits, resulting in an invalid size. - Implements an
aggregate-mode
property which allows selecting between:- Zero Latency: always send out elementary streams right away, do not wait for more elementary streams to fill a packet.
- Aggregate: collect elementary streams until we have a full packet or the
max-ptime
limit is hit (if set). - Automatic (default): zero-latency if upstream is live, otherwise aggregate elementary streams until packet is full.
- Not advertising unsupported CELP modes.
Pipelines
Audio
gst-launch-1.0 audiotestsrc is-live=true ! fdkaacenc ! rtpmp4gpay2 ! udpsink host=127.0.0.1 port=5004
gst-launch-1.0 udpsrc caps='application/x-rtp,media=audio,clock-rate=44100,encoding-name=MPEG4-GENERIC,payload=96,encoding-params=1,streamtype=5,profile-level-id=2,mode=AAC-hbr,config=(string)1208,sizelength=13,indexlength=3,indexdeltalength=3' ! rtpjitterbuffer ! rtpmp4gdepay2 ! decodebin3 ! audioconvert ! audioresample ! autoaudiosink
Video
gst-launch-1.0 videotestsrc is-live=true ! avenc_mpeg4 ! mpeg4videoparse ! rtpmp4gpay2 ! udpsink host=127.0.0.1 port=5004
gst-launch-1.0 udpsrc caps='application/x-rtp,media=video,clock-rate=90000,encoding-name=MPEG4-GENERIC,payload=96,mode=generic,sizelength=16,indexlength=3,indexdeltalength=3' ! rtpjitterbuffer ! rtpmp4gdepay2 ! decodebin3 ! videoconvert ! autovideosink
Edited by François Laignel