4

I am using the Qt Multimedia framework and I can display video on my window just fine using QML and the Camera module as follows:

ControlView {
    id: recorderWindow
    color: "#000000"
    border.width: 5

    Camera {
        id: camera
        captureMode: Camera.CaptureVideo
        videoRecorder.mediaContainer: "mp4"
    }
    VideoOutput {
        source: camera
        focus: visible
        anchors.fill: parent
        MouseArea {
            anchors.fill: parent;
            onClicked: {
                camera.videoRecorder.record();
            }
        }
    }
}

I am running this on an ARM based processor running Ubuntu 14.04 (nvidia Jetson).

Now, my problem is that when I record videos, the preview in the UI comes to a complete halt. Additionally, the recorded video drops a lot of frames. One thing I noticed is that it always uses the ogg container rather than the mp4 container as specified.

Using gstreamer, I can run the following with display and recording at the same time without any issues:

gst-launch-1.0 -v autovideosrc ! tee name = t ! queue ! omxh264enc ! 
'video/x-h264, stream-format=(string)byte-stream' ! h264parse ! qtmux 
! filesink location=test.mp4 t. ! queue ! videoscale ! video/x-raw, 
width=480,height=270 ! xvimagesink -e sync=false

Would it be possible to have a similar pipeline using the Camera module and QML (I think these are based on gstreamer).

EDIT:

I tried setting videoRecorder.videoCodec: "video/x-h264" but this does not seem to have any effect. The encoding is still done with Theora.

Luca
  • 10,458
  • 24
  • 107
  • 234
  • can you not use GStreamer directly making recording pipeline in your qt app(maybe the big problem would be that you could not access the camera as it will be used from QML)? – nayana Jun 16 '16 at 07:27

0 Answers0