Menu

Change sample rate for audio

2019-11-21
2022-12-10
  • DanillaTech

    DanillaTech - 2019-11-21

    Video message https://www.youtube.com/watch?v=R2O0piVBzbw
    Main problem: I like video message and I need it very compact and small bitrate. 240-360p is enought, but on this bitrate there is a problem with audio bitrate. Also for just video messages 32 kbps for audio is enough

     
  • Anonymous

    Anonymous - 2019-11-22

    Good luck. The audio quality is stuck in 2001 for no reason while other apps can easily do this. It's stuck at 96kb/sec. Flat.

     
  • Mark

    Mark - 2019-11-22

    The audio bitrate is set to the device, Open Camera leaves it to whatever is the default set by the device. E.g., I reproduced 256kbps audio with Open Camera on my Galaxy S10e.

    It's on my TODO to add support for custom audio bitrate. However these custom video options have their own problem of reliability on different devices - offering custom video fps and bitrate just leads to 1 star reviews because it doesn't work on some random device. Also with Google working on the new CameraX API, I would like to see what video options that supports.

     
  • DanillaTech

    DanillaTech - 2019-11-22

    Mark, there is sample rate problem https://www.youtube.com/watch?v=47r3riQuZWA
    <480 on Honor 7a pro gives me 8000hz :(

    he audio quality is stuck in 2001 for no reason while other apps can easily do this
    I do not agree with you. For video messages 200kbps for video is okay. It's good. You can not suprice nobody with ultrahd quality. But bad quality is fine and it's very fast to send message. It does not need a lot of space. For me 32kbps for audio will be enough + 22000hz/44000

    And 240p, even 144p :). I use video messages to send my emotions and voice. I do not need hd for this, it needs speed

     
  • Sonyscribe

    Sonyscribe - 2020-04-09

    Hello. I use Motorola One Zoom and I am having minor issues with OpenCamera and the audio sample rate. I need to set it to 44100 in order to have sync but there still is no option to change the audio sample rate (and bitrate). The app works now but when I make longer videos, the audio gets little out of sync. I used other third party camera app wich does have this option and it fixes my issue. Please look into it because i want to use OpenCamera. Greetings from Bulgaria, EU.

     
  • Peter Lemken

    Peter Lemken - 2020-04-28

    Please help me out here. By changing settings in /etc/media_profiles.xml (replacing the original one) I was able to change video recording codec to HEVC/H265. Audio is aac - stuck at 96kBps, even though I changed the minBitrate and maxBitrate in the xml way beyond those 96kBps.

    When I can add H265 in Open camera settings, this obviously came from the changed media_profiles.xml values. From what I can see you use that file to offer the configuration option as laid out in Open Camera's preferences.xml.

    Wouldn't it be easy to read the audio sample rate and bitrate from media_profiles.xml, take the highest value offered and offer no configuration option so that this option is only open for those who actually tinker with a rooted device and a different media_profiles.xml?

    Wouldn't that eliminate your concern about negative reviews on the PlayStore?

    My device is a OnePlus 5 and even with the internal microphones it makes quite good recordings, albeit with the restriction of a low audio bitrate (https://www.youtube.com/watch?v=7tLQ0kIG5u0).

    I also have professional external microphones that I can use with Open Cameras, an audio interface and the OP5 with a USB-OTG set up that even provides phantom power to the microphones.

    I'll buy you a beer or two.

     
  • Anonymous

    Anonymous - 2022-12-10

    I found out how to fix a bug that was causing Open Camera to record Video with only low quality 96Kbps AAC audio. Now I can record my videos with 320Kbps AAC. I'm hoping this should make a big difference especially once I connect my external Rode VideoMic.

    So I noticed that older videos I recorded on Open Camera with my old official Samsung ROM (based on Android 5.01) recorded with 256Kbps AAC audio. This was when I recorded at the max resolution for my Samsung S4 which is 1080p. However I recently wiped the OS and loaded an Unofficial Lineage ROM based on Android 10. When recording videos in the full 1080p in Open Camera they only came out with low quality 96Kbps AAC audio. I tried changing all settings in Open Camera. I could easily change the video bit rate but nothing changed the audio bit rate. Annoying as some other video camera apps like the outdated Cinema FV-5 (from 2015) seems to work fine for adjusting the audio bitrate as well as the video bitrate.

    Anyway long story short I found that the settings are in a file called media_profiles.xml (or similar) under the Root folder. For Android 5 it's under the "/etc/" folder in root folder. For Lineage based on Android 10 it's under "/vendor/etc/" folder in root folder. So you'll need root privillages to edit the file and file explorer that allowes access to the root folder with an inbuilt txt editor (I use MiXplorer).

    Open the media_profiles.xml in a txt editor. There will be a number of video profiles each under the heading of the camera it's associated with. For this example I'm editing a video profile under:
    <camcorderprofiles cameraid="0"></camcorderprofiles>

    "cameraId=0" is my main back camera and my front camera is under the heading "cameraId=1". If you have multiple camera be aware of this as each one starting from 0 then 1, 2, 3 ect will have video profiles. I'll keep it simple and show the example for the main camera but then you can repeat for other cameras if you wish.

    Under the heading: <camcorderprofiles cameraid="0"> I am looking for profiles listed as 1080p as this is the highest res my camera supports. Here is my example:</camcorderprofiles>

    <encoderprofile quality="1080p" fileformat="mp4" duration="30"></encoderprofile>

     
  • Anonymous

    Anonymous - 2022-12-10

    Sorry there was a problem with the website here and it cut off half of my post. It's probably due to the website not likeing the Android code and causing displaying problems. Anyway I've taken a screenshot of the missing othe half of my typed instructions and attached it as an image below.

     

Anonymous
Anonymous

Add attachments
Cancel