有关视频录制的问题
-
我想让智能车运动的时候顺便录制视频,可每次视
频录制完了车子也会停下来,怎么才能使视频录制完之后车子保持运动?import sensor, image, time, mjpeg, pyb, car RED_LED_PIN = 1 BLUE_LED_PIN = 3 sensor.reset() # Initialize the camera sensor. sensor.set_pixformat(sensor.RGB565) # or sensor.GRAYSCALE sensor.set_framesize(sensor.QVGA) # or sensor.QQVGA (or others) sensor.skip_frames(10) # Let new settings take affect. clock = time.clock() # Tracks FPS. pyb.LED(RED_LED_PIN).on() sensor.skip_frames(30) # Give the user time to get ready. pyb.LED(RED_LED_PIN).off() pyb.LED(BLUE_LED_PIN).on() m = mjpeg.Mjpeg("example.mjpeg") for i in range(200): clock.tick() m.add_frame(sensor.snapshot()) print(clock.fps()) m.close(clock.fps()) pyb.LED(BLUE_LED_PIN).off() car.run(100,100)
-
你没有while true死循环,运行到最后就结束了