Lossless Compression (flac, alac, m4a lossless) for audio export

  • 3
  • Idea
  • Updated 2 months ago
There should be a lossless audio compression option for exporting audio only.  When exporting audio, I am almost always doing so in order to do additional post-processing that is not possible in Camtasia (that's another feature idea).  Rather than wasting more hard drive space with a WAV file, or having a lossy m4a, it would be nice to have a lossless compression audio export.  The purpose of that file is only as a temporary means to get the audio from Camtasia to another program, so keeping the file size small but with no loss in quality would be ideal.  FLAC would be my preferred option, but a lossless m4a would work too, but might get confusing with what appears to be a lossy compression used with the current m4a option.  I did a null test and the WAV and m4a did not perfectly cancel.  Not even close.  So I assume it is lossy compression.  
Photo of stefanicn

stefanicn

  • 1 Post
  • 0 Reply Likes

Posted 2 months ago

  • 3
Photo of Ed Covney

Ed Covney

  • 1042 Posts
  • 523 Reply Likes
You've used "lossless" and "compression" in the same sentence. One of us is misunderstanding one or both terms.
Photo of Paul Middlin

Paul Middlin, Employee

  • 1306 Posts
  • 333 Reply Likes
No, sstefanicn is correct- there are compression techniques that are lossless and FLAC is a good example. Zip is another (not audio-specific) example. It cannot compress nearly so well as a lossy technique, but this is a good example where it would be helpful.
Thanks for the suggestion.
Photo of Ed Covney

Ed Covney

  • 1042 Posts
  • 523 Reply Likes
A "compression technique" by definition is not lossless. Maybe close but no cigar.
Photo of Paul Middlin

Paul Middlin, Employee

  • 1306 Posts
  • 333 Reply Likes
No Ed, as the cute example in paulwilliamengle notes, you can compress with 0 loss in data, though it depends on the content. I assure you that if you zip up a file, no data is lost at all, but it will usually be much smaller (though not always!).

It just can't usually compressed as much as when using a technique that does lose data (such as .h264, mp3)
Photo of Dave O'Rourke

Dave O'Rourke, Senior Software Engineer

  • 1460 Posts
  • 435 Reply Likes
Camtasia exports to WAV using 44.1 kHz, 16-bit, Stereo, which is an uncompressed (lossless) format.  You can export to WAV, import that file, and export again to WAV and get the same exact file.  BUT... there is a setting you have to change.  Starting with Camtasia 2019, by default, Camtasia will normalize the loudness of all audio clips added to a project.

I did the following tests using Camtasia 2020:
Setup:  Put some audio on the timeline at time 0, export to WAV, call it foo.wav.  This is the file we'll use for lossless testing.
Test1:  Import foo.wav to a blank project at time 0, export to WAV, call it bar.wav, compare to foo.wav => Result: files do NOT match.
Test2:  Turn off auto-normalize loudness, then File > New Project (must start a new project after changing that setting).  Import foo.wav to a blank project at time 0, export to WAV, call it baz.wav, compare to foo.wav => Result: files are binary identical.

Test1 shows the auto-normalize loudness setting at work.  Even though I only had 1 file on the timeline, the loudness was adjusted slightly, so the exported file was different from the imported file.  Test2 proves that the WAV export is lossless because the exported file was binary identical to the imported file.

I'm not saying there isn't value in your idea of a lossless *compressed* format like FLAC.  Because it's compressed, FLAC will be smaller than WAV.  So there's a file size savings.  But the same quality can be achieved with either.

Hope this helps.
(Edited)
Photo of Ed Covney

Ed Covney

  • 1042 Posts
  • 523 Reply Likes
Paul - #1 - Signal generators, generate recorders record, what's an interface?

Re-watch your excellent video. 44.1 KHz & 192 KHz refers to containers, i.e the 22.05 (mono) KHz audio is sampled at those rates.  2 stereo channels @ 22.05 KHz fit into the the 44.1 KHz
container, but just. That's why Alex recommends 48 KHz or 192 KHz if you want to do a lot of post processing. 

So if my if my Marantz stereo receiver claims to pass 20Hz - 22 KHz +/- 3 db, they just didn't guess that bandwidth, they took sample stereos equipment to a tertiary lab where they had their equipment tested. Tertiary labs get their equipment calibrated at secondary labs, secondary labs calibrate their equipment at primary labs. BTW Boulder is both a primary lab for some standards and a secondary lab for the remainder. 

I worked at a tertiary (Navy) lab from 11/68 - 05/72 and took my first tour of the Boulder lab in 68. In my lab, I tested my Marantz 2320 (pre-amp and amp, not speakers).
Photo of rg

rg

  • 322 Posts
  • 251 Reply Likes
For humans the highest possible frequency detected without discomfort is 20kHz.  And that declines after our 18th birthday.  Most speakers on phones, computers, TVs, etc do not go even that high -- and the manufacturers know that anything higher isn't noticeable to most consumers, so they make consumer items with a lower frequency response.  In theory, 48kHz should sound better; in reality, it is not much different from 44.1kHz.  For most of the video production work being done (at least in the broadcast world) there is relatively little degradation during the sweetening process in post production.  Movies can be somewhat different (your mileage may vary) because they're typically juggling more channels and more layers than the typical video producer.
So ... not much value added with 48 vs 44 in most video productions.  Unless you're applying a crazy number of different filters, or perhaps mixing an orchestra, etc.
Photo of paulwilliamengle

paulwilliamengle

  • 419 Posts
  • 154 Reply Likes

 Hi Ed,

By audio interface/recorder, I was referring to the analog/digital converters that capture the electrical impulses from the microphone and convert it to digital information.  Sorry for the lack of clarity on my part! 

I did rewatch the video, and I heard no reference to a “container,” but in the video, Knickerbocker defines sample rate as: “How many times audio levels or frequencies are captured in each second to be recorded or played back.”

He also refers to the Nyquist theorem, in which the sample rate should be twixce the highest frequency you want to record. This is why he identifies 44.1 kilohertz as the “lowest *useful* sample rate” an acceptable benchmark for so many, because it’s twice the 20 kilohertz limit of human hearing.  

He concedes that the naked human ear is unlikely to discern a 48khz recording from a 96khz one, but he advises the usefulness lies in “better processing and more flexibility when designing sounds” – which may have very little usefulness for those who are just recording voiceover audio.


To Ed and Rg,

Here’s an explainer video from a boom operator working in the film industry breaking down how the audio world arrived at 44.1khz:
https://www.youtube.com/watch?v=iW-iq_G5sV0

He also clarifies that 48HKZ is a standard deliverable due to its compatibility with video frame rates.
Photo of Ed Covney

Ed Covney

  • 1042 Posts
  • 523 Reply Likes
Paul,   re:  https://www.quora.com/Is-there-truly-such-a-thing-as-lossless-compression

 You referenced this, but did you read it? Search the page for ". . lossless compression does not exist . ."
Now if your definition of lossless actually means less-loss, we agree. If on the other hand you mean "without loss compression", you have contradictory terms and an impossibility in signal processing.
Which is exactly how this thread started; long, long ago. 

(Edited)
Photo of Ed Covney

Ed Covney

  • 1042 Posts
  • 523 Reply Likes
Paul - I couldn't find a good demo on-line so I made one:
      https://www.screencast.com/t/lChsjelhK

I wasn't very careful to get Cool Edit Pro's bottom right corner info, here's a pic:
Notice the bottom line - Cool Edit Pro Opened the MP3(192) and noticed the 44100, 16 bit  
inner container (as Camtasia does in my video).



I used Lame to encode it, but without using the proper switches, neither CEP or Camtasia would notice the inner container.
The special effects work much better with 192K or high rates, and the grand kids love me messing with their home videos. 

Have a good day.