Changing colors when encoding H264
See original GitHub issueI’m trying to encode a series of PNG files to H264. I’ve attached one of the PNG files as a reference.
When I encode it to mp4/H.264, the dark-gray background becomes black. I tried to play around with different quality settings (e.g. using new H264FixedRateControl(1024)
instead of new DumbRateControl()
), but it didn’t make a change.
When I encoded the same files to ProRes, the gray stayed gray (independent of the profile, I tried all four of them: HQ, STANDARD, LT, PROXY). The following screenshot shows the two movies next to each other: ProRes on the left, H.264 on the right.
Encoding the same PNGs with FFMPEG to H264 does not change the gray to black, so the YUV420 color space should be able to handle those colors.
Can the color during encoding be controlled somehow in order to prevent such a color shift?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top GitHub Comments
Okay, got it working by modifying some more files (
CAVCL. codeTableChromaDC
did not yet handle the YUV420 case, andEncodedMB
assumed YUV420J for itspixels
member).Is there interest in a PR to introduce an option to choose the color space for the H264-Encoder?
See PR #174.