Skip to content
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 stream #234

Closed
AI-Made-Simple opened this issue Apr 15, 2018 · 17 comments
Closed

No audio in stream #234

AI-Made-Simple opened this issue Apr 15, 2018 · 17 comments

Comments

@AI-Made-Simple
Copy link

Hi just installed custom fireware. Stream video working great but have no audio , when I click 'test audio' I can hear the Chinese voice say something and it's clear. Anyone know how I can go about debugging this problem or something I need to set ?

@anup-d
Copy link

anup-d commented Apr 17, 2018

Same problem here. This issue has been brought up before multiple times already. Hope somebody has a solution.

@nik0
Copy link
Collaborator

nik0 commented Apr 18, 2018

With which tool do you listen the audio ?
What are the log of the v4l2rtspserver-master process?
It is working for me on iPhone ....

@anup-d
Copy link

anup-d commented Apr 19, 2018

@nik0 Using VLC player to stream the rtsp live. Getting no audio. DId you tweak something or using a special app?

@nik0
Copy link
Collaborator

nik0 commented Apr 19, 2018

Does VLC say something about the audoi stream ? type, number of received packet (codec information/statistic)
Did you do the "trick" mention there #178 (comment) by goermezer ?
This increase the available memory
or did you try to lower the resolution of the video ?

@anup-d
Copy link

anup-d commented Apr 19, 2018

VLC is only providing this much info:
https://i.imgur.com/yuTRptl.png

No, the video resolution is 720p and I haven't changed it.

I just experimented by making a loud noise near the speaker/microphone grill of the camera and I can hear the noise on the VLC player if I press my ear against the phone. So this seems to be a volume sensitivity issue of the Dafang's microphone. Is there any way to ramp up the sensitivity so that it can pick up sound from a distance?

Just FYI, even the test option that plays an audio on the camera's speakers plays it in low volume whereas the original Dafang software was very loud. Once again, this points towards a volume issue which can possibly be fixed by tweaking some parameters somewhere.

Any help would be greatly appreciated.

@nik0
Copy link
Collaborator

nik0 commented Apr 19, 2018

VLC should provide info on the number of received packet (another tab named statistic)
any way if it is a problem of volume this will not help
can you test this binary that play the audio. I boosted the volume to the max (be careful of your ears :-))

[audioplay.zip](https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks/files/1928227/audioplay.zip

I will test augmenting the gain of the encoder later ...
Nik0

@anup-d
Copy link

anup-d commented Apr 19, 2018

Thanks. It may have improved the audio by 1% (hard to quantify) but it's still far from usable. I think the Dafang's microphone is terrible. Only when you speak something loudly by pressing your mouth against the camera, can you hear what is being said.

If there are other improvements you can bring, I would love to test it out but I was wondering if its possible to attach an external mic to the Dafang as the built-in mic was horrible even before I installed the hack.

Also, with the original software, it was possible to speak through my phone and talk to people in front of the camera using the cam's speakers. Is that possible with the hacked version?

@nik0
Copy link
Collaborator

nik0 commented Apr 19, 2018

Sorry audioplay is not involved here, my bad ...
But you can play around these tool:
/system/sdcard/bin/ossplay -g 1000 /usr/share/notify/CN/speaker.wav 1000 is the gain (around max)
There is also
/system/sdcard/bin/ossrecord -v -g 1000 /tmp/sample.wav that you can replay with ossplay

AND
you can test this server (I set the mp3 gain to the max), if it is better I will make a version with some configuration
v4l2rtspserver-master.zip

@AI-Made-Simple
Copy link
Author

AI-Made-Simple commented Apr 19, 2018

@nik0 What are the log of the v4l2rtspserver-master process?

Where is the log file stored ?

@anup-d
Copy link

anup-d commented Apr 20, 2018

With the new v4l2rtspserver-master, the sound is much more audible now but it also introduces a constant static background noise due to the high gain which is not only annoying but also drowns out a lot of the actual sound that we want to hear.

@nik0
Copy link
Collaborator

nik0 commented Apr 20, 2018

@tyronevdm copy the file on your sdcard (replace the existing) it should be in bin folder
to get the log you have to start manually the process

@anup-d I set the gain to the maximum (when encoding), I agree that it is not the ideal (I didn't succeed changing it at low level.
Next steps: I will try playing around then encoder to see there is a better encoder filter
and see if the gain can be set at lower level ...

Nik0

@anup-d
Copy link

anup-d commented Apr 20, 2018

Thanks @nik0. Appreciate the effort on your part.

@goermezer
Copy link

Since the last couple of days I have this audio issue too. But only, when rtspserver is started from services. Then also the whole system slows down. Often then VLC can not play the stream at all.

If I start rtspserver from the shell, everything is ok. Therefore I went back and added this to run.sh, which seems to be a workaround for me at the moment:

/system/sdcard/bin/v4l2rtspserver-master -W 1600 -H 900 &

@sanderdh
Copy link

I also have no (clear) audio stream, video plays fine. Even if I run v4l2rtspserver-master -W 640 -H 480 I still get this audio issue. If I hit the audio test button I can hear some chirps but nothing that could be understood. I am trying to play the stream with VLC 2.2.2 and get no audio at all in VLC 3.0.1.
I ran /system/sdcard/autoupdate.sh yesterday.

@irwando
Copy link

irwando commented May 4, 2018

Also having this issue. Video is great, no audio. Synology Surveillance Center won't even let me set up and audio alert.

@jmtatsch
Copy link
Collaborator

jmtatsch commented May 5, 2018

Maybe you can try out the additional tuning options that pull request #329 offers

This was referenced May 9, 2018
@jmtatsch
Copy link
Collaborator

jmtatsch commented Jun 5, 2018

Should be fixed in #404. Please reopen if still an issue.

@jmtatsch jmtatsch closed this as completed Jun 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants