I have a voip application I am working on using the OPAL voip SIP stack.
I am overriding a class called OpalLocalEndpoint and reading/writing encoded data to and from my gstreamer pipelines. For reading, I grab the rtp payloaded data from an appsink, and for writing I push the payloaded data to the appsrc.
I captured the SDP files from wireshark.
Here is a client to the App.
v=0
o=- 1319058426 1 IN IP4 192.168.0.71
s=Opal SIP Session
c=IN IP4 192.168.0.71
t=0 0
m=audio 5086 RTP/AVP 125 0 8 124 101
a=sendrecv
a=rtpmap:125 Speex/16000/1
a=fmtp:125 sr=16000,mode=any
a=rtpmap:0 PCMU/8000/1
a=rtpmap:8 PCMA/8000/1
a=rtpmap:124 Speex/8000/1
a=fmtp:124 sr=8000,mode=any
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16,32,36
m=video 5088 RTP/AVP 109 108 34 114
b=AS:4096
b=TIAS:4096000
a=sendrecv
a=rtpmap:109 h264/90000
a=fmtp:109 packetization-mode=1;profile-level-id=42C01E
a=rtpmap:108 h263-1998/90000
a=fmtp:108 D=1;F=1;I=1;J=1;CIF=1;CIF4=1;QCIF=1;CUSTOM=320,240,1;CUSTOM=640,480,1
a=rtpmap:34 h263/90000
a=fmtp:34 F=1;CIF=1;CIF4=1;QCIF=1
a=rtpmap:114 MP4V-ES/90000
a=fmtp:114 profile-level-id=5
Here is the server replying back to the client
v=0
o=- 1319058099 1 IN IP4 192.168.0.215
s=HHP Video Codec/1.0
c=IN IP4 192.168.0.215
t=0 0
m=audio 5006 RTP/AVP 125 0 8 124
a=inactive
a=rtpmap:125 Speex/16000/1
a=rtpmap:0 PCMU/8000/1
a=rtpmap:8 PCMA/8000/1
a=rtpmap:124 Speex/8000/1
a=maxptime:20
m=video 5004 RTP/AVP 109
b=AS:2048
b=TIAS:2048000
a=sendrecv
a=rtpmap:109 h264/90000
a=fmtp:109 packetization-mode=1;profile-level-id=42c01e
I encode the data with:
v4l2src name=videoSrc ! video/x-raw-yuv, format=(fourcc)I420, width=352, height=288, framerate=(fraction)30/1 ! videobalance name=VideoBalance ! textoverlay name=chanNameFilter ! textoverlay name=osdMessageFilter ! textoverlay name=sessionTimerOverlay ! x264enc byte-stream=true bframes=0 b-adapt=0 tune=0x4 speed-preset=3 bitrate=256 sliced-threads=false profile=0 ! rtph264pay mtu=1412 ! appsink name=videoAppSink sync=false
And attempt to decode the incoming data with
appsrc is-live=true do-timestamp=false typefind=true name=videoAppSrc ! application/x-rtp, media=video, payload=109, clock-rate=90000, encoding-type=H264, byte-stream=true, access-unit=true ! rtph264depay ! ffdec_h264 ! xvimagesink name=videoOutputSink
However, while the encoded data shows up on the client (it didn’t at first, I had to add all of those properties until it finally showed up correctly), I have not been able to get the decoding end to work.
It shows a mostly gray screen with blips of pink, yellow, and green. Sometimes I get a little more of the right colors and most of the time just gray.
If I use this same exact pipeline to interact with VLC it works fine. My guess is that I am goofing up the caps somewhere. Can anyone offer any ideas on what I should be looking for?
I am having the same troubles with each of my other encoders as well, i.e. theora, h263 etc… though each in a different way.
It turns out the VOIP stack, which is otherwise an excellent stack, either has a bug or I do not understand the way it packages and transmits the RTP packets. I bypassed it and sent the data via gstreamer udpsink and udpsrc and it works fine. Now my only remaining questions will be directed to the dev team of the stack. Thanks for your help.