Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Updated to Python 3.13 - Getting error creating video: "Could not find a valid device; can't configure encoder" #1102

Open
@gloriouslyawkwardlife

Description

@gloriouslyawkwardlife

Raspberry Pi 5B, running Python 3.13.3…

I've started getting the following error since updating from Python 3.11 to Python 3.13:

[h264_v4l2m2m @ 0x555620e12290] Could not find a valid device[h264_v4l2m2m @ 0x555620e12290] can't configure encoder[ERROR:0@371.218] global cap_ffmpeg_impl.hpp:3264 open Could not open codec h264_v4l2m2m, error: Unspecified error (-22)[ERROR:0@371.218] global cap_ffmpeg_impl.hpp:3281 open VIDEOIO/FFMPEG: Failed to initialize VideoWriter

Relevant code:

# use CV2 to compile the frames into a 60 fps video.images= [imgforimginsorted(os.listdir('/home/steven/tmp'))ifimg.endswith('.png')]frame=cv2.imread(os.path.join('/home/steven/tmp',images[0]))height,width,layers=frame.shapevideo=cv2.VideoWriter(f"/home/steven/Videos/{datetime.fromtimestamp(start).strftime('%Y-%m-%d_%H-%M-%S')} -{datetime.fromtimestamp(end).strftime('%Y-%m-%d_%H-%M-%S')}.mp4",cv2.VideoWriter_fourcc(*'avc1'),60, (width,height))forimageinimages:video.write(cv2.imread(os.path.join('/home/steven/tmp',image)))cv2.destroyAllWindows()video.release()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp