SAB 8.5: Ogg Opus / WebM Audio

The nox player emulator is android 5. I set SAB at a minimum android platform of 5.0

Have you tried it on real hardware? Do you have a hardware Android 5 device?

I have a phone using android 11. Itā€™s doing the same thing.

FCBH asked me to test if .webm files now download ok. They do! I just needed to change to Fileset ID: NODWBTN1DA-opus16. Their webm files have the -opus16 suffix. They may have made some additional changes.

I also noticed that webm files downloaded from FCBH fastforward and rewind correctly using the single and double arrows. I deleted the webm files I created with latest SAB/FFMEG converter that would not forward or rewind correctly, and substituted the files downloaded from FCBH and they work perfect in the App,

If you need webm and your audio is in FCBH Bible Brain you might try building a new app with the fileset set to ā€œFileset IDā€-opus16 . You can download, stream or package these webm files in your app.

1 Like

Thank you, Roger, BTW for your info.
Has anyone found a solution yet to the FFMPEG conversion to webm in SAB?

I donā€™t know when FFMEG will work to produce reliable webm. Since FCBH is able to convert the files so they run reliably (I donā€™t know their process or software), I wrote them and explained the need and they shared the .webm audio they already had of the NT I am developing.

If you can either post your audio to DBL or just send them .wav or HQ mp3, I think they would do this for you. Just write, support@digitalbibleplatform.com -rg

Here is copy of my email,

I am the Northern Thai App developer for SIL. I have found the webm audio files that Scripture App Builder files creates do not forward or reverse correctly in apps, but the .webm audio you have on the -opus16 server do forward and reverse correctly. I was able download the webm audio from DBP for Mark, but I need the remaining New Testament webm files to package with the app. Could you please send me a link to download the webm files for Northern Thai. The file name looks like this:

B01___01_Matthew_____NODWBTN1DA.webm

Thank You, Roger Green

Andrew,

webm files have been causing some crashes in apps built with SAB versions 9.23 and 9.24, on some/most phones using Android 10 and above. The bug is supposed to be fixed in v 9.3, but I have not tested it yet. Be sure to monitor crashalytics in google analytics/firebase if you include webm files by download or embedded. This will tell you if you have frequent crashes caused by webm by your users.

mp3 files do not crash when used in the situation above.

-Roger

Thanks, Roger. Iā€™ve updated the bug database with your findings.

Can someone (@ChrisHubbard?) provide an update on using opus16 format audio? From what I see in the posts above, opus16 audio downloaded from FCBH seems to work OK, even for fast forward and rewind, but the opus16 (webm) audio created by conversion from within SAB does not. Is that still the case?

From above:

Is that only the extension that isnā€™t supported or is it the opus format itself? The wikipedia link seems to indicate that there is ā€œpartial supportā€ for opus in Android 5, 6, 7, through the .webm container.

So if SAB conversions are still not working, is it due to the way the conversion is done? I see a couple of differences in the way FCBH creates their opus 16 audio files, and the way SAB does it. Here is what FCBH does:

Here is the command used by convert audio from within SAB:
ffmpeg" -y -i infile.mp3 -map_metadata 0 -write_xing 0 -b:a 16k -map 0:a -vbr off -application voip outfile.webm

It looks like the main difference is that -c:a libopus is missing, that defines the codec. (Other differences: -map_metadata 0 looks like it just doesnā€™t copy metadata; I donā€™t know what -write_xing 0 does as it isnā€™t listed in the help in ffmpeg 4.2.)

So should the audio conversion in SAB add -c:a libopus to its command line? Would that help with the fast forward/rewind (assuming itā€™s still a problem)?

Iā€™m not exactly sure how we evolved to this point, but if you use the latest SAB to convert mp3 files to webm/opus16 (there is a convert option if you right-click on an audio file in SAB), it produces audio files that work in the app, i.e. that can fast forward and rewind. From another thread, FCBH supposedly uses this command:

ffmpeg -y -i B01___02_Matthew_____SHUBSCN1DA.mp3 -map 0:a -c:a libopus -b:a 16k -vbr off -application voip B01___02_Matthew_____SHUBSCN1DA.webm

Iā€™ve tried this, but it produces audio files that have the positioning problem. But SAB uses this command:

ffmpeg -y -i B01___02_Matthew_____SHUBSCN1DA.mp3 -map_metadata 0 -write_xing 0 -b:a 16k -map 0:a -vbr off -application voip B01___02_Matthew_____SHUBSCN1DA.webm

I.e. adds ā€œ-map_metadata 0 -write_xing 0ā€ and removes ā€œ-c:a libopusā€. Audio files produced by this latter conversion work (i.e. position properly). Although, as mentioned the the thread above over a year ago, files created with what I think is the same command werenā€™t working then. Maybe something changed in the version of ffmpeg that is distributed with SAB, and is used for the conversions? With SAB 10.2, the ffmpeg in the \bin folder is ffmpeg version 5.0.1-essentials_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers. Does this sound correct @ChrisHubbard?

Anyway, from what I have seen, if you use SAB 10.2 to do the conversion from mp3 to webm, or use the ffmpeg that comes with SAB and the last command above, it will produce audio files that work. In addition, the webm files that are downloaded from FCBH (if you set up your app to download missing audio files) also work.

@jbarndt can you confirm how FCBH is producing the webm files that they distribute? According to this other thread (link below), they are using the first command above, which in my experience produces files that donā€™t work. Also it would be helpful to know what version of ffmpeg is being used, or what conversion tool. Thanks.