EliasKotlyar / Xiaomi-Dafang-Hacks

4.19k stars 1k forks source link

tinyCam rtsp audio #461

Closed stantheboss closed 5 years ago

stantheboss commented 6 years ago

Cannot find anything about getting audio steam from the inbuild mic to passthrough within rtsp video stream, is it possible? Followed manual but still no sound.

jmtatsch commented 6 years ago

Do you hear sound when you watch with vlc?

stantheboss commented 6 years ago

Yep, I do hear sound through vlc, tinyCam seems not to detect camera as sound enabled though...

saipsa commented 6 years ago

tincyCam has audio muted by default.

stantheboss commented 6 years ago

OK, where do I unmute? It tells me that the camera does not support audio.

stantheboss commented 6 years ago

Anyone can confirm working audio stream in tinycam?

Dopeyr commented 6 years ago

@stantheboss Yes, it works for me. My command line arguments look like this:

/system/sdcard/bin/v4l2rtspserver-master -W1600 -H900 -E PCMU:8000 -r 3 -U root:mypassword -P 8554

When I click the 'unmute' button in tinycam it then shows a level meter to the right of the icon. I'm running 10.1 Beta 6 of tinycam.

stantheboss commented 6 years ago

Well, that's strange, i don't see an unmute buttom in tinycam but the same rtsp stream in vlc is with the sound. I'll dig more...

Dopeyr commented 6 years ago

Hi @stantheboss,

Just to avoid any confusion, this is the icon I see when the audio is muted.

screenshot_20180618-223319

My only thought is perhaps if you have multiple cams, you have to be viewing only one camera in tinycam before the sound icon appears.

stantheboss commented 6 years ago

Hi @Dopeyr I do have multiple cams, but non of the Dafang cams have the sound button. Has it been introduced with the specific firmware version? Maybe I need to update fw first or my rtspserver service needs some additional audio specific flags to be set...

Tried extending options in /system/sdcard/config/rtspserver.conf with RTSPH264OPTS="-W1280 -H720 -E PCMU:8000 -r 3 -U root:mypass" but the service won't start after that mod.

From the other hand though, if I get the sound in VLC, than rtsp steam contains one, so there is no need to tweak v4l2rtspserver-master. I have a latest tinycam beta installed with the embedded dafang-hack support.

screenshot_2018-06-19-11-43-16

Dopeyr commented 6 years ago

Yeah, if you can get it in VLC it seems v4l2rtspserver-master is working OK. I think I remember someone saying it only worked in tinycam with PCM, but I could be wrong. I haven't tried anything else e.g. MP3.

Might be worth running v4l2rtspserver-master manually and trying some different audio options until you find a combination that works? It would be good to see the output too which might have some clues as to why it's not working.

maxhammond commented 6 years ago

Hi @stantheboss , how many cameras do you have working with TinyCam? I have 3 and The TinyCam app can’t really cope. It starts them ok but they all start to decay FPS wise and soon drop. It’s not an issue with my network as running 3 VLC sessions on my PC is fine. Might be my phone , it a Samsung S6. What are you running TinyCam on and how many cameras have you run at the same time successfully? thanks Max

stantheboss commented 6 years ago

Hi @maxhammond, I've got 2 cameras hooked up in tinycam, both dafang, and both cope to stream with 25fps simultaneously in LAN and in WAN through openvpn, my phone is lg v30.

royalidea commented 6 years ago

I'm facing the same issue. tinyCam says the camera doesn't support audio. Any solution already? I'm also getting sound in VLC.

EDIT: Never mind, it seems the custom vendors xml was not imported successfully, after force stopping the app i saw that it had the XiaomiHacks vendor, i was using the normal Xiaomi one before. Now it has audio option

Antimus commented 6 years ago

@dengrgry I'm using tinycam free, also tried pro, only see Xiaomi as an option for the vendor which has dafang under it. I have the same issue as you did, no audio through the RTSP stream. force stop doesn't change anything, still only Xiaomi

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.