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

gk7205v300 + imx 355 - 2.4.06.03 - sound issue with Opus (2.4.09.09-lite) #197

Open
flyzet-prog opened this issue Sep 10, 2024 · 13 comments

Comments

@flyzet-prog
Copy link

Hi dear Devs. Finally issue with autocorrection of contrast was resolved and another image adjustments, but now it has issue with Opus audio codec on Audio sampling rate 48000, only works correctly 8000 and 16000 which is low for my purposes, this main reason btw why i chose OpenIPC software to chose very high quality audio codec. On 2.4.06.03-lite version of firmware it's works correctly on 48000 no problem, but on this latest build it wan't. I'll be very appreciated if you can make some correction in audio codec Opus to make working correctly. Thank you and hope you fix it very soon.

@skilurius
Copy link
Collaborator

Can you please provide some output log from majestic?

@flyzet-prog
Copy link
Author

Can you please provide some output log from majestic?

Of course, i didn't see in log issues. But sound is distorted.
I can send link with sound if you wish.

"majestic[809]: Majestic Lite for HiSilicon, version master+78fb2a3, built on 2024-09-09
majestic[809]: Main audio codec is opus (other options: aac, pcm, alaw, ulaw)
majestic[809]: Detected Watchdog
majestic[809]: Watchdog timeout set to 30 seconds
majestic[809]: Set server path: /var/www
majestic[809]: HTTP server started on :::80
majestic[809]: Main audio codec is opus (other options: aac, pcm, alaw, ulaw)
majestic[809]: Loading main configuration: /etc/majestic.yaml
majestic[809]: Using /etc/sensors/imx335_i2c_4M.ini sensor configuration file
majestic[809]: App was built with MPP version: Gk7205V200_MPP_V1.0.1.0.B020 Release
majestic[809]: Current MPP version: VERSION=MPP_V1.0.1.0 B020 Release
majestic[809]: sensor stSnsImx335Obj
majestic[809]: input_mode MIPI, WDR NONE
majestic[809]: dev [2592x1520]@200x20 30fps, RGGB
majestic[809]: trying to load /usr/lib/sensors/libsns_imx335.so
majestic[809]: Free MMZ mem before allocation: 97716KB
majestic[809]: VB configuration:
majestic[809]: [0]: 5909760 x 7
majestic[809]: [1]: 4924800 x 1
majestic[809]: [2]: 576000 x 1
majestic[809]: Free MMZ mem after allocation: 51928KB
majestic[809]: Sensor driver loaded
majestic[809]: SDK is in 'VI_OFFLINE_VPSS_ONLINE' mode
majestic[809]: linear mode
majestic[809]: binit false IMX335 i2c init
majestic[809]: -------Sony IMX335_init_5M_2592x1944_12bit_linear30 Initial OK!-------
majestic[809]: Exposure: 48ms, aGain: 32381, dGain: 128914, ispGain: 2048
majestic[809]: Loading IQ profile /etc/sensors/iq/imx335.ini
majestic[809]: h264 2592x1520@20fps 2048kbit 20gop
majestic[809]: venc_chn: 0, vpss_grp: 0, vpss_chn: 0
majestic[809]: minQp: 28, maxQp: 42
majestic[809]: venc took 15188KB of MMZ [2885]
majestic[809]: h264 800x480@30fps 2048kbit 30gop
majestic[809]: venc_chn: 1, vpss_grp: 0, vpss_chn: 1
majestic[809]: minQp: 28, maxQp: 42
majestic[809]: venc took 1548KB of MMZ [281]
majestic[809]: MJPEG 2592x1520@5fps 50q
majestic[809]: venc_chn: 2, vpss_grp: 0, vpss_chn: 2
majestic[809]: mpeg_enc took 3856KB of MMZ [3847]
majestic[809]: OSD initialized
majestic[809]: OSD took 176KB of MMZ
majestic[809]: Audio took 68KB of MMZ
majestic[809]: HiSilicon SDK started
majestic[809]: Free MMZ mem finally: 25340KB
majestic[809]: RTSP server started on port 554
majestic[809]: set_gpio(11, 0)
majestic[809]: set_gpio(10, 1)
majestic[809]: set_gpio(52, 0)
majestic[809]: Starting monitor for software sensor
majestic[809]: set_gpio(11, 0)
majestic[809]: set_gpio(10, 0)
majestic[809]: TCP RTSP SETUP done, stream_id=0 from 192.168.8.163:48790
majestic[809]: TCP RTSP SETUP done, stream_id=0 from 192.168.8.163:48790"

@skilurius
Copy link
Collaborator

Yes, please provide some audio test samples, I currently cannot test/debug audio on a matching device.

@flyzet-prog
Copy link
Author

flyzet-prog commented Sep 10, 2024

2024-09-10.20.00.15.mov

it's like little video file audio sample, hope that should be enough to understand

@flyzet-prog
Copy link
Author

flyzet-prog commented Sep 10, 2024

Or just can share audio memo m4a format here audio sample

@flyrouter
Copy link
Member

Good day
Thank you for your feedback.
Please write what tools you use to view and listen to the file. Is it possible for you to try to check this in different programs, for example gstreamer, ffmpeg, mpv and possibly others.
Also please write to us what protocol you use to receive the stream - RTMP, RTSP or something else?

@flyzet-prog
Copy link
Author

Good day Thank you for your feedback. Please write what tools you use to view and listen to the file. Is it possible for you to try to check this in different programs, for example gstreamer, ffmpeg, mpv and possibly others. Also please write to us what protocol you use to receive the stream - RTMP, RTSP or something else?

Thank you for you reply Igor. I will do more research tomorrow regarding your suggestions. And let you know mine results here

@flyzet-prog
Copy link
Author

Good day Thank you for your feedback. Please write what tools you use to view and listen to the file. Is it possible for you to try to check this in different programs, for example gstreamer, ffmpeg, mpv and possibly others. Also please write to us what protocol you use to receive the stream - RTMP, RTSP or something else?

Hi again. So, i found out that Commit: 525c6aa from Jul 28 was last working build that no sound issue at 48000 Opus audio codec. I use RTSP protocol on Home Assistant (Frigate card) , also interesting thing is that it's only bad sound at Video1 of Majestic settings video sub chanel. If i use app IP camera lite on macbook to check this sub chanel, no issue with sound. I have another the same camera with older build it is working properly, so definitely some bugs with audio codec. Hope it should help you to find out whats the problem is. Thank you

@flyrouter
Copy link
Member

flyrouter commented Sep 11, 2024

So, summary:

  • the problem is only on video1 (video0 always works well)
  • the testing system is HomeAssistent/Frigate
  • the latest working version is 525c6aa from July 28
  • there is no such problem in other players

@flyzet-prog
Copy link
Author

HomeAssistent/Frigate
the

Yes, correct.

@MikeVRT
Copy link

MikeVRT commented Sep 13, 2024

  • the testing system is HomeAssistent/Frigate

By the way, Frigate is capturing OPUS 48000 from stream0 via rtsp with wrong(unknown) codec specs. You can see it in the 'inside' storage; the audio stream of the video looks like this:
Audio: 0x704f 48000Hz mono 14kbps [A: SoundHandler (opus, 48000 Hz, mono, 14 kb/s)]

As a result, all other manipulations within Frigate cause the videos to have no audio stream at all. At the same time, AAC works well; just switch the format on the camera.
p.s. a profile with audio copy has been used in Frigate.

@flyzet-prog
Copy link
Author

  • the testing system is HomeAssistent/Frigate

By the way, Frigate is capturing OPUS 48000 from stream0 via rtsp with wrong(unknown) codec specs. You can see it in the 'inside' storage; the audio stream of the video looks like this:

Audio: 0x704f 48000Hz mono 14kbps [A: SoundHandler (opus, 48000 Hz, mono, 14 kb/s)]

As a result, all other manipulations within Frigate cause the videos to have no audio stream at all. At the same time, AAC works well; just switch the format on the camera.

p.s. a profile with audio copy has been used in Frigate.

I am talking about about Generic Camera Home assistant that used by Frigate card, not frigate itself
image
image

@MikeVRT
Copy link

MikeVRT commented Sep 13, 2024

flyzet-prog I've just agreed with

so definitely some bugs with audio codec.

on GK7205v300 :)
By the way, OPUS settings 16000, 32000 don't matter - it actually output only 8000/48000 in the real stream, record, etc.
p.s. 2.4.09.11, at older 2.4.07.x, 2.4.07.14 for example, only 8000&48000 were available as options.

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

4 participants