SimpleMobileTools / Simple-Voice-Recorder

An easy way of recording any discussion or sounds without ads or internet access
https://www.simplemobiletools.com
GNU General Public License v3.0
439 stars 139 forks source link

Please add lossless output option(s) #29

Open leaumar opened 3 years ago

leaumar commented 3 years ago

Aside from #13, please add an option for compressed lossless formats. Flac comes to mind as probably the best candidate. Exposing the compression level or not is up to you, but in my experience the increased compression levels waste a lot of precious cpu time for barely any gain. I googled a reference example for you.

Thanks

paulle commented 3 years ago

In the configuration menus you can choose m4a as file extension. Is this lossless but compressed?

tibbi commented 3 years ago

Im honestly not sure how it works under the hood, I just set it to save to m4a in the app. I dont know much about such audio files properties, thats why the related settings are limited to just 2 file extensions and nothing else.

leaumar commented 3 years ago

Just m4a doesn't really specify the actual codec used, it would be great if the app added that information. It's lossy encoding more often than not in my experience though, typically AAC.

notramo commented 3 years ago

AAC is Apple's proprietary codec. It is lossy, and is less supported than the also proprietary MP3.

tibbi commented 1 year ago

is this a duplicate of #13? Do you guys mean the same by lossless and uncompressed?

paulle commented 1 year ago

No as far as I know lossless and uncompessed it's not the same. For example .mp3 is compressed and not lossless. Te .flac is compressed and lossless.

Gesendet von Proton Mail für Mobilgeräte

-------- Original-Nachricht -------- Am 8. Juli 2023, 16:00, schrieb Tibor Kaputa :

is this a duplicate of #13? Do you guys mean the same by lossless and uncompressed?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

leaumar commented 1 year ago

There's no lossy uncompressed afaik, but mp3 and aac are lossy compressed, wav is lossless uncompressed, and flac is lossless compressed. Just for reference, monkey (it's called that) even offers a hybrid where you have a lossy main file and an optional second file containing the remaining data so the two together are lossless.

Compressed just means the equivalent of zipping a file, while lossy/lossless is about the audio fidelity being reduced to arbitrary quality levels to save on file size (beyond what compression achieves).

It's like jpg (lossy) with its ugly artifacts and decoloration vs png, and webp supporting both modes. Then there's bmp that's not even compressed, just the raw literal RGB bytes.

So anyway, when I opened this topic, the app supported only lossy encoding, meaning some of the audio data gets discarded. Flac and wav are the lossless standards in my experience.

tibbi commented 1 year ago

ok thanks, so marking #133 as a child of this

elishamint commented 3 weeks ago

@tibbi :

Im honestly not sure how it works under the hood, I just set it to save to m4a in the app. I dont know much about such audio files properties, thats why the related settings are limited to just 2 file extensions and nothing else.

Container format (file extension) does not equal codec used. Lossy ones: .mp4/.m4a multimedia format, can contain several streams of video, audio, subtitles, and other media/metadata; can use about any codec; mainly uses AAC (superior quality at same bitrate) or MP3. .ogg open multimedia format, supports multiple streams of video, audio, text, and metadata. Compression methods include Theora (video), Vorbis (audio), Opus (audio), FLAC (audio), and OggPCM (audio). .opus audio file using OPUS codec. It was developed mainly with streaming purposes in mind, with good quality at lower bitrates. .mp3 is MPEG-1 Audio Layer III (MP3) format but can be any of a number of MP3 encoder versions.

Lossless or Semi-Lossless: .wav is an uncompressed single-media format that supports different sample "bit dephts" (bits per sample, dynamic resolution); 32-bit floating-point with a constant Signal to Noise Ratio (SNR) which is used in digital audio processing, down to ... I guess 4-bit integer (called PCM, Pulse Code Modulation). 16 bits per sample is the standard CD format and it's a bit lossy at the SNR; 21 bits per sample is considered a SNR inaudible to humans, so the standard 24-bit is lossless in that regard. .flac is a compressed and considered lossless format (no loss of quality from the original, only integer/PCM) using an open-source Free Lossless Audio Codec (FLAC) out of a number of versions. (comparable to zipping a WAV file, resulting in about 50-60% file size reduction)

leaumar commented 3 weeks ago

.opus audio file using OPUS codec

For completeness, .opus files are typically just ogg containers with an opus audio stream, no different from combos like ogg vorbis. You can rename .opus files to .ogg, might even be better since the container is more important than the codec and we don't give the other combinations their own extension either.