Skip to content

OSError: [WinError 10038] 在一个非套接字上尝试了一个操作。 #73

@zhuyuhang4

Description

@zhuyuhang4

Hello, my platform is Windows 11, and I'm using ffmpeg version 0.3.18. After commenting out this part, the program runs successfully, and the results are correct.

def write(self, img: np.ndarray):
    if self.waitInit:
        if self.pix_fmt in ("nv12", "yuv420p", "yuvj420p"):
            height_15, width = img.shape[:2]
            assert width % 2 == 0 and height_15 * 2 % 3 == 0
            height = int(height_15 / 1.5)
        else:
            height, width = img.shape[:2]
        self.width, self.height = width, height
        self.in_numpy_shape = img.shape
        self.size = (width, height)
        self.resize = self.size if self.resize is None else tuple(self.resize)
        self._init_video_stream()
        self.waitInit = False

    self.iframe += 1
    assert self.in_numpy_shape == img.shape
    img = img.astype(np.uint8).tobytes()
    self.process.stdin.write(img)

    # stderrreadable, _, _ = select.select([self.process.stderr], [], [], 0)
    # if stderrreadable:
    #     data = self.process.stderr.read(1024)
    #     sys.stderr.buffer.write(data)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions