Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
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 libraries
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
It's likely a dependency issue. I suspect ffmpeg cannot find the librairies it depends on.
@SGaist I guess in order to let the ffmpeg found the libraries, I cannot add the libraries like that. How could I tell the ffmpeg binary where to find the so files?
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.
@SGaist Do Android platform got tools like otool/install_name_tool ?
Androïd is a Linux based OS.