AudioAnchor icon indicating copy to clipboard operation
AudioAnchor copied to clipboard

Please add '.oga' and '.mka' to the list of accepted file extensions

Open kiwijam opened this issue 4 years ago • 6 comments

https://github.com/flackbash/AudioAnchor/blob/610aefd348a22dc77bb085b8d9babafc4403e1d7/app/src/main/java/com/prangesoftwaresolutions/audioanchor/helpers/Synchronizer.java#L146

Thank you!

kiwijam avatar Feb 04 '21 17:02 kiwijam

As far as I can tell, the Android MediaPlayer which is used by AudioAnchor does not support .oga and .mka formats.

I tested this (and you can verify it) by converting audio files to both oga and mka, then changing the file extension to mp3 and checking if they are playable by AudioAnchor. In my case, .oga was not playable and .mka did not allow skipping to a certain point in the audio file.

I'm not planning to turn away from using Android's MediaPlayer, so these formats will most likely not be supported any time soon.

flackbash avatar Feb 07 '21 10:02 flackbash

If I'm reading the list of formats correctly, then Android supports Opus, MP3, and Vorbis tracks in mka (== mkv) containers. Oga (== ogg) containers seem to support Opus and Vorbis tracks.

I made oga and mka files with ffmpeg, compiled AAnchor with oga and mka support and they seem to play back fine.

No idea what platform you're on, but:

ffmpeg -i test.wav test.mkv
mv test.mkv test.mka
ffmpeg -i test.wav test.ogg
mv test.ogg test.oga

kiwijam avatar Feb 07 '21 12:02 kiwijam

I'll have another look at this. Thanks! Did you also check if playback controls work properly? Skipping and searching with the progress bar?

flackbash avatar Feb 14 '21 12:02 flackbash

I've tried the combinations listed on the 'Supported media formats' page on Android 10 and they seem to play back fine, I can also seek without a hitch in my 8 minute test podcast.

CAVEAT: If the file contains not just an audio track but also picture or video (or additional audio) tracks, the following happens:

All combinations except for Opus inside ogg/oga still play back fine. Seeking no longer works. This might be because the seekbar is set to always seek track #0, even if that track isn't audio? I don't know :)

kiwijam avatar Feb 14 '21 12:02 kiwijam

I just used an online converter to convert mp3 to oga. When trying to play the resulting file, AudioAnchor crashes. When using the same online converter (or ffmpeg for that matter) to convert to ogg and playing the resulting file, everything works fine.

For mkv (using ffmpeg to convert mp3 to mkv) skipping forward lags a bit but works, skipping backwards however does not work.

My takeaway from this is that I should not add oga and mka and should probably not have added mkv either since it does not work properly.

Or do you think I'm missing something here?

flackbash avatar Apr 07 '21 10:04 flackbash

Hello @flackbash .

Regarding the above issue, "oga" is a "ogg" format and not related to "mp3". If you change the extension from "oga" to "ogg", it should work. At least it does on my side.

G-i-o avatar May 15 '21 04:05 G-i-o