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. VP8 encoding on Android
Forum Updated to NodeBB v4.3 + New Features

VP8 encoding on Android

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 1 Posters 1.4k Views 2 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.
  • M Offline
    M Offline
    marianofino
    wrote on last edited by marianofino
    #1

    Hello everyone!

    My ultimate goal is to record video from Android camera and save it as WebM (VP8/Vorbis). I am using Qt 5.4.

    One of the issues found so far, is that Qt doesn't seem to recognize the VP8 codec on Android 4.4. When I output the available codecs, this is the list shown:

    D/Qt      (23133): Video codecs:
    D/Qt      (23133): ==========
    D/Qt      (23133): ../camera/video-source/src/main.cpp:18 (void debugCodecs()): "h263"
    D/Qt      (23133): ../camera/video-source/src/main.cpp:18 (void debugCodecs()): "h264"
    D/Qt      (23133): ../camera/video-source/src/main.cpp:18 (void debugCodecs()): "mpeg4_sp"
    D/Qt      (23133): ../camera/video-source/src/main.cpp:21 (void debugCodecs()): 
    

    The official Android documentation mentions that Android 4.4 has a VP8 encoder (http://developer.android.com/guide/appendix/media-formats.html#core), but on the list shown above, it doesn't appear. A strange thing, is that the last result is empty, which makes me think that somehow Qt recognizes that there is one more codec, but it doesn't show the name.

    This is the code I'm using to output the list of codecs:

    QCamera camera;
    QMediaRecorder mediaRecorder(&camera);
    
    qDebug() << "\nVideo codecs:\n==========";
    foreach (const QString &codecName, mediaRecorder.supportedVideoCodecs()) {
        qDebug() << codecName;
    }
    

    My questions are:

    1. Any idea why Qt doesn't recognize the VP8 codec on Android 4.4?
    2. Does somebody had an experience encoding to WebM and would like to share it?
    3. Would you consider a good idea to bundle the codecs together with the app?

    PS: Just to add more info to the issue, I reviewed the Qt Multimedia backend restrictions on Android (http://qt-project.org/wiki/Qt_Multimedia_Backends) but still, it should work.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      marianofino
      wrote on last edited by
      #2

      After making some more research, I found that Qt doesn't read the system's codecs, but they are "hardcoded". Here is a link to the file which returns the available codecs in Android:

      https://qt.gitorious.org/qt/qtmultimedia/source/108dda7a90bd0f0337358b0db47ae55acd16dea6:src/plugins/android/src/mediacapture/qandroidvideoencodersettingscontrol.cpp#L62

      I will continue posting here my updates on this topic.

      1 Reply Last reply
      0

      • Login

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