MediaCodec and Camera: colorspaces don’t match

I solved it by swapping the byteplanes myself on Android level, using a simple function: public byte[] swapYV12toI420(byte[] yv12bytes, int width, int height) { byte[] i420bytes = new byte[yv12bytes.length]; for (int i = 0; i < width*height; i++) i420bytes[i] = yv12bytes[i]; for (int i = width*height; i < width*height + (width/2*height/2); i++) i420bytes[i] = yv12bytes[i … Read more

How to process raw UDP packets so that they can be decoded by a decoder filter in a directshow source filter

Peace of cake! 1. Get the data As I can see, you already know how to do that (start RTSP session, SETUP a RTP/AVP/UDP;unicast; transport, and get user datagrams)… but if you are in doubt, ask. No matter the transport (UDP or TCP) the data format is mainly the same: RTP data: [RTP Header – … Read more

Streaming via RTSP or RTP in HTML5

Technically ‘Yes’ (but not really…) HTML 5’s <video> tag is protocol agnostic—it does not care. You place the protocol in the src attribute as part of the URL. E.g.: <video src=”rtp://myserver.com/path/to/stream”> Your browser does not support the VIDEO tag and/or RTP streams. </video> or maybe <video src=”http://myserver.com:1935/path/to/stream/myPlaylist.m3u8″> Your browser does not support the VIDEO tag … Read more