EricssonResearch / openwebrtc

A cross-platform WebRTC client framework based on GStreamer
http://www.openwebrtc.org
BSD 2-Clause "Simplified" License
1.8k stars 537 forks source link

Android-OWR: h264 decoding issue #613

Closed fguerzoni closed 8 years ago

fguerzoni commented 8 years ago

Hi I'm having troubles decoding a h264 stream on android. My use case is Janus Gateway offering to android client a audio + video stream + data channel. Currently I'm focused on video stream.

FFPlay (on my pc) plays fine same RTP video stream. It loads the following sdp file:

v=0
o=- 0 0 IN IP4 127.0.0.1
s=H.264 Video, RtspServer_0.0.0.2
c=IN IP4 127.0.0.1
t=0 0
a=tool:libavformat 57.14.100
m=video 5114 RTP/AVP 126
a=rtpmap:126 H264/90000
a=fmtp:126 packetization-mode=1; sprop-parameter-sets=Z0IAH5WoFAFuQA==,aM48gA==; profile-level-id=42001F

Android OWR app prints out forever in console the following error: _05-25 22:45:51.965 16156-16179/com.ericsson.research.owr.examples.nativecall E/g_printerr: ==== Warning message start ==== 05-25 22:45:51.965 16156-16179/com.ericsson.research.owr.examples.nativecall E/g_printerr: Warning in element depay_rtph264depay_0. 05-25 22:45:51.965 16156-16179/com.ericsson.research.owr.examples.nativecall E/g_printerr: Warning: Could not decode stream. 05-25 22:45:51.965 16156-16179/com.ericsson.research.owr.examples.nativecall E/g_printerr: Debugging info: gstrtph264depay.c(1098): gst_rtp_h264_depay_process (): /GstPipeline:transport-agent-1/GstBin:transport_bin_1/GstBin:receive-output-bin-2/GstRtpH264Depay:depay_rtph264depay_0: Undefined packet type 05-25 22:45:51.965 16156-16179/com.ericsson.research.owr.examples.nativecall E/gprinterr: ==== Warning message stop ====

The sdp I get from Janus gateway is:

v=0
o=- 1464209077073881 1464209077073881 IN IP4 192.168.1.40
s=Streaming Test
t=0 0
a=group:BUNDLE audio video data
a=msid-semantic: WMS janus
m=audio 1 RTP/SAVPF 111
c=IN IP4 192.168.1.40
a=mid:audio
a=sendonly
a=rtcp-mux
a=ice-ufrag:l6zW
a=ice-pwd:q1Dimmz2kytL3kMTIqyyuX
a=ice-options:trickle
a=fingerprint:sha-256 79:BA:4D:75:68:F7:1E:05:38:9E:0D:0E:45:70:B5:2B:19:AA:D7:EE:DB:A2:2F:05:95:2A:37:45:38:75:CC:AF
a=setup:actpass
a=connection:new
a=rtpmap:111 PCMA/8000/1
a=ssrc:4278588042 cname:janusaudio
a=ssrc:4278588042 msid:janus janusa0
a=ssrc:4278588042 mslabel:janus
a=ssrc:4278588042 label:janusa0
a=candidate:1 1 udp 2013266431 192.168.1.40 20000 typ host
a=candidate:1 2 udp 2013266430 192.168.1.40 20001 typ host
m=video 1 RTP/SAVPF 126
c=IN IP4 192.168.1.40
a=mid:video
a=sendonly
a=rtcp-mux
a=ice-ufrag:18Qi
a=ice-pwd:3ahAJqWgMZSJgBs6ivAy0m
a=ice-options:trickle
a=fingerprint:sha-256 79:BA:4D:75:68:F7:1E:05:38:9E:0D:0E:45:70:B5:2B:19:AA:D7:EE:DB:A2:2F:05:95:2A:37:45:38:75:CC:AF
a=setup:actpass
a=connection:new
a=rtpmap:126 H264/90000
a=fmtp:126 profile-level-id=42c01e;level-asymmetry-allowed=1
a=rtcp-fb:126 nack
a=rtcp-fb:126 goog-remb
a=ssrc:325639875 cname:janusvideo
a=ssrc:325639875 msid:janus janusv0
a=ssrc:325639875 mslabel:janus
a=ssrc:325639875 label:janusv0
a=candidate:4 1 udp 2013266431 192.168.1.40 20002 typ host
a=candidate:4 2 udp 2013266430 192.168.1.40 20003 typ host
m=application 1 DTLS/SCTP 5000
c=IN IP4 192.168.1.40
a=mid:data
a=sctpmap:5000 webrtc-datachannel 16
a=ice-ufrag:ws1Q
a=ice-pwd:tFHSMvMJ24oOk2k5sJXRhE
a=ice-options:trickle
a=fingerprint:sha-256 79:BA:4D:75:68:F7:1E:05:38:9E:0D:0E:45:70:B5:2B:19:AA:D7:EE:DB:A2:2F:05:95:2A:37:45:38:75:CC:AF
a=setup:actpass
a=connection:new
a=candidate:9 1 udp 2013266431 192.168.1.40 20004 typ host

I've attached the Wireshark udp packets dump undefined_packet_type.pcapng.zip

Is there a way to make Android OWR work with that stream? Thanks in advance F

fguerzoni commented 8 years ago

It was issue of mine. First I replaced live555 streamer with gstreamer. Second baseline profile is supported only.