0
I use Linux (Kubuntu 16.04), and I have some .MP4 files with audio tracks, which I want to extract, save as .AAC/.M4A files and tag.
Now, I've been doing the extraction using
MP4Box -raw $track_index my_file.mp4
where the track index can be 0, 1, 2 etc. This works, since I can play the result in various media players... but - does it, really?
Someone who looked at my files told me:
the "ftyp" field is missing from the head of the file, which would identify it as an MPEG 4 container. There are also no "mdat" fields, which would indicate individual chunks of data inside an MPEG 4 container.
and this makes it difficult for certain apps to work with my extracted files. Specifically, tagging apps... which refuse to write tags for it.
What can I do to get properly-structures, taggable M4A/AAC files? (I'm looking for a command-line solution naturally.)
+1, but would you happen to know how I could wrap the transport stream file in a "normal" audio-stream-only MP4? – einpoklum – 2016-12-09T17:05:45.723
I don't think transport streams work that way. But -single automatically creates the file type you want. It's not a re-encode. From what I gather, what you're suggesting would take a single-step process and turn it into a multi-step one. I would change the extension so that it is clear to other software that it is specifically an audio file. – Mockman – 2016-12-09T17:19:11.900
I meant, assuming you've extracted the transport strea file and no longer have the original MP4... – einpoklum – 2016-12-09T17:52:55.307
Ahh… let me think about that for a bit. But when I was looking at mp4box, I thought I saw an option to create a new container file. So it would probably be something along the lines of create new container with this audio stream. – Mockman – 2016-12-09T18:14:46.990
Try this, you could probably use either 'm4a' or 'mp4' as the outputfile extension…
mp4box -add _inputfile_ _outputfile_
– Mockman – 2016-12-09T18:27:58.260