Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Fading out end of m4a/mp4 audio while keeping bitrate (Read 8258 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Fading out end of m4a/mp4 audio while keeping bitrate

I have a track I got from iTunes (song.m4a). I want to cut a piece off the end and then fadeout the last 5 seconds of it.

I want to keep the original bitrate and prevent reencoding (a copy) of the non faded part.

The result can be either m4a or mp4. I am on Windows 7.

How can this be done ?

I tried ffmpeg with afade filter but the whole track got reencoded to a lower bitrate.

Fading out end of m4a/mp4 audio while keeping bitrate

Reply #1
mp3DirectCut (FREE) can do limited editing on MP3 and AAC (MP4) files without decoding/re-encoding.


Fading out end of m4a/mp4 audio while keeping bitrate

Reply #3
Can two AAC files be concatenated without a gap?

If so then maybe you can cut the part you want to fade, decode it, apply the fade, reencode and then tack it back on to the end.

Fading out end of m4a/mp4 audio while keeping bitrate

Reply #4
Can you concatenate two files gaplessly?  If so then maybe you can cut the part you want to fade, decode it, apply the fade, reencode and then tack it back on to the end.

Thx Greynol. Can you tell how ?

Fading out end of m4a/mp4 audio while keeping bitrate

Reply #5
I already did; I just don't know if it will work.

DVDdoug should be able to tell you how to cut and join with mp3directcut if you can't figure it out.

Fading out end of m4a/mp4 audio while keeping bitrate

Reply #6
I already did; I just don't know if it will work.

DVDdoug should be able to tell you how to cut and join with mp3directcut if you can't figure it out.


Since I don't know how to implement those steps to test, this does not help me

mp3directcut has the 'gain' option disabled with aac so cannot be used to fade out m4a/mp4/aac as far as I can tell.

Fading out end of m4a/mp4 audio while keeping bitrate

Reply #7
Note: according to https://en.wikipedia.org/wiki/Mp3DirectCut , it requires raw aac (not in mp4). Have not tried to fade AACs myself though. (Edit: you know how to extract the stream losslessly using ffmpeg?)
How about http://aacgain.altosdesign.com/ ? Supposedly it needs an mp4 container, just to confuse.

I have not tried https://en.wikipedia.org/wiki/Mp3TrueEdit either, but no sign of aac.

Fading out end of m4a/mp4 audio while keeping bitrate

Reply #8
mp3directcut cannot fade out aac
aacgain.altosdesign.com does replay gain not fading

but - seems like mp3trueedit can do it !!

Fading out end of m4a/mp4 audio while keeping bitrate

Reply #9
It might not be so bad if you have to re-encode    it's my understanding that AAC was designed so that decompressing and re-compressing does very little "damage".  I assume that also applies to MP4 & M4A.  And of course, you'd have to use the same or higher bitrate when you re-compress.

(I've only used mp3DirectCut with MP3s, and only a couple of times since I'm usually editing with WAV files.)

Fading out end of m4a/mp4 audio while keeping bitrate

Reply #10
I had the same problem with M4A files downloaded by get_iplayer. For a while I used the DVDSoft Audio Editor freeware, but I'm pretty sure that it decodes/re-encodes. And it was also slow and fiddly to use.

As the majority of my downloads from the BBC are spoken word, I decided to bite the bullet and convert them to MP3. Not ideal, but much easier to manage with MP3DirectCut.

Does the final file absolutely have to be M4A or MP4? I'm thinking that the simplest solution would be to convert to WAV, do your editing, then save in a lossless format like FLAC or ALAC.

Fading out end of m4a/mp4 audio while keeping bitrate

Reply #11
I do edits like this all the time.  I use Reaper and render to FLAC.  I often change the name somewhat so I have a clue that the file was originally lossy. 
If more editing is needed, I'll sometimes use Audacity or OcenAudio too... from within Reaper.
Be a false negative of yourself!

 

Re: Fading out end of m4a/mp4 audio while keeping bitrate

Reply #12
I wrote a couple of Windows scripts to apply fade in and fade out to AAC files using ffmpeg.

The instructions are here.

I still use them four years later when editing certain AAC files (via mp3directcut).