GStreamer Multicast on Android
FoxKisaraki
sakurazuka2001 at yahoo.com.tw
Thu Jan 31 20:01:46 PST 2013
Hello everyone, thanks for the help last time.
I'm now developing an Android App based on GStreamer-Android tutorial3,
which can receive udp video streaming by UDP from remote PC.
So far, I can receive my video very well on Android with unicast, but failed
with multicast, packets dropped ( or lossed ) very seriously in multicast.
The pipelines were basically the same except "multicast-group" parameter of
udpsrc between unicast and multicast.
my pipeline on PC ( Sender ):
autovideosrc ! video-raw-yuv, width=320, height=240, framerate=30/1 !
ffmpegcolorspace ! x264enc sliced-threads=true speed-preset=1 bitrate=1024
byte-stream=true key-int-max=15 ! h264parse config-interval=1 ! queue2 !
mpegtsmux name=mux !rtpmp2tpay pt=96 !udpsink host=224.0.0.252 port=8558
auto-multicast=true qos=true blocksize=32768
autoaudiosrc ! audiorate ! audioconvert ! lamemp3enc target=1 bitrate=128
encoding-engine-quality=0 !mp3parse ! queue2 ! mux.
my pipeline on Android ( Receiver ):
udpsrc port=8558 buffer-size=33445532 blocksize=32768
multicast-group=224.0.0.252 caps=\"application/x-rtp, media=(string)video,
payload=96\" ! gstrtpjitterbuffer ! rtpmp2tdepay queue-delay=3000 ! tsdemux
name=demux ! queue ! ffdec_h264 ! eglglessink sync=true demux. ! queue !
ffdec_mp3 ! openslessink sync=true
I tried several way as below to solve it but all failed.
1. Increase "buffer-size" in udpsrc ( this works on Windows but seems no
effect on Android )
2. Add gstrtpjitterbuffer element to pipeline ( this works with unicast, but
no effect with multicast )
3. Add Android-Manifest.permission:CHANGE_WIFI_MULTICAST_STATE and acquire
MulticastLock in Android Code ( seems no effect, by the way it's weird that
udpsrc could receive multicast packet without acquired this lock )
4. Acquired wifi lock with flag WIFI_MODE_FULL_HIGH_PERF to keep wifi in max
performers ( seems no effect )
5. reduce mtu size, h264 bitrate, udp blocksize ( no effect )
6. Receive multicast packet from Android(JAVA) then forward (resend) it to
self ( C, 127.0.0.1 ) as unicast. ( I feel I like a fool for did this, and
this didn't work at all. Orz )
Anyone, any idea about multicast?
Thanks very much.
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/GStreamer-Multicast-on-Android-tp4658289.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list