Log in

View Full Version : x265 cli crop video


scoubidou
11th January 2016, 02:41
Hi all,
I'm sorry for my english above all
I have some experience with x264 in cli (windows and linux environnement) and now I want to work with x265, my input video format 1920x1080, I want to crop the black bars but I can't :(
This is a sample of my cli without some specifics options of quality (just to try and resolve the problem quickly) :

x265 --input "input.yuv" --ouput "output.hevc" --input-res 1920x1080 --fps 23.976 --display-window 0,140,0,140 --overscan crop

The encoder do the job but the output resolution is 1920x1080...:confused:

If someone else can help me, thank you.

Scoubidou

foxyshadis
11th January 2016, 13:54
With what player? The --display-window and --overscan are only a suggestion to the player, so if the player doesn't support them you'll see the bars. Internally, it's always encoded at the input resolution.

Why not just crop before encoding?

scoubidou
11th January 2016, 22:34
Ok, thank you for this information, so how can I crop before encoding ?

sneaker_ger
11th January 2016, 22:51
Is there no option to crop in the program you are using to create the .yuv file?

Alternatively, you can use ffmpeg:
ffmpeg -f rawvideo -s 1920x1080 -r 24000/1001 -i "input.yuv" -vf crop=in_w:in_h-2*140 -f yuv4mpegpipe - | x265 - --y4m -o "output.265"

scoubidou
12th January 2016, 00:45
I explain you my process step by step for x265 encoding.
1) I rip my Blu Ray with AnyDHD HD
2) I use eac3to to demux the track "eac3to 1) -demux"
3) I use ffmpeg tu create the .yuv file from the video source track
4) I use x265 tu encode.

So I understand the cli you give me an exemple, I'll do some test and I'll be back for the debriefing :D

scoubidou
12th January 2016, 01:06
FANTASTIIIIIIICCCCC
Thank you VERY VERY much guys ;)