-
-
Notifications
You must be signed in to change notification settings - Fork 858
Tips
-
Using Space Character In Command String
execute
method inMobileFFmpeg
API is overloaded and has an optional delimiter parameter. Delimiter defines how a command string will be split into arguments. When a delimiter is not specified then space character is used as default delimiter. Therefore if you have a space character in one of your command arguments, in filename or in-filter_complex
block, then your command string will be split into invalid arguments and execution will fail.Unfortunately, quotation marks are not supported by
MobileFFmpeg
. You can not use them to define arguments, so they won't help you on fixing this.You have two options:
-
You can split your command string into array yourself and call appropriate execute method:
Android:
int execute(String[] arguments)
IOS:
(int)executeWithArguments: (NSArray*)arguments
-
Or use a different delimiter character in your command call
execute
by specifying it.Android:
FFmpeg.execute("-i~file1.mp4~-c:v~mpeg4~file2.mp4", "~");
IOS:
[MobileFFmpeg execute: @"-i~file1.mp4~-c:v~mpeg4~file2.mp4", @"~"];
-
-
Depending Another Library Containing
libc++_shared.so
MobileFFmpeg
packages specified in Android c++ dependency guide includelibc++_shared.so
library. If a second library which also includeslibc++_shared.so
is added as a dependency,gradle
fails withMore than one file was found with OS independent path 'lib/x86/libc++_shared.so'
error message.You can fix this error by adding the following block into your
build.gradle
.android { packagingOptions { pickFirst 'lib/x86/libc++_shared.so' pickFirst 'lib/x86_64/libc++_shared.so' pickFirst 'lib/armeabi-v7a/libc++_shared.so' pickFirst 'lib/arm64-v8a/libc++_shared.so' } }
Copyright (c) 2018-2021 MobileFFmpeg