Thursday, 18 November 2021

Trim or split opus on android without ffmpeg

Trim or split opus on android without ffmpeg

The opus file could be contained in any format supported by ffmpeg export (Created when building the app,ffmpeg too heavy to include in app)

I tried genVideoUsingMuxer , MediaExtractor ,MediaMetadataRetriever but it fails with error

Unsupported mime 'audio/opus'
java.lang.IllegalStateException: Failed to add the track to the muxerat android.media.MediaMuxer.nativeAddTrack(Native Method)
at android.media.MediaMuxer.addTrack(MediaMuxer.java:660)

Any way i can trim the audio on android with a lightweight solution

Reencoding is not needed but its ok if output format is anything playable on android



from Trim or split opus on android without ffmpeg

No comments:

Post a Comment