News:

--

Main Menu

AAC Dynamic Format Change

Started by TimW, August 12, 2019, 02:03:01 PM

Previous topic - Next topic

TimW

#15
Hi, thanks for responding so quickly.  Here is an example.  It starts 6ch, then switches to 2 (for the adverts) then switches back to 6 again when the adverts end.  https://drive.google.com/file/d/1cVnPBCEtaqy9inC9AMDcVUr-i2uANaXj/view?usp=sharing   (password to unzip is audiotTtesst^12).  The audio track in question is the first one, (track 0).

Carving out the adverts with an edit does kind of work, but it is a hit-and-miss operation, because broadcasters are sloppy with their switching.  The audio switch typically happens quite a few frames before the last frame of the programme, and switches back a few frames late.  Therefore you have to carve out quite a lot more than you would like to just to be sure of completely avoiding the switches. Even then you are only guessing whether you've got it right or not.

At the risk of answering my own question, an alternative workaround is to fall back on 2.7.5 (or other version before the change).  Then I recode the whole video (no cuts), mixing down to stereo AC3 from 6-ch AAC, at a higher bitrate than I want in the end.  Then I recode again making the cuts, and at the bitrate I want.  The audio will drop out for a split second if the broadcaster hasn't got it right, but it will come back again.  If you try to do the same thing in one pass with 2.7.8, you will lose the audio if you make the cuts where you want them, because you will accidentally leave a switch point in.


eumagga0x2a

Thank you for the sample, will investigate whether anything can be done about it.

Quote from: TimW on May 28, 2021, 05:47:16 PMAt the risk of answering my own question, an alternative workaround is to fall back on 2.7.5 (or other version before the change).

They have their bugs, fixed in later versions.

Quote from: TimW on May 28, 2021, 05:47:16 PMEven then you are only guessing whether you've got it right or not.

You should be able to check each deletion in the preview in Avidemux.

TimW

Many thanks.  Regarding checking with a preview whether you have cut in a good place, you can do this, but if you get it wrong, the preview audio playback will thereafter play back up only 2 of the 6 channels.  This does tell you you've cut in a bad place!  However there's no way back from there, you have to re-load the file and start again.  If you undo the delete, it doesn't bring all 6 channels back, you are still left with 2.

eumagga0x2a

Resuming normal audio output after the switch back to the initial number of channels should work* for AAC streams now, please try a future nightly (or build from source yourself).

The whole is a crude hack, of course.

*) [1] + [2] + [3]

TimW

Thanks, will give it a whirl.

TimW

Sorry for taking so long to report back.  This is now working again, i.e. it is doing what it did in v.2.7.5.  This makes it useable, so I am very grateful.  Note that as before, two passes are required to encode a video where the AAC changes from 6 to 2 to 6 channels.  The first pass must be done without cuts to recode the audio.  In the second pass, any necessary cuts can be made.  If you try to do both steps at once you 'might' be successful, but more often than not you will lose the audio through making a cut just after the number of audio channels has altered without realising it.

From my point of view this is useable again, so many thanks.