0
votes

I am recording the screen in a lossless format to have small CPU load

ffmpeg -f gdigrab -framerate 30 -i desktop -vcodec libx264rgb -crf 0 -preset ultrafast 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

ffmpeg -i rec.mkv 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)

I have the same results on windows and ubuntu. I am using latest git versions.

Any idea how to properly convert this to mp4?

1

1 Answers

0
votes

With ffmpeg release version 4.3.1, on both windows and ubuntu, conversion from mkv to mp4 works , no tinted mp4 anymore.

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.