-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No audio in tinycam app due to audio codec used in RTSP stream #340
Comments
Sorry, I wasn’t aware of that - the tinyCam Monitor app seems to be a bit picky about audio. Assuming that the developer of the app will not provide a solution any time soon, the only alternative would be to switch to a more versatile RTSP server like rtsp-simple-server, right? And since this is certainly easier said than done, I should probably better resign myself to the fact that the combination of wz_mini_hacks and tinyCam just doesn't work :( @gtxaspec love this project anyway, even if my use case as a baby monitor on the smartphone without sound unfortunately doesn’t work. By the way, @virmaior thanks for your work with the web server and @kohrar it's great that with self hosted mode and the possibility to link a local NTP server finally a privacy friendly solution is available!!! |
@mega3st that sounds about right. I've used rtsp-simple-server in the past with good results. Just enable RTSP on the Wyze cam and then add a new source to the rtsp-simple-server config like this:
You can then try pointing your tinyCam app to the rtsp-simple-server instance and see if that works. |
@kohrar with RTSP firmware 4.61.0.1, I had directly both video and audio in the tinyCam app. However, there were often longer freezers (despite full internet access). Since the stream is the same, I can't imagine that another hop through a separate rtsp-simple-server changes anything. Version 4.36.9.139 in combination with the official Wyze app runs smoothly but but isn’t my favorite solution. Do you know if it would be theoretically possible to encode the raw audio stream on the camera (e.g. via ffmpeg) to AAC and replace the v4l2rtspserver inside the wz_mini_hacks with the rtsp-simple-server? Running a separate rtsp-simple-server instance seems a bit overkill to me. |
@kohrar I don't think rebroadcasting the stream will fix it. The problem is that the camera is using an audio format that is not compatible with RTSP (s16le) which needs to be re-encoded. Wyze seems to be going back and forth with the audio codec on different firmware so that's why we just re-encode any incompatible format to AAC on the bridge. @mega3st Why not just connect to the wyze cams directly? Doesn't tinycam support stock firmware cams? |
@mrlt8 the intended solution was to operate the camera locally without internet access, which is why I became aware of this project in the first place. In addition to the unstable integration via RTSP in combination with the RTSP firmware, tinyCam indeed seems to support a cloud connection. However, this would mean that the camera would have to stay online and the latency is also higher. |
Not necessarily. I believe tinycam is using the same TUTK sdk as the wyze app, so it will always attempt to connect locally if on the same LAN as the cameras (that's why the app will sometimes show the cam as offline but still be able to connect). Edit: Looks like the v3/outdoor are using A-law (PCMA) and the latest v2 firmware μ-law (PCMU). |
I use simple-rtsp-server to proxy and recode the rtsp stream to get audio in TinyCam. Proxy:
Reencode audio I keep the two lines separate so I can still access the original feed via proxy for VLC clients to save on CPU usage when encoding isn't necessary. Disclaimer, the proxy and reencoded rtsp feeds above are not secured. |
@mrlt8 I just tried to connect with tinyCam directly to a local V3 without internet access, but either without initial connection to the Wyze server also no local connection comes up or the self hosted mode of the wz_mini_hacks prevents it... @clee604 running a separate rtsp server for my simple use case seems unnecessarily complex. Unfortunately the releases of the rtsp-simple-server do currently not contain a MIPS version, otherwise it would have been worth a shot to run it directly on the camera. So far the combination of RTSP firmware with wz_mini_hancks for self hosted mode and local NTP server comes closest to my desired solution. The only drawback is a high audio latency of about 4 seconds in tinyCam. |
As I was pondering what it would take to do this in v4l2rtspserver... I see that they have a pending PR to add support for converting the audio stream to MP3: Granted, it looks like it has been sitting there for a few months open/not merged, but this would suggest that this problem may go away in the future. |
this is fixed with the new go2rtc implementation i tested tinycam pro myself, audio works fine. use the latest master, please test audio if you can, see #550 |
When trying to activate audio in the tinycam app, the following error message appears
"Unsupported codec. Switch camera audio codec to Linear PCM, G.711 A-law (PCMA), G7.11 μ-law (PCMU), AAC, AMR-NB, G.726 (32kbps)"
Is it possible to change the audio codec by adjusting a file?
If not, would it be possible to create an option for this in the future, or maybe even think about changing the default codec in the interest of maximum compatibility?
The text was updated successfully, but these errors were encountered: