SD card:OSError: [Errno 22] EINVAL

video
When i use this demo to save video to sdcard,it didn’t work.
How can i resolve it ?
Thanks!

import video, sensor, image, lcd, time

lcd.init()
sensor.reset()
sensor.set_pixformat(sensor.RGB565)
sensor.set_framesize(sensor.QVGA)
sensor.run(1)
sensor.skip_frames(30)
v = video.open("/sd/capture.avi", record=1, interval=200000, quality=50)#error
i = 0
tim = time.ticks_ms()
while True:
tim = time.ticks_ms()
img = sensor.snapshot()
lcd.display(img)
img_len = v.record(img)
# print(“record”,time.ticks_ms() - tim)
i += 1
if i > 100:
break
print(“finish”)
v.record_finish()
lcd.clear()

Traceback (most recent call last):
File “”, line 9, in
OSError: [Errno 22] EINVAL
MicroPython v0.5.0 on 2019-11-29; Sipeed_M1 with kendryte-k210
Type “help()” for more information.

hi, please check your sd card, is it compitible with SPI mode? most of this error cased by sd card