EliasKotlyar / Xiaomi-Dafang-Hacks

4.19k stars 1k forks source link

Volume changed after specifying -E to v4l2rtspserver-master #401

Closed anemes closed 6 years ago

anemes commented 6 years ago

The default audio for v4l2rtspserver-master without any -E setting specified works in VLC and is identified as Channels: Mono Sample rate: 44100 Hz Codec: MPEG Audio layer 1/2 (mpga) Bitrate: 64 kb/s

The volume was quite, but manageable.

I switched the settings to -E PCMU:8000:8000 for tinycam to be able to receive audio, but audio is super quiet. Now, removing the above option and going back to default I no longer have audio.

nik0 commented 6 years ago

There is an option to set the volume with setconf I am "doing" the GUI part ...

anemes commented 6 years ago

I saw there was a setconf in one branch with a volume option, but the main branch setconf doesn't accept it.

Usage setconf -g -k KEY -v VALUE
Where k to set value, g to get the value
        'f' flip mode set to
                '1' -> flip on
                '0' -> flip off
        'n' night mode set to
                '1' -> night mode on
                '0' -> night mode off
        'b' set bitrate to VALUE
        'o' OSD text set to VALUE
        'c' OSD color set VALUE to
                '0' for White
                '1' for Black
                '2' for Red
                '3' for Green
                '4 for Blue
                '5' for Cyan
                '6' for Yellow
                '7' for Purple
        'x' OSD position Y pos is set to VALUE
        'p' OSD space between char is set to VALUE (can be negative)
        'w' fixed text width (0 variable, 1 fixed)
        'm' motion sensitivity (0 to 4) -1 to deactivate motion
        'z' display a circle when motion detected (-1 deactivated, use the OSD color numbers)
        'r' set detection region (shall be: x0,y0,x1,y1) the server need to be restarted to take into account the new value
        't' set tracking on/off (detection region is not taken into account anymore)
        'u' set time before launching script after no motion (to restore camera position) -1 to deactivate
Example: to set osd text: setconf -k o -v OSDTEXT
         to get osd text: setconf -g o
christallire commented 6 years ago

Yup, noticed that too. i'll just wait for it

nik0 commented 6 years ago

I create a PR with the configuration for audio

nik0 commented 6 years ago

merged, is it OK now ?

anemes commented 6 years ago

Yes! setconf from the command line works great. Setting the sound through the gui didn't work, but I only tested on Firefox. I'll put a separate issue or PR for a few of the gui bugs separately next couple of days.