mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
The issue of input image format support for hardware encoding with h264_rkmpp. #141
Labels
No labels
bug
enhancement
help wanted
invalid
pull-request
question
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: starred/ffmpeg-rockchip#141
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @wangchao118 on GitHub (Jan 20, 2025).
Hello, after following your compilation steps, I called avcodec_find_encoder_by_name("h264_rkmpp"), and I found that the h264_rkmpp encoder has a requirement for the input image format—it must be converted to yuv420p in order to encode properly. I have a USB camera connected to the rk3399 board for real-time 1080p@30hz hardware encoding. The input image from the USB camera is in yuvj422p format, which cannot be directly encoded using h264_rkmpp and must be converted to yuv420p. This conversion is done on the rk3399 CPU, which feels resource-intensive. I would like to know if there's any step during the compilation process where I can set the input image format for the encoder, so that h264_rkmpp can directly support yuvj422p format input?
Thank you!
@nyanmisaka commented on GitHub (Jan 20, 2025):
YUVJ support is now added in the latest commits.
37d4c2129bNote that RK3399's video encoder doesn't support YUV(J)422P, which is a planar format. YCbYCr 4:2:2 means YUYV422, which is a packed format.
So the RGA filter is needed to convert YUV(J)422P to YUV(J)420P/NV12 before encoding.