user18532: I have an AVI file input.avi encoded in HQ which has yuv422 format according to ffprobe.
Now, if I run the following command
ffmpeg -i input.avi -c:v libx264 -crf 0 -pix_fmt yuv420p out.mp4

Will the out.mp4 be lossless compared with input.avi? or it will be 'lossless' except half of the U and V information is lost?

user1871: To directly compare the YUV422P AVI and YUV420P MP4,
ffmpeg -i input.avi -i out.mp4
   -filter_complex
      "[0]format=yuv420p,split[avi-p][avi-s];
       [1][avi-p]psnr;[1][avi-s]ssim" -f null -


18532: <p>I have an AVI file <code>input.avi</code> encoded in <code>HQ</code> which has <code>yuv422</code> format according to <code>ffprobe</code>.</p>

<p>Now, if I run the following command</p>

<pre><code>ffmpeg -i input.avi -c:v libx264 -crf 0 -pix_fmt yuv420p out.mp4
</code></pre>

<p>Will the <code>out.mp4</code> be lossless compared with <code>input.avi</code>? or it will be 'lossless' except half of the <code>U</code> and <code>V</code> information is lost?</p>
 1871: <p>To directly compare the YUV422P AVI and YUV420P MP4,</p>

<pre><code>ffmpeg -i input.avi -i out.mp4
   -filter_complex
      "[0]format=yuv420p,split[avi-p][avi-s];
       [1][avi-p]psnr;[1][avi-s]ssim" -f null -
</code></pre>
