4

I would like to re-encode an MPEG4 video into H.265 and want to manually control the number of B frames in the encoding. I tried the following command:

ffmpeg -i test.avi -c:v libx265 -preset medium -x265-params crf=23 bframes=0 test_HEVC.mp4

as suggested by the x265 documentation. However, I got the following error:

[NULL @ 0x7f4e46f82e80] Unable to find a suitable output format for 'bframes=0' bframes=0: Invalid argument

The command works fine without bframes=0, so I must be making a syntax error there. What would be the correct version?

chronosynclastic
  • 197
  • 1
  • 1
  • 7

2 Answers2

8

You must use : as a separator for -x265-params :

ffmpeg -i test.avi -c:v libx265 -preset medium -x265-params crf=23:bframes=0 test_HEVC.mp4
DavidPostill
  • 153,128
  • 77
  • 353
  • 394
Ely
  • 2,503
  • 18
  • 16
  • If you prefer you can just use `-crf` option instead of using it via `-x265-params`. See `ffmpeg -h encoder=libx265` for other [private options](https://ffmpeg.org/ffmpeg.html#AVOptions). – llogan Nov 15 '15 at 01:18
0

For ffmpeg you can use the -bf command to change the number of B frames between two frames. In your case you can use

-bf 0