[Libav-user] Mux video on Android

Hardcore Sushi hardcore.sushi+ffmpeg at disroot.org
Thu May 4 14:45:29 EEST 2023


Update: It's even worse than I thought.

> With the native components of the Android framework, it is not
possible to mux a video to an arbitrary location, at least not before
Android 6.

Someone on the IRC suggested to drop the support for Android 5 and rely
exclusively on the Android framework to mux to memory. But I was wrong.
MediaMuxer (the class performing muxing on Android) only accepts
seekable file descriptors as output. Therefore, it can only mux a video
by writing it on the disk, regardless of the Android version. I tried
with LocalSocket (unix pipe) and ParcelFileDescriptor.createPipe() to
create an in-memory file descriptor but I always get this error:

MPEG4Writer E cannot seek mFd: Illegal seek (29) 152

The only way I see to solve this problem is to use an external muxer,
like libav. So DroidFS really needs your help.

Thank you very much,
Hardcore Sushi


More information about the Libav-user mailing list