How do you write meta data like "loopstart" to m4a files? Others?

First, I would like to know what file types and game engines this loop meta data works on. All I know is MV and m4a, ogg. Pretty sure mp3s doesn't loop and wavs don't support the tag? Also is this just an rpg maker thing? I found a player that supports it at least.

I can get simple meta data like the title to write but nothing I tried can write this loop data to a m4a. I tried ffmpeg, kid3 and audacity. Apparently I need a mac to do this? lol At least I can read the data fine.

I keep hearing you don't need m4a files anymore but I'm trying to make a program that can work with all rpg maker audio files, so I wanted this to work. At this point if I do need m4a for mobile I can use make any of them looped.
I'm not knowledgeable about the metadata in m4a question without Googling it.

But as for this:
I keep hearing you don't need m4a files anymore
There's no reason to rely on hearing anything from other people. It's right in the RPG Maker instructions.

If you click Help -> Contents -> Documentation -> Asset Standards you get information on all file types and formats used by the editor/engine.

For audio, MV says:
1711544001085.png


MZ doesn't say anything about including m4a for Android/iOS games because it no longer supports exporting for Android/iOS.
You can use Audacity and see this tutorial:

Edit:
Sorry I was a bit tired and didn't pay much attention.
Thought it was about saving a looping ogg file. 😀
I use Foobar2000 as my audio player.
Coincidentally it can also add metadata. I haven't tested it in various file formats. But adding it is just as easy as select properties and add metadata to it.

1711544335090.png

1711544358107.png

If there's no LOOPSTART and LOOPLENGTH, you can add it yourself.
Audacity is perfect to get the number. But you don't have to use it to export the music once you have added the metadata.
View attachment 299868

MZ doesn't say anything about including m4a for Android/iOS games because it no longer supports exporting for Android/iOS.
Yea was wondering if this had changed but not updated as nothing in MV is updated. I don't see why m4a would be required for anything this point. Also Ogg Opus works just fine but not in the editor preview. For me that is acceptable.
I use Foobar2000 as my audio player.
Coincidentally it can also add metadata. I haven't tested it in various file formats. But adding it is just as easy as select properties and add metadata to it.
If there's no LOOPSTART and LOOPLENGTH, you can add it yourself.
Audacity is perfect to get the number. But you don't have to use it to export the music once you have added the metadata.
Ahh the one thing I didn't try yet... Thanks for that.

With ffmpeg I can do all other formats and all basic meta data. I have found though ffmpeg will not write loop data to m4a or wav without a wrapper or something.
I don't see why m4a would be required for anything this point.
It's for exactly what it says above - MV users exporting to mobile formats.

You may find this useful.
It's for exactly what it says above - MV users exporting to mobile formats.
I keep finding anecdotal evidence of people saying ogg works for android at least for them. I guess I'll just have to test it. I know all browsers and os's support it now.
You may find this useful.

And yea I have no problem reading the loop data from m4a's just writing with ffmpeg. Trying to automate this! I have read it's impossible with ffmpeg so I guess that's it for that.

edit: oh and I forgot I already found out that mp3 and wav don't support looping in tags so that part is solved.
As far as I know, it's not a matter of the device not supporting it but of MV's engine being programmed to look for that file extension when detecting those operating systems.

Code:
AudioManager.audioFileExt = function() {
    if (WebAudio.canPlayOgg() && !Utils.isMobileDevice()) {
        return '.ogg';
    } else {
        return '.m4a';
    }
};

It automatically goes for the m4a when it detects it's on a mobile device.
Figured I switch out the files manually but that works even better to just comment that out.

Original thread: https://forums.rpgmakerweb.com/threads/how-do-you-write-meta-data-like-loopstart-to-m4a-files-others.167210/