简体   繁体   中英

Unable to play H.264 RTP stream in Android

I'm currently trying to get my Android playing a H.264 encoded video stream. I pass the URI of my RTSP server (and the respective media layer) to a VideoView instance and in Wireshark , I see the following:

Sauce           Destination      Protocol    Info
192.168.1.104   192.168.1.91     RTSP        DESCRIBE rtsp://192.168.1.91:554/mytransmitteroutput1

192.168.1.91    192.168.1.104    RTSP        Reply: RTSP/1.0 200 OK [SDP]

Funny thing is, the media player never gets further than this, never calling a SETUP etc. It just stops, on the VideoView "Can't play this video" appears and in Eclipse, I see the generic error Error (1, -247483648) so I assume the Android media player isn't happy with the SDP I'm sending back after the DESCRIBE . However, players like VLC or MXPlayer are completely satisfied and able to decode the stream.

Media format parameters in SDP

fmtp:96 profile-level-id=42C016; packetization-mode=1; sprop-parameter-sets=Z0KAHpZSgWh7IA==,aMkjUg==

Wireshark跟踪

I'm stupid. H.264 was encoded using high profile. According to this page https://developer.android.com/guide/appendix/media-formats.html , Android only supports the base profile.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM