0
I need a way to record video from my camera and audio from my mic simultaneously, such that they are saved in one file.
Currently, I now how to record video...
gst-launch-1.0 -e autovideosrc ! videoconvert ! matroskamux ! filesink location=recording.mkv
and audio...
gst-launch-1.0 -e autoaudiosrc ! audioconvert ! wavenc ! filesink location=recording.wav
...separately.
What I need is a file that contains video from recording.mkv
and audio from recording.wav
.
I have found something that may work if tweaked a bit.
gst-launch-1.0 -e autovideosrc ! queue ! videoconvert ! mkv. autoaudiosrc ! queue ! audioconvert ! mkv. matroskamux name=mkv ! filesink location=test.mkv sync=false
This records video but not audio, though, as I said, I think it just needs to be tweaked a little bit to record audio as well.
https://stackoverflow.com/questions/37416015/gstreamer-write-both-video-and-audo-streams-into-a-single-mp4-container-after-c – music2myear – 2018-10-18T16:50:31.583
@music2myer So I have to record video and audio separately and then concatenate them? Can I not just save them to a same file at once (while recording)? – Hanlon – 2018-10-19T07:44:08.727
I don't know the features of gstreamer, but the answer for the question I linked suggested to read documentation on gst-launch, which while offering concat features, I suppose may also offer real-time audio & video capture, as suggested by the answer you figured out below. Glad you were able to get it all working. – music2myear – 2018-10-19T15:28:07.773