Skip to content

Instantly share code, notes, and snippets.

@t-artikov
Created November 14, 2017 19:48
Show Gist options
  • Save t-artikov/0558967bef35258b80021bec5681435f to your computer and use it in GitHub Desktop.
Save t-artikov/0558967bef35258b80021bec5681435f to your computer and use it in GitHub Desktop.
import Multimedia 1.0
import QtQuick 2.0
MediaSession {
id: session
autoPlay: true
QtQuickSource {
id: source
frameSize: Qt.size(1920, 1080)
duration: 10000
frameRate: 60
Item {
id: qtQuickScene
...
}
}
VideoEncoder {
id: encoder
codec: VideoEncoder.H264
bitrate: 10000000
}
FileSink {
id: sink
url: "output.mp4"
}
NodeConnection {
from: source.videoOutput
to: encoder.input
}
NodeConnection {
from: encoder.output
to: sink.videoInput
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment