[FFmpeg-user] Lossless h265/YUV420

Jakob Schneider schneider_jakob145 at hotmail.com
Mon Nov 6 18:44:47 EET 2017

>>>> Ah no, sorry, the problem is, that I have non-image data (vectors coordinates)

>>>> that I want to press into an image with the yuv420p pixel format
>>> That is a bad idea given that (for your scenario) hevc is a lossy codec.
>> even if I use "-x265-params lossless=1"? is there another codec i could use? i need to reconstruct the original data...
>Can you use h264 with crf set to zero?
>-c:v libx264 -crf 0

only if I use yuv420p as pixel format, NVDEC says my device can't handle it otherwise...
So I don't know much about encoding or decoding, but would I imagine it like this:

RGB Image -> YUV Image -> [encoding magic] -> small encoded video file -> [decoding magic] -> YUV image -> RGB image

As NVDEC can only handle yuv420, reconstructing an RGB image has to be lossy. But could I take a YUV image frame, fill the channels with my own data and encode this, and in the end decode it to a YUV and extract the data from the channels?

More information about the ffmpeg-user mailing list