Answers.Body: <p>As wiki of ffmpeg recommends</p>
  <pre><code>ffmpeg -video_size 1920x1080 -framerate 30 -f x11grab -i :0.0 -c:v libx264rgb -crf 0 -preset ultrafast -color_range 2 output.mkv
  </code></pre>
  <p>This will give you lossless output but also lossless RGB, the same format used in the operating system.</p>
  <p><a href="https://trac.ffmpeg.org/wiki/Capture/Desktop" rel="nofollow noreferrer">https://trac.ffmpeg.org/wiki/Capture/Desktop</a></p>
  <p>Edit :  this worked</p>
  <pre><code>ffmpeg -video_size 1920x1080 -framerate 30 -f x11grab -i $DISPLAY -c:v libx264rgb -crf 0 -preset ultrafast -color_range 2 output.mkv
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-27T18:16:50.947Z
Answers.Text: That works very well! but the file size went upto 192+ MB for just 12 seconds of recording, is this normal? Any way to reduce the file size without compromosing smoothness in video + accurate colors?
Answers.UserDisplayName: siduck
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-28T11:34:45.460Z
Answers.Text: Of course it is normal, this is true lossless video.
Answers.UserDisplayName: Валерий Заподовников
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-27T15:26:44.480Z
Answers.LastActivityDate: 2022-07-27T18:01:54.550Z
Answers.LastEditDate: 2022-07-27T18:01:54.550Z
Answers.UserDisplayName: Валерий Заподовников
Body: <pre><code>ffmpeg -f x11grab -framerate 60 -probesize 42M -i $DISPLAY -preset ultrafast -pix_fmt yuv420p  vid.mp4
  </code></pre>
  <p>I use this currently and the video recording is smooth but colors are not accurate, they are dimmed. If I remove yuv420p pix_fmt then ffmpeg will use yuv444p (which is default right) , then the colors look accurate but the output video is laggy :/</p>
  <p>How do I get smooth video output + accurate colors? Been trying to fix this since yesterday, help!</p>
  <p>Check these :</p>
  <p>yuv420p : <div class="youtube-embed"><div>
                  <iframe width="640px" height="395px" src="https://www.youtube.com/embed/GUeP-TNPa3E?start=0"></iframe>
              </div></div></p>
  <p>yuv444p : <div class="youtube-embed"><div>
                  <iframe width="640px" height="395px" src="https://www.youtube.com/embed/S17dYMGJ0As?start=0"></iframe>
              </div></div></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-07-28T07:55:09.947Z
Comments.Text: I'm not seeing any significant difference, both look like the gamut is wrong. https://i.sstatic.net/d4Dgn.jpg Is your display calibrated to RGB or Rec709? Is your colour management set correctly? If you're aiming for YouTube, your video will be in 709, but on an sRGB display [which 99.9% of people will see it in, or a vague approximation of] you should compensate, YouTubers will always see the 'washed out' version, so you have to pre-empt it, or keep the entire workflow in sRGB.
Comments.UserDisplayName: Tetsujin
Tags: <ffmpeg><linux>
Title: Whats the smoothest way to screen record with FFMPEG with accurate colors?
UserDisplayName: siduck
ThreadText: # Whats the smoothest way to screen record with FFMPEG with accurate colors?
  
  (Asked by: username_0 on 2022-07-27)
  
  ```
  ffmpeg -f x11grab -framerate 60 -probesize 42M -i $DISPLAY -preset ultrafast -pix_fmt yuv420p  vid.mp4
  
  ```
  
  I use this currently and the video recording is smooth but colors are not accurate, they are dimmed. If I remove yuv420p pix\_fmt then ffmpeg will use yuv444p (which is default right) , then the colors look accurate but the output video is laggy :/
  
  How do I get smooth video output + accurate colors? Been trying to fix this since yesterday, help!
  
  Check these :
  
  yuv420p :
  
  yuv444p :
  
  **Tags:** ffmpeg, linux
  
  > **Comments:**
  > **username_1**: I'm not seeing any significant difference, both look like the gamut is wrong. https://i.sstatic.net/d4Dgn.jpg Is your display calibrated to RGB or Rec709? Is your colour management set correctly? If you're aiming for YouTube, your video will be in 709, but on an sRGB display [which 99.9% of people will see it in, or a vague approximation of] you should compensate, YouTubers will always see the 'washed out' version, so you have to pre-empt it, or keep the entire workflow in sRGB.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2022-07-27. Score: 1
  
  As wiki of ffmpeg recommends
  
  ```
  ffmpeg -video_size 1920x1080 -framerate 30 -f x11grab -i :0.0 -c:v libx264rgb -crf 0 -preset ultrafast -color_range 2 output.mkv
  
  ```
  
  This will give you lossless output but also lossless RGB, the same format used in the operating system.
  
  <https://trac.ffmpeg.org/wiki/Capture/Desktop>
  
  Edit : this worked
  
  ```
  ffmpeg -video_size 1920x1080 -framerate 30 -f x11grab -i $DISPLAY -c:v libx264rgb -crf 0 -preset ultrafast -color_range 2 output.mkv
  
  ```
  
  > **Comments:**
  > **username_0**: That works very well! but the file size went upto 192+ MB for just 12 seconds of recording, is this normal? Any way to reduce the file size without compromosing smoothness in video + accurate colors?  
  > **username_2**: Of course it is normal, this is true lossless video.  
  
  ---
  
  