Love it! Kudos to all who have contributed to the project…
Easy enough to setup!
Just one glitch that would be nice to resolve, while it is playing the live stream on the android tv, the pause button flickers in the center of the video and the timeline bar jumps up and down along the line…
Does anyone know of the cause or a solution? Is it posible to hide all the controls as though it has been made full screen?
Just realised I posted to the wrong thread. Original post
I’m trying to get this working on a Shield TV. I’ve now managed to get snapshot images working. I can also get online videos working using post.json ( I tried Blue stars video) or using Developer Tools->Services.
I’m still stumped with getting webrtc video working. The pop-up appears but it is blank. The link to the video works in Firefox but not in post.json or in developer tools.
I am using an NGINX reverse proxy and my HA is accessible externally. I did try the port forwarding of UDP ports but that didn’t make any difference.
Found out my issue:
There are different versions of the apk available:
The original apk from Rogro82 - This one didn’t work for me.
The forked version by gmcmicken to support web-javascript - This is the one that fully worked.
The forked version by desertblade to support http/Frigate - This one partially worked for me.
I ditched the idea of using the WebRTC player with my build. Using frigates built in MPJEG streams loads much faster and keeps everything internal on my network.
Updated PipUP APK to support JavaScript to use with WebRTC. Still supports HTTP requests, so you can do internal calls.
Noticed that after 6 or so popups in short period, Frigate started to return a white video box. Added destroying of the WebView when the popup closes and that has seemed to have fixed the issue.
Tested on FireTV Cube with both MJPEG and WebRTC streams. Still getting delayed loading for local WebRTC streams, so I am sticking with local MJPEG streams.
Question for you… I’ve found that if a stream contains audio, it will pause some apps on the Shield. I’ve worked around this by stripping the audio before it arrives but is there a possibility to always just mute the streams in this pipup? TBH, I am using the oiginal one you forked still but I am looking to test yours out soon and see how it works.
You may want to look into the go2rtc project. I have instant loading and much more. Its pretty impressive.
This is perfect! I tried to compile the source code with fixes, but I only got success messages from the gradle batch file, but no output.
I had to adopt the Frigate MJPEG streams for my Reolink cameras. I’ve tried every combination I can think of with Go2RTC (Using the RTSP stream, using RTMP, adding as a generic camera to HASS, using the Frigate RTMP restream) but they all do the loading animation for anywhere from 5 to 10 seconds. Considering I only want the pop up for a max of 10 seconds, I end up not seeing anything.
Interestingly, I have no issues with the streams from Hikvision doorbells. I have a couple of KV6113s, and they load the stream within a second. I haven’t added them to Frigate yet, so this just adding them as generic cameras. Not sure if this is an issue with the resolution of the streams or if the Reolinks are just outdated.
I looked at muting the video in webView. Looks like it will mute the entire system. I am sure there is a workaround, if I get a chance I will do some more research. I am not an Android dev so there is a lot I don’t know.
Could you explain how you acheived stripping the audio? The only way I could strip audio is through the ffmpeg option but this causes a delay to load the stream via webrtc as the process to start ffmpeg and get the stream etc can take around 5-10 seconds so pointless in the end. I’ve also managed to use my own cutom page url to obtain a webrtc stream with the video element already muted but it seems videos will still pause or stop when the pipup shows the webrtc url and starts playing the video…
@calisro Thats what i’m referring to I’m already using go2rtc but its not possible to get instant video on ffmpeg conversion which seems to be needed to strip audio with just having #video=copy
It can be on any rtsp link. Not only loopback. I try to loopback to a single url to the Camera to prevent multiple streams from opening against the camera itself though.
Ahh interesting, I will play around with it now that my videos aren’t stopping. With it being on demand the connections would be minimal then released when the popup closes so should be alright to get rtsp straight from device for my use case.
EDIT: turns out rtsp://DEVICE_IP:DEVICE_PORT/unicast?video doesn’t even work so will stick with the loop back
Your example and help has now allowed me to easily understand how go2rtc disables audio and its simply done in Javascript so I’ve ended up porting my own view and am using RTSPToWeb and no need for extra streams etc. I am currently preferring RTSPToWeb as it’s a bit more stable on my streams but I’m ready to port everything over to go2rtc once it matures a bit as I’m wanting to have the MJPEG conversion also but without the startup delay (This is benificial for Google Hubs)… Thanks again for your quick responses and saving me more frustrations!
NOTE: Also creating my own view has allowed me to also remove the controls from appearing briefly and showing a poster image (camera snapshot) instead of the big play icon while its loading.