Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.


Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)

Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 6th October 2020, 08:12   #1  |  Link
Not a Registered User
H2sixty's Avatar
Join Date: Aug 2020
Location: earth
Posts: 24
ffmpeg command to pipe a mkv/mp4 file into x265 in realtime as a yuv

[for windows add .exe to ffmpeg and x265, ffmpeg.exe x265.exe]
(i do not have windows to test these, i replaced it with debian linux)

8bit input--\/
ffmpeg -i "input.file" -f yuv4mpegpipe - | x265 --y4m - -o "outputfile.265"

10bit input--\/
ffmpeg -i "input.file" -f yuv4mpegpipe -strict -1 - | x265 --y4m - -o "outputfile.265"
(use -strict -1 or else y4m will want to interpret the input as 8-bit 420)

12bit input--\/
ffmpeg -i "input.file" -f -pix_fmt yuv420p12le yuv4mpegpipe -strict -1 - | x265 --y4m - -o "outputfile.265"

ffmpeg can automatically detect pixel format from input file. so -pix_fmt "pixel format (yuv420p etc)" input option isn't needed unless input is rawvideo... but if needed use -pix_fmt with a choosen pixel format from below...

other inputs/pix_fmt--\/

yuv420p yuvj420p yuv422p yuvj422p yuv444p yuvj444p gbrp yuv420p10le yuv422p10le yuv444p10le gbrp10le yuv420p12le yuv422p12le yuv444p12le gbrp12le gray gray10le gray12le

(use with -strict 1 to force/allow choosen pix_fmt)
for a list of x265 {not ffmpeg} supported pixel formats use command below
ffmpeg -h encoder=libx265 2>/dev/null | grep pixel
{for ffmpeg see selurs post}


thanks to excellentswordfight for info.
Originally Posted by excellentswordfight View Post
"ffmpeg.exe" -i "input" -f yuv4mpegpipe -strict -1 - | "x265.exe"
In some scenarios you will need to change the format before piping (-pix_fmt)

Last edited by H2sixty; 14th October 2020 at 01:55. Reason: some corrections made thx to selur, in {} brackets or next to. + removed unneeded info to topic
H2sixty is offline   Reply With Quote

ffmpeg, linux, x265, y4m, yuv

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +1. The time now is 01:35.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.