rogro82/PiPup

White box for MJPEG video

Opened this issue · 2 comments

I've been using PiPup for a bit and have noticed that after a period of time, it stops displaying video. I'm using Streameye to create MJPEG streams from my security cameras, because they are a bit lightweight to have multiple streams. The project can be found here:

https://github.com/ccrisan/streameye

When my android tv box boots up, it will display the mjpeg video just fine. But then something happens and a white box pops up on the screen instead of a video. There's no error message in this box; it's just a white box. If I reboot my Mibox, it works fine again until a certain point. Here's the command I'm using to trigger it...

foo@bar:~/scripts/sec-cams$ curl --header "Content-Type: application/json" --request POST --data @/home/foo/scripts/sec-cams/driveway-v.json http://192.168.112.79:7979/notify

PopupProps(duration=10, position=TopRight, backgroundColor=#CC000000, title=null, titleSize=14.0, titleColor=#ffffff, message=null, messageSize=12.0, messageColor=#ffffff, media=Web(uri=http://192.168.110.2:8081, width=640, height=480))

foo@bar:/scripts/sec-cams$ cat driveway-v.json
{
"duration": 10,
"position": 0,
"media": { "web": { "uri": "http://192.168.110.2:8081"}}
}
foo@bar:
/scripts/sec-cams$

If this happens, I can load up another stream and that works fine in showing that other stream. I can also pull the video up in my web browser on my workstation and view the video fine.

I'm wondering if anybody has run into this issue before, or can have some suggestion on how to help debug/fix it.

I've been doing some more research on it, and while not 100% sure, I think this is happening because pipup isn't closing the video feed. I'm sending an MJPEG feed over to view on the screen for 10 seconds. If I do a netstat on my server, I'm seeing multiple feeds open to my mibox. After the 6th feed, it seems like the white box appears and can no longer connect to my server.

$ sudo netstat -anp | grep -i 8081 | cat -n
1 tcp 0 0 0.0.0.0:8081 0.0.0.0:* LISTEN 94723/streameye
2 tcp 0 0 192.168.110.2:8081 192.168.112.79:39562 ESTABLISHED 94723/streameye
3 tcp 0 0 192.168.110.2:8081 192.168.112.79:39542 ESTABLISHED 94723/streameye
4 tcp 0 0 192.168.110.2:8081 192.168.112.79:39546 ESTABLISHED 94723/streameye
5 tcp 0 0 192.168.110.2:8081 192.168.112.79:39550 ESTABLISHED 94723/streameye
6 tcp 0 0 192.168.110.2:8081 192.168.112.79:39548 ESTABLISHED 94723/streameye
7 tcp 0 0 192.168.110.2:8081 192.168.112.79:39564 ESTABLISHED 94723/streameye

If I kill the webview process on my android tv mibox with this:

am force-stop com.google.android.webview

I'm able to view the video popups again and everything works fine, and it kills all the open connections on my linux server.

Is there a way to kill this process in pipup so that it closes the mjpeg connections?

I'm also seeing this bug.
Device is Nvidia Shield
Video source is blueiris URL:

"media": { "web": {
"uri": "http://192.168.0.3:34532/mjpg/Cam1/video.mjpg", "width": 640, "height": 360
}}