libertyernie / LoopingAudioConverter

A converter frontend for loopable audio formats
174 stars 16 forks source link

[Request] Looping FLAC #71

Closed Njsmooth closed 3 months ago

Njsmooth commented 2 years ago

So, a few weeks ago, I figured out that vgmstream can apparently read loop data in FLACs (also, FLACs can have loop data). I do this by embedding "LOOP_START" and "LOOP_END" into the metadata in Audacity. Problem is that this doesn't mean all that much when LAC can't read the FLACs loop data. I was wondering if there'd be any way of possibly implementing this? I think it'd be a pretty cool addition if possible.

libertyernie commented 2 years ago

https://github.com/vgmstream/vgmstream/blob/master/src/meta/ffmpeg.c#L208

It looks like vgmstream is perfectly happy to take LOOP_START and LOOP_END metadata from any format it supports, which I guess makes sense! When encoding FLAC files, I think it makes sense for LoopingAudioConverter to include these.

Do you have an example of a FLAC file that has the appropriate tags?

Njsmooth commented 2 years ago

tags.zip Random file to avoid copyright, but here's an example

https://github.com/vgmstream/vgmstream/blob/master/src/meta/ffmpeg.c#L208 Do you have an example of a FLAC file that has the appropriate tags?

Njsmooth commented 1 year ago

Okay, so found some new insights: Looping FLACs can be more easily differentiated by renaming a flac's extension to .lflac

Also, if I recall correctly when I tested the build with lflac support, it only supported exporting flac loop point, not importing them, which is a tad annoying (could be misremembering, though). Would it at all be possible to support both reading and writing loops from lflacs?

libertyernie commented 1 year ago

Any reason to use LOOP_START and LOOP_END over LoopStart and LoopEnd when exporting flac files? vgmstream would accept either one - I'm not sure there's really a standard. I guess the same thing might be true of ogg vorbis, though.

I can make the importer accept LOOP_START, LOOPSTART, LoopStart, or pretty much whatever.

libertyernie commented 1 year ago

I just realized that Vorbis comments (and therefore FLAC tags, FLAC borrowed its implementation from Vorbis) are case-insensitive, so that's something else I should fix. How about I just have both the Ogg Vorbis and FLAC decoders accept the same things vgmstream does, and have both encoders output LOOPSTART and LOOPLENGTH?

libertyernie commented 3 months ago

I'm closing any issues more than a year old. If you're still having a persistent issue with the newest version of Looping Audio Converter, please file a new issue on this GitHub repository instead of replying to this one. Make sure to include the exact wording of any error you're getting, which settings you're using when converting audio (if applicable), and - if possible - a link to the file you're using as input.