GStreamer Multicast on Android

FoxKisaraki sakurazuka2001 at yahoo.com.tw
Mon Feb 4 20:03:47 PST 2013


The problem has not been solved yet,  I created a environment that had 1pc, 3
laptops, 2 Android pad ( Asus TF300T, TA-10C ), 1 wireless soft AP (TP-Link
TL-WN723N, no IGMP) , 1 wireless router ( Vigor 2110n , IGMP),
Multicast-Group set as 239.255.255.250. Several conditions I observed these
days:

1. 
Laptop1 ( Senser) ----> Soft AP (PC)  ----> Laptop2 ( Receiver )
                                                   ----> Laptop3
                                                   ----> TF300T
                                                   ----> TA-10C
In this environment, each receiver could receive live stream from Sender,
however the quality was poor, especially on TA-10C. 

2.
Laptop1 ( Senser) ----> 2110n ----> Laptop2 ( Receiver )
                                          ----> Laptop3
                                          ----> PC
                                          ----> TF300T
                                          ----> TA-10C

In this environment, each receiver could receive live stream well except
Android Pads, even I enabled IGMP/IGMP Snooping in 2110n and acquired
MulticastLock in my program. By the way, I had installed wireshark for
Android on these pads, non of them received any multicast packets.

3. 
Laptop1 ( Senser, ) ----> 2110n ----> Laptop2 ( Receiver )
                                           ----> Laptop3
                                           ----> PC
                                           ----> TF300T
                                           ----> TA-10C

In this environment, I changed my multicast-group of sender to broadcast
address ( 255.255.255.255 ), each receiver could receive live stream ,
however the quality was extremely poor which packets loss and latency were
very obvious. 

>From 1 , due to the Soft AP lack of abilities of Multicast, it would
transfer multicast packets as broadcast.
>From 2, Pads couldn't received anything from specified multicast group
>From 3, I send stream as broadcast and every devices can receive 

so I guess and my own Android pads couldn't receive multicast but broadcast. 

And since I googled  this
<http://codeisland.org/2012/udp-multicast-on-android/>   on internet, I
thought this seems not a GStreamer problem but Android itself or
hardware/firmware.

The problem has not been solved yet, I'm still looking for solution.

FoxKisaraki wrote
> 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-tp4658289p4658354.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list