Can not decode H265 lossless

I can encode 265 lossless data with nvv4l2h265enc, and decode it with nvv4l2decoder.
when I decode it with avdec_h265 or nvh265dec in my PC, the Image is not lossless. I want a way to decode it lossless in my PC. Thanks

Hi,
Please try this:

[encode]
$ gst-launch-1.0 videotestsrc num-buffers=150 !  'video/x-raw, width=(int)1280, height=(int)720, format=(string)Y444'  ! filesink location=~/origin.yuv
$ $ gst-launch-1.0 filesrc location= origin.yuv ! videoparse format=20 width=1280 height=720 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=NV24' ! nvv4l2h265enc enable-lossless=1 ! h265parse ! matroskamux ! filesink location=a.mkv
[decode]
$ gst-launch-1.0 filesrc location= a.mkv ! matroskademux ! h265parse ! avdec_h265 ! filesink location=decoded.yuv

The origin.yuv and decoded.yuv are in Y444 and identical. Please give it a try.

1 Like

Thank you.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.