Log in

View Full Version : How to resize irregular dimensions to irregular dimensions


zetsu_shoren
14th May 2015, 11:22
These are what happen:

1814x1028 to 1280x720 in x264 = green vertical line on the right of output file (working)

1814x1028 to 1271x720 in x264 = x264 closes right away in less than half a second (leaves a copy of the output file with no size)

1814x1028 to 1272x720 in x264 = x264 crashes right away after reaching line "x264 [info]: profile High 10, level 5.0, 4:2:0 10-bit" (leaves a copy of the output file with no size)

1814x1028 to 1280x725 in x264 = x264 closes right away in less than half a second (leaves a copy of the output file with no size)

1814x1028 to 1271x720 in Handbrake = resolution changed to 1272x720, no green vertical line, working file, 8bit



My aim is to directly resize a 1814x1028 to 1271x720 (or 1272x720) in x264 10bit.

I've been using these lines since I started encoding 2 years ago (I'm not an advanced encoder):
--vf resize:1280,720
and
--vf resize:960,720

What do I do to get the result I want? What am I missing or doing wrong?

LoRd_MuldeR
14th May 2015, 13:01
x264 supports any resolution - except that for YUV 4:2:0 (http://en.wikipedia.org/wiki/Chroma_subsampling#Sampling_systems_and_ratios) color-space the resolution unavoidably needs to be mod2 (even).

If you see a "green vertical line" it's probably a playback problem. Or something goes wrong before the video is processed by x264, e.g. in the decoding stage.

zetsu_shoren
14th May 2015, 13:56
Oh so that's why the resolution gets bumped up to an even number (being 1272).

x264 supports any resolution
I want to believe this, but I feel I'm lacking something in my codes. When I use --vf resize:1280,720, it works for 1980x1080 and has no green line on the right.

If you see a "green vertical line" it's probably a playback problem. Or something goes wrong before the video is processed by x264, e.g. in the decoding stage.
How do I find out when it all goes properly, or when something goes wrong?

*Edit:
http://goput.it/kp1w.png/

mandarinka
15th May 2015, 11:46
Try using avisynth as source, or avs2yuv and using raw input. x264 as an encoder has always supported non-mod4 resolutions. The problem must be either in your playback/viewing thing, or perhaps in the resize filter which is based on ffmpeg's swscale I think. But the former possibility is probably more likely.

zetsu_shoren
17th May 2015, 18:08
Problem resolved.

Both the 32bit and 64bit on this site http://www.x264.nl/x264_main.php were the problem children.

I tested both 32bit and 64bit from this site http://download.videolan.org/pub/x264/binaries/ and they work exactly how I wanted x264 to work. I don't know how or what makes it work, but I noticed I see "lavf" instead of "ffms" now. Basically it went from:

ffms[info]: 1814x1028p 1:1 @ 1846/77 fps (vfr)
to
lavf [info]: 1814x1028p 0:1 @ 24000/1001 fps (vfr)

This is everything great. The only downside is I can't see the % sign to know my encoding progress anymore. Would anyone know how to turn it on or something?

Motenai Yoda
18th May 2015, 04:00
the ones on x264.nl are quite old
http://git.videolan.org/?p=x264.git;a=commit;h=50a0c33b9b5fa57d0a129b7441a6af55f7a08005

zetsu_shoren
18th May 2015, 05:28
They are??? But isn't it the official (vanilla) site? Why would they have the old version there?

But anyway, I still would like to know why the .nl version does not allow 1272,720 (or can only do mod16, generally). I'm using Komisar's clear 10bit 64bit and it's everything I wanted.

foxyshadis
18th May 2015, 10:02
Good luck, x264.nl is owned by bob0r, and he's been MIA for years now. Most likely he just isn't interested anymore, but the site will stay online as long as the bills get paid.

I don't see anything in the changelog that would point to a difference, so it's probably just the switch to lavf.

Asmodian
19th May 2015, 01:25
They are??? But isn't it the official (vanilla) site? Why would they have the old version there?

I understand that the VideoLAN x264 page (http://www.videolan.org/developers/x264.html) is the new "official" page in light of what foxysadis's posted.