Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Call ffmepg binary on android(x86 emulator)
Forum Updated to NodeBB v4.3 + New Features

Call ffmepg binary on android(x86 emulator)

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
6 Posts 2 Posters 550 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tham
    wrote on 23 Jul 2019, 13:13 last edited by
    #1

    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

    libavcodec.so
    libavdevice.so
    libavfilter.so
    libavformat.so
    libavresample.so
    libavutil.so
    libswresample.so
    libswscale.so

    1. Add ffmpeg in to resource file

    2. Copy ffmpeg to ffmpeg_path_

    QString const app_location = QStandardPaths::writableLocation(QStandardPaths::StandardLocation::AppDataLocation);
    ffmpeg_path_ = app_location + "/" + QFileInfo(source).fileName();
    
    1. Call ffmpeg with help command
    QString const command = QString("%1 --help").arg(ffmpeg_path_);
    qDebug()<<__func__<<command;
    process_->start(command);
    

    Any process wrong?Thanks

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 23 Jul 2019, 21:09 last edited by
      #2

      Hi,

      It's likely a dependency issue. I suspect ffmpeg cannot find the librairies it depends on.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      T 1 Reply Last reply 24 Jul 2019, 12:05
      0
      • S SGaist
        23 Jul 2019, 21:09

        Hi,

        It's likely a dependency issue. I suspect ffmpeg cannot find the librairies it depends on.

        T Offline
        T Offline
        tham
        wrote on 24 Jul 2019, 12:05 last edited by
        #3

        @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?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 24 Jul 2019, 19:22 last edited by
          #4

          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.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          T 1 Reply Last reply 25 Jul 2019, 05:18
          0
          • S SGaist
            24 Jul 2019, 19:22

            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.

            T Offline
            T Offline
            tham
            wrote on 25 Jul 2019, 05:18 last edited by
            #5

            @SGaist Do Android platform got tools like otool/install_name_tool ?

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 25 Jul 2019, 21:16 last edited by
              #6

              Androïd is a Linux based OS.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              1/6

              23 Jul 2019, 13:13

              • Login

              • Login or register to search.
              1 out of 6
              • First post
                1/6
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved