简体   繁体   English

ffmpeg mkv 到 mp4 的转换有颜色

[英]ffmpeg mkv to mp4 conversion has color tint

I am recording the screen in a lossless format to have small CPU load我正在以无损格式录制屏幕以降低 CPU 负载

ffmpeg -f gdigrab -framerate 30 -i desktop -vcodec libx264rgb -crf 0 -preset ultrafast rec.mkv ffmpeg -f gdigrab -framerate 30 -i desktop -vcodec libx264rgb -crf 0 -preset ultrafast rec.mkv
ffprobe rec.mkv ffprobe rec.mkv

Input #0, matroska,webm, from 'vid.mkv':
  Metadata:
    ENCODER         : Lavf58.64.100
  Duration: 00:00:29.67, start: 0.000000, bitrate: 2829 kb/s
    Stream #0:0: Video: h264 (High 4:4:4 Predictive), gbrp(pc, gbr/unknown/unknown, progressive), 1920x1200, 30 fps, 30 tbr, 1k tbn, 60 tbc (default)
    Metadata:
      ENCODER         : Lavc58.112.103 libx264rgb
      DURATION        : 00:00:29.666000000

then I convert/compress it in mp4然后我在 mp4 中转换/压缩它

ffmpeg -i rec.mkv rec.mp4 ffmpeg -i rec.mkv rec.mp4
ffprobe rec.mp4 ffprobe rec.mp4

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'vid.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.64.100
  Duration: 00:00:29.67, start: 0.000000, bitrate: 326 kb/s
    Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), gbrp(tv, gbr/unknown/unknown), 1920x1200, 248 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)

but the resulting mp4 it is tinted by green and pink color (white areas are tinted green and dark areas are tinted pink)但由此产生的 mp4 它被染成绿色和粉红色(白色区域被染成绿色,黑暗区域被染成粉红色)

I have the same results on windows and ubuntu.我在 windows 和 ubuntu 上有相同的结果。 I am using latest git versions.我正在使用最新的 git 版本。

Any idea how to properly convert this to mp4?知道如何将其正确转换为 mp4 吗?

With ffmpeg release version 4.3.1, on both windows and ubuntu, conversion from mkv to mp4 works , no tinted mp4 anymore.使用 ffmpeg 发布版本 4.3.1,在 windows 和 ubuntu 上,从 mkv 到 mp4 的转换工作,不再有色 mp4。

ffprobe rec.mp4

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'rec.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.45.100
  Duration: 00:00:47.05, start: 0.000000, bitrate: 235 kb/s
    Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuv444p, 1920x1200, 157 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler

So the git version either has a bug or has some changes in progress.所以 git 版本要么有错误,要么正在进行一些更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM