[touch] Can't record camera video to a file

Bug #1514263 reported by Michael Terry
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Confirmed
Undecided
Zoltan Balogh
qtmultimedia-opensource-src (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I can't seem to get a Camera qml object to record to a file. I get the error "Could not open file for video recording". I'm using the sample code below [1] and get the output below [2].

I'm using the camera, microphone, and video apparmor profiles. "/home/phablet/Videos/testing.testing/" did not exist. I tried making that directory in case that was the problem, but it didn't help (and I feel like QtMultimedia should make that if needed anyway).

=== [0] Environment ===

current build number: 154
device name: mako
channel: ubuntu-touch/rc-proposed/bq-aquaris.en
last update: 2015-11-08 11:33:25
version version: 154
version ubuntu: 20151106.1
version device: 20150911
version custom: mako-1.1

=== [1] Code ===

import QtQuick 2.4
import QtMultimedia 5.4
import Ubuntu.Components 1.3

MainView {
    id: root
    applicationName: "testing.testing"

    width: units.gu(100)
    height: units.gu(75)

    Component.onCompleted: {
        camera.videoRecorder.record();
        console.log("location:", camera.videoRecorder.actualLocation);
    }

    Page {
        title: i18n.tr("Testing")

        VideoOutput {
            anchors.fill: parent
            source: camera

            Camera {
                id: camera
            }
        }
    }
}

=== [2] Output ===

Loading module: 'libubuntu_application_api_touch_mirclient.so.3.0.0'
virtual QMediaService* AalServicePlugin::create(const QString&) "org.qt-project.qt.mediaplayer"
Creating a new static Service instance
virtual QMediaPlayer::State AalMediaPlayerControl::state() const

virtual QMediaPlayer::MediaStatus AalMediaPlayerControl::mediaStatus() const

virtual QMediaPlayer::MediaStatus AalMediaPlayerControl::mediaStatus() const

void QMediaPlayer::setMedia(const QMediaContent&, QIODevice*)
virtual void AalMediaPlayerControl::stop()

PlaybackStatusChanged signal arrived via the bus (Status: PlaybackStatus::stopped)
virtual void AalMediaPlayerControl::setMedia(const QMediaContent&, QIODevice*)

Local file URI: "file:///system/media/audio/ui/camera_click.ogg"
setMedia() media: QUrl( "file:///system/media/audio/ui/camera_click.ogg" )
virtual QMediaPlayer::MediaStatus AalMediaPlayerControl::mediaStatus() const

Local file URI: "file:///system/media/audio/ui/camera_click.ogg"
Setting media to: QUrl( "file:///system/media/audio/ui/camera_click.ogg" )
Setting player as current player
virtual void AalMediaPlayerControl::setAudioRole(QMediaPlayer::AudioRole)
Setting image resolution: QSize(3264, 1836)
Image aspect ratio: 1.77778
Setting thumbnail resolution: QSize(512, 288)
Thumbnail aspect ratio: 1.77778
virtual void AalMediaRecorderControl::applySettings() is not used
shm_open() failed: Permission denied
void AudioCapture::stopCapture()
QMediaRecorder error: "Could not open file for video recording"
qml: location: /home/phablet/Videos/testing.testing/video20151108_180108559.mp4
** Application is now active
virtual QSGVideoNode* ShaderVideoNodePlugin::createNode(const QVideoSurfaceFormat&)
PlaybackStatus changed to: "stopped"
Rendering not enabled, returning without presenting frame
UbuntuWindow::handleSurfaceFocusChange(focused=true)
UbuntuClipboard - Got invalid serialized mime data. Ignoring it.

Michael Terry (mterry)
summary: - [touch] Can't record video to a file
+ [touch] Can't record camera video to a file
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

And the same copy-paste about testing on Qt 5.5.1 in this bug :)

If 5.5.1 solves the problem, it is possible to consider trying out shipping Qt Multimedia 5.5 (only) on top of otherwise Qt 5.4.1 for stable image users. This should be possible unlike mixing some of the more core modules.

Changed in canonical-devices-system-image:
assignee: nobody → Zoltan Balogh (bzoltan)
status: New → Confirmed
milestone: none → backlog
Revision history for this message
Michael Terry (mterry) wrote :

No change with 5.5.1-1ubuntu1~xenial1~test1 from the PPA on mako image 353 (devel-proposed).

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qtmultimedia-opensource-src (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.