user25678: I was re-encoding videos downloaded from YouTube with Lossless H.264 (using FFmpeg) because I'm experimenting with CRF=0. 
I found that resulting videos are much bigger (1 gigabyte) than the original video (100 megabyte). 
However, from my knowledge of lossy compression, it is basically like lossless compression (plus, it's the same codec) except it throws away lots of minor details that won't be noticed but take up lots of space. Hence, shouldn't I achieve a similar file size if I encode the decoded file using CRF=0 because lots of data are already thrown away? I don't quite understand this.
I use the following command: 
ffmpeg -i 'file' -an -c:v libx264 -crf 0 'out file'


user2836: You have a fundamental misunderstanding of how lossy compression works.  It doesn't throw away information so much as ignore the portions of the image that don't conform to the patterns it is looking for.  It does care about small amounts of error, so it doesn't spend time to store them, however it still decodes to a complex video.  The lossless compression doesn't use the same algorithms as the lossy, the shortcuts taken by the lossy algorithm can't be reused by the lossless one.
The lossy algorithm is optimized towards using patterns that will have minimal error with minimal data usage.  Lossless algorithms are optimized towards minimizing the data required when not losing any data, so they work quite differently.

25678: <p>I was re-encoding videos downloaded from YouTube with Lossless H.264 (using FFmpeg) because I'm experimenting with <code>CRF=0</code>. </p>

<p>I found that resulting videos are much bigger (1 gigabyte) than the original video (100 megabyte). </p>

<p>However, from my knowledge of lossy compression, it is basically like lossless compression (plus, it's the same codec) except it throws away lots of minor details that won't be noticed but take up lots of space. Hence, shouldn't I achieve a similar file size if I encode the decoded file using <code>CRF=0</code> because lots of data are already thrown away? I don't quite understand this.</p>

<p>I use the following command: </p>

<pre><code>ffmpeg -i 'file' -an -c:v libx264 -crf 0 'out file'
</code></pre>
 2836: <p>You have a fundamental misunderstanding of how lossy compression works.  It doesn't throw away information so much as ignore the portions of the image that don't conform to the patterns it is looking for.  It does care about small amounts of error, so it doesn't spend time to store them, however it still decodes to a complex video.  The lossless compression doesn't use the same algorithms as the lossy, the shortcuts taken by the lossy algorithm can't be reused by the lossless one.</p>

<p>The lossy algorithm is optimized towards using patterns that will have minimal error with minimal data usage.  Lossless algorithms are optimized towards minimizing the data required when not losing any data, so they work quite differently.</p>
