View Single Post
Old 22nd July 2020, 23:55   #2  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,904
Quote:
Originally Posted by vigan1 View Post
Hello.
I want to use x264 or x265 to capture a lossless 1080p video.
If I understand correctly x265 CRF0 is not lossless, while x264 CRF0 is lossless ?
Why do you wanna use crf when there's --lossless in the command line?
Just use

Code:
x265.exe --preset medium --lossless -o "raw_video.hevc"
Rate control is disabled as well as all quality metrics (they would only waste CPU cycles), DCT is bypassed and no quantization occurs, but normal predictions are still allowed, so the encoder will find optimal inter or intra predictions and then losslessly encode the residual. You can use the preset you want, but of course you have to keep in mind that if you're capturing something like a digital source coming from an SDI, and HDMI, a Display Port, a Desktop through DirectShow and so on and your CPU can't cope with the input framerate, you're gonna lose frames!
TL;DR if your source is 25p and your encoding speed falls to 20fps, you're gonna drop frames, so test the presets and choose wisely according to what your source is and what your CPU can sustain as a load. If x265 is too heavy for real time encoding, you can try x264 but if they're both too heavy, I'd suggest you to go for something else. There are many other lossless codecs out there like HuffYUV, Lagarith, UTVideo, FFV1 etc. You might even capture as lossless HuffYUV and eventually re-encode as x265 lossless later if you wanna keep it as lossless, thus greatly reducing the file size compared to uncompressed.

Cheers,
Frank.

Last edited by FranceBB; 22nd July 2020 at 23:58.
FranceBB is offline   Reply With Quote