zambelli
12th November 2010, 02:04
I'm trying to produce a series of H.264 encodes using x264 and for the purposes of testing I need to encode them as square pixel (either no SAR or SAR set to 1:1) even when the sources are anamorphic. Because the encoding is being done in batch it's most convenient for me to do the resizing inline using x264's "--video-filter resize" argument (as opposed to modifying the source Avisynth script).
Howver, it appears that when I use both "--video-filter resize" and "--sar" as arguments, the result is not what I expect at all.
For example, my source is 1920x816 in size (2.35:1 DAR). When I use the following command line:
x264_64.exe --pass 2 --bitrate 350 --video-filter resize:320,176 --sar 1:1 --ssim --output test.mp4 --profile high --preset slower --tune animation --keyint 48 --min-keyint 48 --no-scenecut source.avs
I get the following SAR as result:
x264 [info]: using SAR=22/17
So even though I explicitly specified SAR 1:1 on the command line, it seems that the DAR difference between 1920x816 and 320x176 is being used as the SAR.
What's interesting is that if I use the following command line:
x264_64.exe --pass 2 --bitrate 350 --video-filter resize:320,176 --sar 2:1 --ssim --output test.mp4 --profile high --preset slower --tune animation --keyint 48 --min-keyint 48 --no-scenecut source.avs
As a result I get:
x264 [info]: using SAR=33/17
So it would appear that x264 is using the 1920x816/320x176 DAR difference as SAR and then multiplying it by my user SAR.
My questions are:
1. Is this a bug or is it by design?
2. How can I completely override the SAR while still using "--video-filter"?
I'm using x264 build 0.107.1745 from Oct 10 2010.
P.S. It's nice to be back on Doom9 after a long break. :)
Howver, it appears that when I use both "--video-filter resize" and "--sar" as arguments, the result is not what I expect at all.
For example, my source is 1920x816 in size (2.35:1 DAR). When I use the following command line:
x264_64.exe --pass 2 --bitrate 350 --video-filter resize:320,176 --sar 1:1 --ssim --output test.mp4 --profile high --preset slower --tune animation --keyint 48 --min-keyint 48 --no-scenecut source.avs
I get the following SAR as result:
x264 [info]: using SAR=22/17
So even though I explicitly specified SAR 1:1 on the command line, it seems that the DAR difference between 1920x816 and 320x176 is being used as the SAR.
What's interesting is that if I use the following command line:
x264_64.exe --pass 2 --bitrate 350 --video-filter resize:320,176 --sar 2:1 --ssim --output test.mp4 --profile high --preset slower --tune animation --keyint 48 --min-keyint 48 --no-scenecut source.avs
As a result I get:
x264 [info]: using SAR=33/17
So it would appear that x264 is using the 1920x816/320x176 DAR difference as SAR and then multiplying it by my user SAR.
My questions are:
1. Is this a bug or is it by design?
2. How can I completely override the SAR while still using "--video-filter"?
I'm using x264 build 0.107.1745 from Oct 10 2010.
P.S. It's nice to be back on Doom9 after a long break. :)