Skip to content

H264 encoding failure #100

@bloodymeli

Description

@bloodymeli

Expected behaviour

I'm trying to open a VideoWriter using H264 encoding.

Actual behaviour

I'm getting an error when trying to write H264 encoded files/

OpenCV: FFMPEG: tag 0x34363248/'H264' is not supported with codec id 27 and format 'mp4 / MP4 (MPEG-4 Part 14)'
OpenCV: FFMPEG: fallback to use tag 0x31637661/'avc1'
Could not find encoder for codec id 27: Encoder not found

And I'm unable to write frames to file. I've tried using X264 but I get the same error.

Steps to reproduce

Code:

import cv2
fourcc = cv2.VideoWriter_fourcc(*'H264')
video_out = cv2.VideoWriter('test.mp4', int(fourcc), 25.0, (640, 480))

System setup:
Ubuntu 16.4,
FFMPEG 3.4.2 (upgraded from the default Ubuntu version due to this error, but it didn't solve it)
Opencv 3.4.1
Intel i7

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