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: repair m4a header that displays not available track time? (Read 2928 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

repair m4a header that displays not available track time?

Is there anyway to fix a m4a that the track time shows 0?
Some apps play the song others don't.

From what I read the header needs to be fixed?

Re: repair m4a header that displays not available track time?

Reply #1
There are a couple of tools for fixing MP3 but I don't know of any for M4A. 

But... M4A (=MP4 = AAC) is pretty-much immune to accumulated damage from multiple generations of re-compression so you could convert it to WAV and then re-compress to a new M4A.

If you're on Windows you can use TAudioConverter or Kabuu Audio Converter (and hopefully they will open the file).   You might not actually have to make the intermediate WAV file.  I don't know if these things will decompress-recompress or just make a straight copy if you "convert" to the same format.   There's also a chance that you'll loose (or alter) any metadata if you convert to WAV so you may have to re-enter it.

If you don't know the current bitrate you can use MediaInfoOnline.

Re: repair m4a header that displays not available track time?

Reply #2
M4A is just another name for MP4, so I would try remuxing it with any tool that can mux MP4.

The go-to solution is ffmpeg, and the command to run would look something like this:

ffmpeg -i bad-file.m4a -c copy fixed-file.m4a

But I'll admit I'm not very familiar with ffmpeg, so I can't guarantee this is the correct command. (And running it requires understanding how to run CLI programs at least a little bit.)

Re: repair m4a header that displays not available track time?

Reply #3
But... M4A (=MP4 = AAC) is pretty-much immune to accumulated damage from multiple generations of re-compression so you could convert it to WAV and then re-compress to a new M4A.

Uh... no?!

Unless there's something I'm not aware of, AAC, being a lossy format, does also suffer from generational loss. It might not be as bad as with MP3, but it still happens.

Re: repair m4a header that displays not available track time?

Reply #4
Unless there's something I'm not aware of, AAC, being a lossy format, does also suffer from generational loss.
Some time ago, a member did a test where he encoded some audio to various lossy formats, then decoded the lossy files and encoded to the same lossy format 100 times in a row. The AAC version fared very well, whereas MP3 and other lossy formats were completely destroyed. His assertion was therefore that transcoding AAC one time was better than transcoding MP3 or Vorbis one time, but since the results of 100 transcodes cannot be directly compared to the results of one transcode, the experiment was dismissed as inconclusive and largely forgotten. I suspect that's what DVDdoug is referencing, though.

Re: repair m4a header that displays not available track time?

Reply #5
You could try using ffmpeg to strip it to an aac file and repackage it as an m4a file:
ffmpeg -i in.m4a -acodec copy out.aac
ffmpeg -i in.aac -acodec copy -bsf:a aac_adtstoasc out.m4a

EDIT: You will lose any tagging info that was in the original file so you will need to redo that.

Re: repair m4a header that displays not available track time?

Reply #6
Quote
I suspect that's what DVDdoug is referencing, though.
Right...

Nine different audio encoders 100-pass recompression test
Quote
AAC is the clear winner by far. It is virtually unaffected by the number of passes. All other codecs had degraded sound quality increasing with the number of encoding passes, especially at low bitrates.

I've read that that was an AAC design goal and if you think about it, information is thrown-away during lossy compression but there is no reason that more "real information" has to be thrown-away if it's re-compressed again to the same bitrate.

 

Re: repair m4a header that displays not available track time?

Reply #7
If FFmpeg works without de-compressing & re-compressing, that's great!!!     But it's not the end of the world if you have to re-compress.

Quote
I suspect that's what DVDdoug is referencing, though.
Right...

Nine different audio encoders 100-pass recompression test
Quote
AAC is the clear winner by far. It is virtually unaffected by the number of passes. All other codecs had degraded sound quality increasing with the number of encoding passes, especially at low bitrates.

I've read that that was an AAC design goal and if you think about it, information is thrown-away during lossy compression but there is no reason that more "real information" has to be thrown-away if it's re-compressed again to the same bitrate.