Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VideoWriter resolution #232

Open
863zq opened this issue Dec 6, 2024 · 0 comments
Open

VideoWriter resolution #232

863zq opened this issue Dec 6, 2024 · 0 comments

Comments

@863zq
Copy link

863zq commented Dec 6, 2024

Windows环境,DJITelloPy/examples/record-video.py这里frame_read.frame.shape获得的分辨率,与实际上的分辨率不一致,最后无法存储视频

def videoRecorder():
    # create a VideoWrite object, recoring to ./video.avi
    # 创建一个VideoWrite对象,存储画面至./video.avi
    height, width, _ = frame_read.frame.shape
    video = cv2.VideoWriter('video.avi', cv2.VideoWriter_fourcc(*'XVID'), 30, (width, height))

    while keepRecording:
        video.write(frame_read.frame)
        time.sleep(1 / 30)

    video.release()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant