[FFmpeg-user] OpenCV OMX artifacts

Roman Honcharenko yunhaveto at gmail.com
Tue Apr 21 10:39:14 EEST 2020

I'm using hardware encoding via FFMPEG, OpenCV and OpenMAX.

If I'm using FFmpeg h264_omx as a backend for VideoWriter() than I get
image like https://i.stack.imgur.com/H7Kg8.jpg. Colors obviously kind of
Other backend codecs work fine. My test code: https://pastebin.com/z1igaSsA

The most interesting part, ff I'll just re-encode video via the FFMpeg
command line, the output will be okay - https://pastebin.com/rRPTwTAr

What is the workaround and where should I look?

   - Machine: Raspberry Pi 4B+
   - System: Custom Yocto Distribution (latest poky, meta-openembedded,
   meta-raspberrypi master branches)
   - OpenCV version: 4.1.0
   - Python version: 3.8.2
   - FFMpeg version: 4.2.2 (build with --enable-omx and --enable-omx-rpi)

More information about the ffmpeg-user mailing list