Log in

View Full Version : using ffmpeg with x265


picturebuffer
17th January 2014, 12:40
As there is no integration of x265 in ffmpeg yet or, in case you do not have any .y4m or space for them, this ffmpeg -> x265 worked fine for me:

ffmpeg -i hobbit-4k.mp4 -r 24000/1001 -f rawvideo -pix_fmt yuv420p -an - | x265 - --log 3 --input-res 4096x2304 --fps 24000/1001 --preset fast hobbit-4k.h265

LoRd_MuldeR
17th January 2014, 15:49
Can't you use "-f yuv4mpegpipe", so that you don't have to set the resolution and frame-rate explicitly?

picturebuffer
17th January 2014, 15:55
Seems as if not.

x265 [error]: YUV input requires source width, height, and rate to be specified

I also understand y4m is only raw format that has proper headers for signalling res and fps.

sneaker_ger
17th January 2014, 16:03
x265 supports yuv4mpegpipe (8 bit only, though), but you need to tell it that the header exists, IIRC with the --y4m parameter.

picturebuffer
17th January 2014, 16:14
Setting --y4m indeed works and headers can be retrieved from the pipe! Thanks!