[FR] MFiT/lossy codec analysis from montage - track by track

I think this will be an increasingly useful feature request.

The only way to truly test for clipping/overs through the iTunes+ codec is to test each rendered master WAV file one at a time with an offline encoder as they will eventually processed by the distributor. You can’t just test an entire montage in one pass or running live with random start points. The encoder needs to start and stop with each new album track to simulate how the files will be delivered and encoded. Each song/track is it’s own file so the encoder also starts and stops for each new file.

In some cases, it could mean the difference in getting a true clip or not which is why I find it important.

This is the same reason you can’t run tools like Sonnox ProCodec or the built in Encoder Checker live and get accurate results about clipping and overs. Running those tools live can simulate very precisely the sound of the encoder, but depending on the bitstream start point of the audio vs. the encoder, clipping and over results will vary on each live playback. It’s easy to see for yourself in Sonnox ProCodec. There is more info on this in the manual for Sonnox ProCodec.

This is why the only true way right now to test for clipping/overs on encoded files is to render each album track as a WAV, and then do offline testing in ProCodec, testing each file one at a time as they will be encoded for real by iTunes Store and other retailers.

My request is a “montage analysis” tool that does this:

Insert something like Sonnox ProCodec, or the Encoder Checker in the post-processing slot. Select “analysis” right in the montage somewhere. Wavelab will then analyze each album track one at a time and the analysis would be done after the chosen encoder, starting and stopping the encoder for each album track to simulate what happens when each song is encoded to AAC one at a time with the bitstream of the encoder and song/file/track perfectly in sync.

The analysis would be done after the iTunes+ codec and offer a report of all the places on the montage timeline where there are overs in the encoded file so a person can quickly and easily find those places in the montage, and fix the problem however they see fit. Once a montage passes the encoder analysis test with no overs, then you can render the master 24-bit WAV files to submit for digital distribution.

Wavelab would have to very precisely analyze each album track based on the marker placement so the analysis matches 100% what each rendered WAV file will eventually be. If it’s not exact, the encoder analysis readings could be inaccurate making the entire thing useless.

I hope I’m explaining it right, but I’m trying to avoid doing all of this:

Dial in a montage for MFiT masters (or basic 320kbps mp3, or any other lossy format).
Render 24-bit/native sample rate WAV files
Load rendered WAV files into Sonnox ProCodec standalone app
Test each song one at a time for overs when converting to iTunes+ or lossy encoded format
go back to Wavelab and fine tune certain songs or overall master level in montage to avoid overs
(repeat)

It would be nice to see what the peak values each of track/song from a montage will be right inside Wavelab for any given codec so changes can be made without a lot of trial and error. Again, you can’t trust the live playback overs due to the codec bitstream not being in sync.

Analysis has to start and end with each defined CD/album track so it has to be an offline analysis of the montage, through an encoder placed in the post-prossing (or even global master section), and then a report detailing all the overs and their exact time would be great so they can be fixed quickly and easily.

Lastly, the analysis tool would have to consider that a true iTunes+ file will have SRC done by Apple’s process (whatever it is) but note that with Sonnox ProCodec, no matter what the sample rate of the master WAV file is, the AAC is always 44.1k. This is something that the Sonnox ProCodec can do but I don’t know if the Wavelab Encoder Checker factors in the Apple SRC when the iTunes+ codec is selected.

Have you tested this? I analyze an entire album render file using all the Apple MFiT Tools (MFit droplet afconvert, Terminal afclip) and would be surprised if the grand totals (Clips and ISP) are any different done track by track. But I’ll test it.

I have only tested in that when I’m running the Sonnox ProCodec live in Wavelab or any DAW, the overs light up at different times on each playback, it’s not predictable really. It is noted in the ProCodec manual that this is normal behavior because of the bitstream not being in sync.

The only way I can get reproducible overs reports, is to have each song rendered as it’s own WAV file as they will be submitted for digital distribution, and then test them in the standalone ProCodec app because it does each file one at time. I haven’t spent much time with the MFiT droplet, but the Sonnox ProCodec will let you know if a given WAV file passes encoding without clipping, or if it has to lower the level of the source WAV to produce an iTunes+ AAC (or any chosen codec) that doesn’t exceed 0dBFS.

I guess to summarize, testing an entire album in one pass through the encoder doesn’t make the encoder start it’s bitstream fresh for each track, making it different than encoding one track at a time which is what really happens when the master WAVs are submitted.

Jperkinski, I think all your suggestions are great, and my question was really irrelevant because I don’t really care if files are analyzed individually or as a group. Individual also makes sense if you want to see how much a particular track needs to change, as you said.

I forgot I have the Codec Toolbox (because I never use it), so I just tried what you’re talking about. The Clip Safe trial and error analysis and encode is great. I assume there’s a way to have it reduce all selected files by the same amount (because I don’t want them reduced differently individually). It’s an album, and I want the same relative levels, so want them all reduced the same amount, based on the worst case track reading. That’s how I do it with manual trial and error in Afclip.

AFAIK, Sonnox is the only program so far to utilize the Apple codec and Apple SRC to emulate official MFiT. And it does make a difference. The entire MFiT process is all written out and built into the Mac OS, already programmed by Apple. The Apple MFiT droplet is just an AppleScript that runs a fixed routine with the afconvert command, using the built-in Apple Codec and Apple SRC to take the MFiT master WAV file and convert it to an MFiT AAC, using the Apple SRC if necessary. Then running afclip (also built into the OS) in Terminal analyses for Clips and ISP, gives you a printout of all Clips/ISP and their totals, and creates a clip.wav file in your Home folder that has the original Left channel in the Left channel, and the Clips and ISP in the Right channel. The only thing missing compared to the Sonnox is the Clip Safe level trials to determine the right final levels, but other than that the entire fixed MFiT process can be run in Terminal with basically just 2 commands: Afconvert (with fixed parameters from the AppleScript) and Afclip.

The Afconvert script is how Apple makes their files, and Afclip is how they analyze the files they receive after conversion. Sonnox must use all of this under the hood on the Mac to get the same results, because basically it’s all there already on the Mac, and entirely written out. I don’t see why Wavelab can’t just run these existing routines in the same way, using the correct Apple Codec, SRC, and analysis, because it’s already there in the OS, and done. I personally wouldn’t mind if even streaming was not included, but that seems to be the way it’s gone with the encoder checker. (I’m fine with just the analysis, and manually loading AAC and WAV files to play). Audition is fine, but unfortunately the analysis is equally important to me.

I’d also like to see the Apple Codec and Apple SRC used in the same way on Windows. Somebody can say it’s not the official codec or whatever, but the clip/isp results using the Windows Apple Codec and SRC are infinitely closer than using the Fraunhofer AAC and whatever available SRC on Windows Sonnox has used. It just doesn’t make sense to say “we were told it’s not the official codec so we’ll just use something that has no technical similarity, with very different Clip/ISP results”, when they could be using something that’s extremely close (the Apple Codec and Apple SRC on Windows). Somebody’s going to do it eventually, because there are a good number of Windows-only mastering apps, but it would be nice if Wavelab did it first.

For analysis on windows, the Wavelab Global Analysis is already there, but in order to emulate Apple, it would need to analyze finer than 1 second (Afclip counts ALL Clips/ISP, no minimum time between count), and Global Analysis would also need to count only ISPs over 0dbfs (right now it includes ISP <0db in totals).

Sorry to rant and rave in your thread. You said it all as far as what should be added. I was just going on about the limited support for MFiT specifically, which you also mentioned.


Yes, the clip safe mode in Sonnox is great and something that should be considered for Wavelab in some way.

I never use the direct results of the clip safe mode, but I do use that mode as a test so I can then go back and reduce the overall level of my master in Wavelab so it doesn’t clip through the desired codec.

I do believe in the method of checking each song one at time as that’s how they will be ultimately encoded.

Also, I’ve mentioned it before, but it’d be great if Wavelab added the exact AAC iTunes+ codec including the SRC that Apple does. I know there may be better SRC options but it would be nice to simulate perfectly what will happen to a 96k WAV submitting as an MFiT master right from a Wavelab montage.

As noted before…in Sonnox ProCodec, any WAV files higher than 44.1k are treated with a unique SRC that is part of Apple’s encoding process so it would be great to simulate that for clients that are very particular and want to hear what that sounds like on their material. I may have to be on only the OS X version of Wavelab.

The initial point of my thread was to see if Wavelab could run an offline analyzation without rendering permanent files that would check the montage one track at a time to simulate how files will be encoded, and provide a list of where overs (if any) occur on encoded files.

Somewhat similar to Sonnox ProCodec clip safe but right from the montage to save a few steps.

I do almost all MfiT these days, and have had no problems using WL’s “true peak” meter behind PSP Xenon to reveal clipping prior to afconvert. For over a year I would check the files individually, as well as using afclip post-conversion. After awhile I just trusted afclip, because the results were identical. I’d trust Sonnox to reveal sonic changes, as you say, to hear artifacts and problem areas. But I’ve not had a problem with WL’s metering, nor afclip. No rejections in over a hundred MfiT deliveries (banging on wood over here!).

Of course I set my limiter fairly conservatively, and manage gain stages end to end, so maybe I just don’t generate a lot of intersample peaks or post-conversion clipping. :wink:

I finally got a chance to test this using the Apple MfiT tools, and you’re right. I was wrong. The album vs individual track totals are slightly different. Not enough for me to change my method, but they are different. I would still like to see the grand total of clip/isp of all the individual tracks, in addition to the individual numbers, however this all works out.

Ah, I’m glad that you’re able to see what I mean now. For some it could be a small difference, but if you want to be sure that each rendered WAV from a montage of a CD/album track doesn’t clip the MFiT encoder (or any encoder), you have to test each CD track one at a time from the montage.

The codec has a bitstream which has definitive start point. So, you’ll find different peak values if the encoder starts over for each CD/album track, which is how albums are submitted for digital distribution, one song at at time.

My original idea for this was pretty simple. Insert a plugin in the global master section like Sonnox ProCodec or the included Encoder Checker, set the encoder to the settings you want to test, and have WaveLab do a temporary offline render and provide a PDF report of all the times the encoder causes the peak level to hit or exceed 0dB. This way yo can easily go back to the montage and address those areas.

The important detail is that the report and temporary render is for one CD track at a time and not one continuous pass. This should accurately simulate how you deliver the master WAV files for digital distribution whether it’s standard digital distribution or MFiT.

It would be very nice to handle this all from the montage rather than rendering and managing your own temp files, and testing one by one as an audio file.

I hope there could be a way to offline analyze a montage, one CD track at a time and have WaveLab create and manage the temp WAV file as all I really want is the accurate report.