How start\stop record video from camera use Gstream and Python?

Dima_Retunskiy dimaru2002 at mail.ru
Wed Aug 21 12:27:41 UTC 2019


Hi, I try make video recorder. I can write video:

Gst.init(sys.argv)
pipeline = Gst.parse_launch(
                'nvarguscamerasrc gainrange="1 1" ispdigitalgainrange="2 2"
! '
                'video/x-raw(memory:NVMM),width=1280, height=720,
framerate=120/1, format=NV12 ! '
                'omxh264enc ! qtmux ! filesink location=out/1.mp4')
pipeline.set_state(Gst.State.PLAYING)
time.sleep(10)
pipeline.send_event(Gst.Event.new_eos())
pipeline.set_state(Gst.State.NULL)

Everything work. But if I try open another pipeline to write second file:

pipeline1 = Gst.parse_launch(
                'nvarguscamerasrc gainrange="1 1" ispdigitalgainrange="2 2"
! '
                'video/x-raw(memory:NVMM),width=1280, height=720,
framerate=120/1, format=NV12 ! '
                'omxh264enc ! qtmux ! filesink location=out/1.mp4')
pipeline1.set_state(Gst.State.PLAYING)
time.sleep(10)
pipeline1.send_event(Gst.Event.new_eos())
pipeline1.set_state(Gst.State.NULL)

I received error: Process finished with exit code 139 (interrupted by signal
11: SIGSEGV)

I have idea, make two pipeline, first for take picture and second for write
file. And connect pipelines together when I need start record. But I can't
figured how it do use Python. 

1. How separate pipelines?
2. How connect pipelines?
3. When\where send EOS signal?






--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list