ckjavacoder / spydroid-ipcamera

Automatically exported from code.google.com/p/spydroid-ipcamera
GNU General Public License v3.0
0 stars 0 forks source link

Unable to multicast a video stream #95

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am currently attempting to multicast a video stream from the device to VLC.

I am encoding the stream using h.264, 1280x720, 15fps, 2Mbps. There is no audio 
stream.

 This works fine when I unicast the stream and but if I attempt to multicast the stream using 

    http://10.0.1.8:8080/spydroid.sdp?multicast

the stream starts but results in large numbers of dropped frames which causes 
VLC to stop playing the stream, normally within the first minute, the stream 
that I do receive is unwatchable. Using multicast also causes the Android 
device to become unresponsive and I have to force quit the application.

This does not seem to be a network issue as I do so the multicast UDP packets 
being sent and received but there are large gaps between some packets 1 - 2 
seconds. This seems to be caused by an issue with the encoding on the device. 
The following error appears in the logs repeatedly when there are large gaps 
between packets:

04-12 11:57:19.326: E/Camera2-StreamingProcessor(129): onFrameAvailable: Camera 
0: No free recording buffers, dropping frame

This does not a happen when I unicast the stream which most likely means the 
encoding issues are a result of attempting to multicast the packets.

The devices in question are the Nexus 4 and Nexus 10. Both are running 4.2.2 
and the latest version of Spydroid. I don't have access to any other Android 
devices so I can not confirm if this issue is specific to Nexus devices.

Original issue reported on code.google.com by richluca...@gmail.com on 12 Apr 2013 at 7:42

GoogleCodeExporter commented 9 years ago
Hi, I figured out where the problem was :)
The documentation do not explicitly mention it, but a WifiManager.MulticastLock 
needs to be registered to multicast packets :/

The bug will be fixed in the next release !

Original comment by FyHertz on 15 Apr 2013 at 5:29

GoogleCodeExporter commented 9 years ago
Okay, multicast seems to work find now !

Original comment by FyHertz on 18 Apr 2013 at 9:33