[FFmpeg-user] Encode with "tiles" scheme using ffmpeg

Moritz Barsnick barsnick at gmx.net
Mon Apr 29 15:10:04 EEST 2019


On Mon, Apr 29, 2019 at 13:03:51 +0200, Mohammed Bey Ahmed Khernache wrote:
> Hello,
> how to encode a video sequence in hevc, with "*tiles*" or "*wpp*" schemes
> using ffmpeg?

If I understand the (lib)x265 documentation correctly, x265 has no
support for tiles, only slices. It has support for WPP, which is
activated by default, and preferred over slices.

> .\ffmpeg.exe -f rawvideo -vcodec rawvideo -s 1920x1080 -r 25 -pix_fmt
> yuv420p -i .\pedestrian_area.yuv -c:v hevc -r 25 -x265-params -tiles 4x2
> crf=27 -vframes 375 -an -y pedestrian_area.mp4

This is not the way x265-params works. It requires one shell argument,
which would make it look like:
-x265-params "optionname1=value1:optionname2=value2:..."

And it seems x265 doesn't support a "tiles" option anyway.

> [NULL @ 00000178db486a40] Unable to find a suitable output format for '4x2'
> 4x2: Invalid argument

This is because "-tiles" was interpreted as the argument to the option
"-x265-params", and hence "4x2" was interpreted as an output name.

In summary: You probably need to do exactly nothing (but omit "-x265-params -tiles
4x2") to achieve WPP. And you pass "crf" with the ffmpeg option, i.e.
"-crf 27":

$ .\ffmpeg.exe -f rawvideo -vcodec rawvideo -s 1920x1080 -r 25 -pix_fmt yuv420p -i .\pedestrian_area.yuv -c:v hevc -crf 27 -vframes 375 -an -y pedestrian_area.mp4
(Just to point it out - untested.)

Cheers,
Moritz


More information about the ffmpeg-user mailing list