Call ffmepg binary on android(x86 emulator)
-
Trying to call the ffmpeg binary on android x86 emulator, but the binary cannot start, it do not has any error messages either(connected to errorOccurred, readyReadStandardError, readyReadStandardOutput), all I can see are
D Audio_on_android_2: test_command "/data/user/0/org.qtproject.example/files/ffmpeg --help" D Audio_on_android_2: qprocess_state_changed QProcess::Starting D Audio_on_android_2: qprocess_state_changed QProcess::NotRunning D Audio_on_android_2: qprocess_error QProcess::FailedToStart
What I have done:
1: I donwload the ffmpeg-master-android-clang.tar.xz from sourceForge
2: Unzip and add the .so files in Build steps->Build android apk->add additional librarieslibavcodec.so
libavdevice.so
libavfilter.so
libavformat.so
libavresample.so
libavutil.so
libswresample.so
libswscale.so-
Add ffmpeg in to resource file
-
Copy ffmpeg to ffmpeg_path_
QString const app_location = QStandardPaths::writableLocation(QStandardPaths::StandardLocation::AppDataLocation); ffmpeg_path_ = app_location + "/" + QFileInfo(source).fileName();
- Call ffmpeg with help command
QString const command = QString("%1 --help").arg(ffmpeg_path_); qDebug()<<__func__<<command; process_->start(command);
Any process wrong?Thanks
-
-
Hi,
It's likely a dependency issue. I suspect ffmpeg cannot find the librairies it depends on.
-
Hi,
It's likely a dependency issue. I suspect ffmpeg cannot find the librairies it depends on.
-
I don't think you can use the LD_LIBRARY_PATH environment variable. So I would try to modify the rpath of the ffmpeg executable.
-
I don't think you can use the LD_LIBRARY_PATH environment variable. So I would try to modify the rpath of the ffmpeg executable.
-
Androïd is a Linux based OS.