4

x265 has a lossless mode which is used for ultra-high bitrates with zero loss of quality. I tried using this mode with avconv as follows:

avconv -i input.mp4 -c:v libx265 -x265-params lossless -c:a copy output.mp4

However, using this mode has an opposite effect : video came out to be of extremely low quality. It was totally lossy!!

Am I using the parameter incorrectly? Or am I somehow misunderstanding the definition of the word "lossless"?

Important Links:

2
  • Should it not be --lossless ?
    – Linef4ult
    Sep 23, 2015 at 7:20
  • @Linef4ult : No. That doesn't work. --lossless is used when using the x265 binary directly. However, when using avconv, parameters are passed differently. For example, CRF value is passed as --crf 28 when using x265 directly, however it is passed as -x265-params crf=28 when using avconv.
    – shivams
    Sep 23, 2015 at 7:51

1 Answer 1

2

FFmpeg/Libav require a "key=value" format so it requires a "=1". So for your example:

avconv -i input.mp4 -c:v libx265 -x265-params lossless=1 -c:a copy output.mp4

To confirm if it works (via command line) you should see the following log:

x265 [info]: Rate Control                        : Lossless

Refs:

1
  • This does work!! Thanks @TheBiggerGuy. I tried converting a x264 file to x265 losslessly, and it worked. The file size of x265 came out to be larger, which was kind of a bummer, though not unexpected. I will accept your answer soon after a bit of further testing.
    – shivams
    Jun 4, 2016 at 4:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.