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)

Reply
 
Thread Tools Search this Thread Display Modes
Old 3rd May 2019, 14:11   #6801  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Quote:
I will try next time to see how much time will it take. Lossless x264 ultrafast 1080p is about 8 hours.
If you really need a lossless mezzanine that doesn't require much computational cost, I think you're better off with UTVideo.
Alternatively, you can use other lossless codecs like FFV1, HuffYUV or Lagarith, although my suggestion is UTVideo or FFV1.
FranceBB is offline   Reply With Quote
Old 3rd May 2019, 14:56   #6802  |  Link
~ VEGETA ~
The cult of personality
 
~ VEGETA ~'s Avatar
 
Join Date: May 2013
Location: Planet Vegeta
Posts: 155
Quote:
Originally Posted by FranceBB View Post
If you really need a lossless mezzanine that doesn't require much computational cost, I think you're better off with UTVideo.
Alternatively, you can use other lossless codecs like FFV1, HuffYUV or Lagarith, although my suggestion is UTVideo or FFV1.
I tried make it .yuv raw from virtualdub2 using ffv1 lossless, it took the same time as x264-10bit lossless if not a bit more.

Also, now x265 inputs it directly but it encodes it WAY much slower for IDK reason. Also file size is so freaking huge, maybe I did something bad despite using the exact same encoding commands:

Code:
x265_64bit_10bit.exe --preset slower --crf 17 --ref 6 --rd 6 --psy-rd 1 --ctu 32 --aq-strength 0.8 --output-depth 10 --input-res 1920x1080 --fps 24000/1001 --input "C:\videp.yuv" --output "C:\output.hevc" 

pause

Last edited by ~ VEGETA ~; 3rd May 2019 at 15:00.
~ VEGETA ~ is offline   Reply With Quote
Old 4th May 2019, 07:12   #6803  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Quote:
Also file size is so freaking huge
That's not surprising, considering that lossless codecs have limited algorithms to use in order to achieve a compression; as to the uncompressed .yuv file, well, uncompressed is uncompressed.

Quote:
it took the same time as x264-10bit lossless if not a bit more.
Oh... I didn't expect that- Apparently x264 lossless is more optimized or perhaps it's because you used VirtualDub rather than ffmpeg to encode it.

Quote:
now x265 inputs it directly but it encodes it WAY much slower
I didn't expect that. Encoding an uncompressed yuv source shouldn't take more than encoding an uncompressed A/V stream like the one Avisynth pipes to x265 nor encoding a lossless x264 source.
I mean, x265 is still gonna use its internal decoder to take the source in input, right?
Encoding-wise, I wonder whether its own internal decoder is more optimized for taking one thing in input rather than the other, or perhaps is just the way things have been allocated... but that cannot be since each source is lossless and there are little differences on filesize to justify a big speed different, besides compressed lossless, although with less space, still have to be "decoded", while uncompressed lossless files are ready to go but way bigger, so perhaps the hard drive is not fast enough to justify an uncompressed source as it takes longer to buffer it than decoding a losslessly compressed one... I don't know.
Perhaps someone can enlighten me as well about this.

Last edited by FranceBB; 4th May 2019 at 07:17.
FranceBB is offline   Reply With Quote
Old 4th May 2019, 07:27   #6804  |  Link
Wolfberry
Helenium(Easter)
 
Wolfberry's Avatar
 
Join Date: Aug 2017
Location: Hsinchu, Taiwan
Posts: 99
x265-3.0_Au+24-4217e691387c-win64-multilib

Code:
x265 [info]: HEVC encoder version 3.0_Au+24-4217e691387c
x265 [info]: build info [Windows][GCC 9.1.1][64 bit] 8bit+10bit+12bit
x265 [info]: (libavcodec  58.52.101)
x265 [info]: (libavformat 58.27.103)
x265 [info]: (libavutil   56.26.101)
x265 [info]: (lsmash       2.16.1)
__________________
Monochrome Anomaly

Last edited by Wolfberry; 16th May 2019 at 04:05.
Wolfberry is offline   Reply With Quote
Old 4th May 2019, 08:56   #6805  |  Link
Leeloo Minaļ
Registered User
 
Join Date: Nov 2007
Posts: 50
Quote:
now x265 inputs it directly but it encodes it WAY much slower
FFV1 offers one of the most efficient compression rate, size-wise, but it is also slow as hell.
And if it is slower than others lossless codecs in compression, it is also slower in decompression !

I am not surprised that x265 encoded slower too, you should try UTVideo instead.
Leeloo Minaļ is offline   Reply With Quote
Old 13th May 2019, 05:29   #6806  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
The help output has one dash too much I think:

Code:
---hrd-concat            Set HRD concatenation flag for the first keyframe in the buffering period SEI. Default disabled
stax76 is offline   Reply With Quote
Old 13th May 2019, 18:37   #6807  |  Link
MeteorRain
結城有紀
 
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 894
Quote:
Originally Posted by ~ VEGETA ~ View Post
I tried make it .yuv raw from virtualdub2 using ffv1 lossless
Did you say you make .yuv raw using ffv1 lossless? So would that be an AVI file instead?
__________________
Projects
x265 - Yuuki-Asuna-mod Download / GitHub
TS - ADTS AAC Splitter | LATM AAC Splitter | BS4K-ASS
Neo AviSynth+ filters - F3KDB | FFT3D | DFTTest | MiniDeen | Temporal Median
MeteorRain is offline   Reply With Quote
Old 15th May 2019, 22:59   #6808  |  Link
iAvoe
Registered User
 
Join Date: Sep 2017
Posts: 18
I wish the next x265 update or build can get rid of piping files in. Something like a straight file input as x264 builds (I'm not sure why it's not working through so many years tho)
iAvoe is offline   Reply With Quote
Old 15th May 2019, 23:21   #6809  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Quote:
Originally Posted by iAvoe View Post
I wish the next x265 update or build can get rid of piping files in. Something like a straight file input as x264 builds (I'm not sure why it's not working through so many years tho)
No one is making a build with ffmpeg integrated is why.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 16th May 2019, 00:34   #6810  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
*cough*. We're still on the same forum page.

LAVF input is only supported through patches. MCW more or less put the kibosh on the idea of it being in the upstream source a few years ago, IIRC. Something about not wanting to deal with the maintenance burden of input modules other than raw and y4m, as I recall.

I mean, I use the LAVF support patches for my personal builds of x265 CLI, but more often than not, I just use libx265 through FFmpeg, which is probably more what MCW expects people to do if they want all the exotic input file support.
qyot27 is offline   Reply With Quote
Old 16th May 2019, 00:49   #6811  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 447
Last time I tested avs input with this patch was quite slower than avs2yuv+x265.
StvG is offline   Reply With Quote
Old 16th May 2019, 07:08   #6812  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,988
+1 for just using ffmpeg

The only downside AFAICT is when you want to use qpfiles, this still requires piping. I'm sure there are other things too, but this is a big one
Blue_MiSfit is offline   Reply With Quote
Old 16th May 2019, 09:14   #6813  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
How do I use the patch?

x265.exe --crf 18 --output C:\out.hevc C:\test.avs

Code:
[avs2 @ 0000000002763500] Format avs2 detected only with low score of 1, misdetection possible!
[avs2 @ 0000000002763500] Could not find codec parameters for stream 0 (Video: avs2, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[NULL @ 0000000002747480] No codec provided to avcodec_open2()
[NULL @ 0000000002747480] No codec provided to avcodec_open2()
lavf [error]: could not find decoder for video stream
x265 [error]: unable to open input file <C:\Users\frank\Daten\Samples\test_temp\test.avs>
stax76 is offline   Reply With Quote
Old 16th May 2019, 16:53   #6814  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
Quote:
Originally Posted by Blue_MiSfit View Post
+1 for just using ffmpeg

The only downside AFAICT is when you want to use qpfiles, this still requires piping. I'm sure there are other things too, but this is a big one
Do you mean zonefile? qpfile isn't marked with a CLI only disclaimer in the docs, so I'd assume it's usable through -x265-params. Most of the stuff marked as CLI only wouldn't be relevant to libx265 use anyway.

Quote:
Originally Posted by stax76
How do I use the patch?
Build the patched x265 source against an FFmpeg that has AviSynth support enabled first.
qyot27 is offline   Reply With Quote
Old 16th May 2019, 17:27   #6815  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
Quote:
Originally Posted by StvG View Post
Last time I tested avs input with this patch was quite slower than avs2yuv+x265.
Don't use 32-bit builds of x265 to encode high bit depth. They have no asm.

Proof:
Code:
J:\>x265 --preset ultrafast --crf 18 -o test-direct.mkv testavi.avs
lavf [info]:
 Format    : avisynth
 Codec     : rawvideo ( raw video )
 PixFmt    : yuv422p
 Framerate : 24000/1001
 Timebase  : 1001/24000
 Duration  : 0:00:10
lavf [info]: 1920x1080 fps 24000/1001 i422p8 frames 0 - 239 of 240
x265 [info]: Using preset ultrafast & tune none
mkv  [info]: output file: test-direct.mkv
x265 [info]: HEVC encoder version 2.9+2-7e978ed93d608697
x265 [info]: build info [Windows][GCC 8.2.0][64 bit]  8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
x265 [info]: Main 4:2:2 10 profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 4 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 2 / wpp(34 rows)
x265 [info]: Coding QT: max CU size, min CU size : 32 / 16
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : dia / 57 / 0 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 23 / 250 / 0 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 5 / 3 / 0
x265 [info]: b-pyramid / weightp / weightb       : 1 / 0 / 0
x265 [info]: References / ref-limit  cu / depth  : 1 / off / off
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 0.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-18.0 / 0.60
x265 [info]: tools: rd=2 psy-rd=2.00 early-skip rskip tmvp fast-intra
x265 [info]: tools: strong-intra-smoothing lslices=6 deblock
x265 [info]: frame I:      1, Avg QP:22.97  kb/s: 119.50
x265 [info]: frame P:     60, Avg QP:22.41  kb/s: 5591.55
x265 [info]: frame B:    179, Avg QP:25.33  kb/s: 1784.29
x265 [info]: consecutive B-frames: 1.6% 0.0% 1.6% 96.7%

encoded 240 frames in 16.02s (14.99 fps), 2729.17 kb/s, Avg QP:24.59

J:\>avs2yuv testavi.avs -o - | x265 --y4m --preset ultrafast --crf 18 -o test-pipe.mkv -
testavi.avs: 1920x1080, 24000/1001 fps, 240 frames
converting input clip to YV12
y4m  [info]: 1920x1080 fps 24000/1001 i420p8 unknown frame count
x265 [info]: Using preset ultrafast & tune none
mkv  [info]: output file: test-pipe.mkv
x265 [info]: HEVC encoder version 2.9+2-7e978ed93d608697
x265 [info]: build info [Windows][GCC 8.2.0][64 bit]  8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 4 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 2 / wpp(34 rows)
x265 [info]: Coding QT: max CU size, min CU size : 32 / 16
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : dia / 57 / 0 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 23 / 250 / 0 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 5 / 3 / 0
x265 [info]: b-pyramid / weightp / weightb       : 1 / 0 / 0
x265 [info]: References / ref-limit  cu / depth  : 1 / off / off
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 0.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-18.0 / 0.60
x265 [info]: tools: rd=2 psy-rd=2.00 early-skip rskip tmvp fast-intra
x265 [info]: tools: strong-intra-smoothing lslices=6 deblock
x265 [info]: frame I:      1, Avg QP:22.97  kb/s: 116.81
x265 [info]: frame P:     60, Avg QP:22.44  kb/s: 4963.89
x265 [info]: frame B:    179, Avg QP:25.33  kb/s: 1607.71
x265 [info]: consecutive B-frames: 1.6% 0.0% 1.6% 96.7%

encoded 240 frames in 14.40s (16.67 fps), 2440.54 kb/s, Avg QP:24.60

J:\>
Summary:
Direct input of testavi.avs to 64-bit x265 with LAVF input: 14.99 fps
Piping from 32-bit avs2yuv bm2 to 64-bit x265: 16.67 fps

That's not 'quite slower', it's within the margin of error (especially considering the overhead of having the libav* libraries loaded in the x265 process). Re-running the test with the script converting to 4:2:0 before handing it to x265 or avs2yuv bm3 flipped the values around: direct use was faster than piping:

Code:
J:\>x265 --preset ultrafast --crf 18 -o testdirect.mkv testavi.avs
lavf [info]:
 Format    : avisynth
 Codec     : rawvideo ( raw video )
 PixFmt    : yuv420p
 Framerate : 24000/1001
 Timebase  : 1001/24000
 Duration  : 0:00:10
lavf [info]: 1920x1080 fps 24000/1001 i420p8 frames 0 - 239 of 240
x265 [info]: Using preset ultrafast & tune none
mkv  [info]: output file: testdirect.mkv
x265 [info]: HEVC encoder version 2.9+2-7e978ed93d608697
x265 [info]: build info [Windows][GCC 8.2.0][64 bit]  8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 4 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 2 / wpp(34 rows)
x265 [info]: Coding QT: max CU size, min CU size : 32 / 16
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : dia / 57 / 0 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 23 / 250 / 0 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 5 / 3 / 0
x265 [info]: b-pyramid / weightp / weightb       : 1 / 0 / 0
x265 [info]: References / ref-limit  cu / depth  : 1 / off / off
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 0.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-18.0 / 0.60
x265 [info]: tools: rd=2 psy-rd=2.00 early-skip rskip tmvp fast-intra
x265 [info]: tools: strong-intra-smoothing lslices=6 deblock
x265 [info]: frame I:      1, Avg QP:22.97  kb/s: 116.81
x265 [info]: frame P:     60, Avg QP:22.44  kb/s: 4963.89
x265 [info]: frame B:    179, Avg QP:25.33  kb/s: 1607.71
x265 [info]: consecutive B-frames: 1.6% 0.0% 1.6% 96.7%

encoded 240 frames in 14.11s (17.01 fps), 2440.54 kb/s, Avg QP:24.60

J:\>avs2yuv testavi.avs -o - | x265 --y4m --preset ultrafast --crf 18 -o testdirect.mkv -
testavi.avs: 1920x1080, 24000/1001 fps, 240 frames
y4m  [info]: 1920x1080 fps 24000/1001 i420p8 unknown frame count
x265 [info]: Using preset ultrafast & tune none
mkv  [info]: output file: testdirect.mkv
x265 [info]: HEVC encoder version 2.9+2-7e978ed93d608697
x265 [info]: build info [Windows][GCC 8.2.0][64 bit]  8bit+10bit+12bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
x265 [info]: Main profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 4 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 2 / wpp(34 rows)
x265 [info]: Coding QT: max CU size, min CU size : 32 / 16
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : dia / 57 / 0 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 23 / 250 / 0 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 5 / 3 / 0
x265 [info]: b-pyramid / weightp / weightb       : 1 / 0 / 0
x265 [info]: References / ref-limit  cu / depth  : 1 / off / off
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 0.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-18.0 / 0.60
x265 [info]: tools: rd=2 psy-rd=2.00 early-skip rskip tmvp fast-intra
x265 [info]: tools: strong-intra-smoothing lslices=6 deblock
x265 [info]: frame I:      1, Avg QP:22.97  kb/s: 116.81
x265 [info]: frame P:     60, Avg QP:22.44  kb/s: 4963.89
x265 [info]: frame B:    179, Avg QP:25.33  kb/s: 1607.71
x265 [info]: consecutive B-frames: 1.6% 0.0% 1.6% 96.7%

encoded 240 frames in 14.35s (16.72 fps), 2440.54 kb/s, Avg QP:24.60

J:\>
Direct: 17.01 fps
Piped: 16.72 fps

The DJATOM fork of avs2yuv is, amusingly, only relevant for 64-bit tests. The 32-bit build would be comparing apples to oranges.

Last edited by qyot27; 16th May 2019 at 17:36.
qyot27 is offline   Reply With Quote
Old 16th May 2019, 17:45   #6816  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 447
Never used 32-bit x265.
Try the latest version. Also I don't pipe 32-bit avs to 64-bit x265. Using avs2yuv_x64 for 64-bit avs+ to 64-bit x265.

Edit:
Avs script
Code:
ffvideosource("4K.sample.mkv")
z_convertformat(width/2, height/2, resample_filter="spline36")
pipe - avs2yuv_x64 + x265
Code:
avs2yuv_x64 -depth 10 1.avs -o - | x265.exe --y4m - --ctu 32 --preset ultrafast -o nul --pools 10 --frame-threads 2 > pipe.txt 2>&1

y4m  [info]: 1920x1080 fps 24000/1001 i420p10 unknown frame count
raw  [info]: output file: nul
x265 [info]: HEVC encoder version 3.0_Au+25-39b35ea86283
x265 [info]: build info [Windows][GCC 9.1.1][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main 10 profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 10 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 2 / wpp(34 rows)
x265 [info]: Coding QT: max CU size, min CU size : 32 / 16
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : dia / 57 / 0 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 23 / 250 / 0 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 5 / 3 / 0
x265 [info]: b-pyramid / weightp / weightb       : 1 / 0 / 0
x265 [info]: References / ref-limit  cu / depth  : 1 / off / off
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 0.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-28.0 / 0.60
x265 [info]: tools: rd=2 psy-rd=2.00 early-skip rskip tmvp fast-intra
x265 [info]: tools: strong-intra-smoothing lslices=6 deblock

x265 [info]: frame I:     18, Avg QP:30.77  kb/s: 3755.34 
x265 [info]: frame P:   1084, Avg QP:32.66  kb/s: 714.73  
x265 [info]: frame B:   3214, Avg QP:35.33  kb/s: 158.74  
x265 [info]: consecutive B-frames: 1.5% 1.2% 1.4% 95.9% 

encoded 4316 frames in 45.50s (94.85 fps), 313.38 kb/s, Avg QP:34.64
no pipe
Code:
x265.exe 1.avs --ctu 32 --preset ultrafast -o nul --pools 10 --frame-threads 2 > no_pipe.txt 2>&1

lavf [info]: 
 Format    : avisynth
 Codec     : rawvideo ( raw video )
 PixFmt    : yuv420p10le
 Framerate : 24000/1001
 Timebase  : 1001/24000
 Duration  : 0:03:00
lavf [info]: 1920x1080 fps 24000/1001 i420p10 frames 0 - 4315 of 4316
raw  [info]: output file: nul
x265 [info]: HEVC encoder version 3.0_Au+25-39b35ea86283
x265 [info]: build info [Windows][GCC 9.1.1][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x265 [info]: Main 10 profile, Level-4 (Main tier)
x265 [info]: Thread pool created using 10 threads
x265 [info]: Slices                              : 1
x265 [info]: frame threads / pool features       : 2 / wpp(34 rows)
x265 [info]: Coding QT: max CU size, min CU size : 32 / 16
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge         : dia / 57 / 0 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 23 / 250 / 0 / 5.00
x265 [info]: Lookahead / bframes / badapt        : 5 / 3 / 0
x265 [info]: b-pyramid / weightp / weightb       : 1 / 0 / 0
x265 [info]: References / ref-limit  cu / depth  : 1 / off / off
x265 [info]: AQ: mode / str / qg-size / cu-tree  : 1 / 0.0 / 32 / 1
x265 [info]: Rate Control / qCompress            : CRF-28.0 / 0.60
x265 [info]: tools: rd=2 psy-rd=2.00 early-skip rskip tmvp fast-intra
x265 [info]: tools: strong-intra-smoothing lslices=6 deblock

x265 [info]: frame I:     18, Avg QP:30.77  kb/s: 3755.34 
x265 [info]: frame P:   1084, Avg QP:32.66  kb/s: 714.73  
x265 [info]: frame B:   3214, Avg QP:35.33  kb/s: 158.74  
x265 [info]: consecutive B-frames: 1.5% 1.2% 1.4% 95.9% 

encoded 4316 frames in 52.69s (81.91 fps), 313.38 kb/s, Avg QP:34.64
It's my bad that I wrote "quite slower", I should write just "slower", but I was surprised that the difference is >10%, I expected to be marginal within statistical error (~1%).

Last edited by StvG; 16th May 2019 at 20:29.
StvG is offline   Reply With Quote
Old 16th May 2019, 21:31   #6817  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
Quote:
Originally Posted by StvG View Post
Never used 32-bit x265.
Try the latest version. Also I don't pipe 32-bit avs to 64-bit x265. Using avs2yuv_x64 for 64-bit avs+ to 64-bit x265.

Edit:
Avs script
Code:
ffvideosource("4K.sample.mkv")
z_convertformat(width/2, height/2, resample_filter="spline36")
pipe - avs2yuv_x64 + x265
Code:
avs2yuv_x64 -depth 10 1.avs -o - | x265.exe --y4m - --ctu 32 --preset ultrafast -o nul --pools 10 --frame-threads 2 > pipe.txt 2>&1

y4m  [info]: 1920x1080 fps 24000/1001 i420p10 unknown frame count
raw  [info]: output file: nul
x265 [info]: HEVC encoder version 3.0_Au+25-39b35ea86283
x265 [info]: build info [Windows][GCC 9.1.1][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2

...snip...

encoded 4316 frames in 45.50s (94.85 fps), 313.38 kb/s, Avg QP:34.64
no pipe
Code:
x265.exe 1.avs --ctu 32 --preset ultrafast -o nul --pools 10 --frame-threads 2 > no_pipe.txt 2>&1

lavf [info]: 
 Format    : avisynth
 Codec     : rawvideo ( raw video )
 PixFmt    : yuv420p10le
 Framerate : 24000/1001
 Timebase  : 1001/24000
 Duration  : 0:03:00
lavf [info]: 1920x1080 fps 24000/1001 i420p10 frames 0 - 4315 of 4316
raw  [info]: output file: nul
x265 [info]: HEVC encoder version 3.0_Au+25-39b35ea86283
x265 [info]: build info [Windows][GCC 9.1.1][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2

...snip...

encoded 4316 frames in 52.69s (81.91 fps), 313.38 kb/s, Avg QP:34.64
It's my bad that I wrote "quite slower", I should write just "slower", but I was surprised that the difference is >10%, I expected to be marginal within statistical error (~1%).
Using the same options and bm5 binary of avs2yuv, the x265 binary I built a week ago (rather than one from last October), a longer chunk of frames as a representative sample, and having moved all the relevant input files and avs2yuv binaries to my SSD rather than running it from a USB 3.0 flash drive:

Script:
Code:
FFVideoSource("test.mp4").ConvertBits(10)
Piped:
Code:
E:\>avs2yuv64 -depth 10 test.avs -o - | x265.exe --y4m - --ctu 32 --preset ultrafast --output-depth 10 -o nul --pools 10 --frame-threads 2 --frames 2400
test.avs: 1920x1080, YUV420P10, 10-bits, progressive, 24000/1001 fps, 31122 frames
y4m  [info]: 1920x1080 fps 24000/1001 i420p10 unknown frame count
x265 [info]: Using preset ultrafast & tune none
raw  [info]: output file: nul
x265 [info]: HEVC encoder version 3.0_Au+22-feec4bdf98663ac4
x265 [info]: build info [Windows][GCC 9.1.0][64 bit]  10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2

...snip...

encoded 2400 frames in 164.00s (14.63 fps), 1002.53 kb/s, Avg QP:34.62
error: wrote only 6096584 of 6220800 bytes
Direct:
Code:
E:\>x265.exe test.avs --ctu 32 --preset ultrafast --output-depth 10 -o nul --pools 10 --frame-threads 2 --frames 2400
lavf [info]:
 Format    : avisynth
 Codec     : rawvideo ( raw video )
 PixFmt    : yuv420p10le
 Framerate : 24000/1001
 Timebase  : 1001/24000
 Duration  : 0:21:38
lavf [info]: 1920x1080 fps 24000/1001 i420p10 frames 0 - 2399 of 31122
x265 [info]: Using preset ultrafast & tune none
raw  [info]: output file: nul
x265 [info]: HEVC encoder version 3.0_Au+22-feec4bdf98663ac4
x265 [info]: build info [Windows][GCC 9.1.0][64 bit]  10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2

...snip...

encoded 2400 frames in 160.87s (14.92 fps), 1002.53 kb/s, Avg QP:34.62
Piped: 14.63 fps
Direct: 14.92 fps

I even enabled MT (Prefetch(4)).

Piped:
Code:
E:\>avs2yuv64 -depth 10 test.avs -o - | x265.exe --y4m - --ctu 32 --preset ultrafast --output-depth 10 -o nul --pools 10
 --frame-threads 2 --frames 2400
test.avs: 1920x1080, YUV420P10, 10-bits, progressive, 24000/1001 fps, 31122 frames
y4m  [info]: 1920x1080 fps 24000/1001 i420p10 unknown frame count
x265 [info]: Using preset ultrafast & tune none
raw  [info]: output file: nul
x265 [info]: HEVC encoder version 3.0_Au+22-feec4bdf98663ac4
x265 [info]: build info [Windows][GCC 9.1.0][64 bit]  10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2

...snip...

encoded 2400 frames in 172.52s (13.91 fps), 1002.53 kb/s, Avg QP:34.62
error: wrote only 6096584 of 6220800 bytes
Direct:
Code:
E:\>x265.exe test.avs --ctu 32 --preset ultrafast --output-depth 10 -o nul --pools 10 --frame-threads 2 --frames 2400
lavf [info]:
 Format    : avisynth
 Codec     : rawvideo ( raw video )
 PixFmt    : yuv420p10le
 Framerate : 24000/1001
 Timebase  : 1001/24000
 Duration  : 0:21:38
lavf [info]: 1920x1080 fps 24000/1001 i420p10 frames 0 - 2399 of 31122
x265 [info]: Using preset ultrafast & tune none
raw  [info]: output file: nul
x265 [info]: HEVC encoder version 3.0_Au+22-feec4bdf98663ac4
x265 [info]: build info [Windows][GCC 9.1.0][64 bit]  10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2

...snip...

encoded 2400 frames in 166.78s (14.39 fps), 1002.53 kb/s, Avg QP:34.62
qyot27 is offline   Reply With Quote
Old 16th May 2019, 21:48   #6818  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 447
Maybe bottleneck for you is x265 so the speed difference between direct and piped is killed?
Here is x265 I built for the test above.

Edit:
tested with crf 18
pipe
Code:
avs2yuv_x64 -depth 10 1.avs -o - | x265.exe --y4m - --ctu 32 --preset ultrafast -o nul --pools 10 --crf 18 --frame-threads 2 > pipe.txt 2>&1

y4m  [info]: 1920x1080 fps 24000/1001 i420p10 unknown frame count
raw  [info]: output file: nul
x265 [info]: HEVC encoder version 3.0_Au+25-39b35ea86283
x265 [info]: build info [Windows][GCC 9.1.1][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2

encoded 4316 frames in 50.39s (85.64 fps), 1629.90 kb/s, Avg QP:24.65
direct
Code:
x265.exe 1.avs --ctu 32 --preset ultrafast -o nul --pools 10 --crf 18 --frame-threads 2 > direct.txt 2>&1

lavf [info]: 
 Format    : avisynth
 Codec     : rawvideo ( raw video )
 PixFmt    : yuv420p10le
 Framerate : 24000/1001
 Timebase  : 1001/24000
 Duration  : 0:03:00
lavf [info]: 1920x1080 fps 24000/1001 i420p10 frames 0 - 4315 of 4316
raw  [info]: output file: nul
x265 [info]: HEVC encoder version 3.0_Au+25-39b35ea86283
x265 [info]: build info [Windows][GCC 9.1.1][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2

encoded 4316 frames in 55.19s (78.21 fps), 1629.90 kb/s, Avg QP:24.65
tested with crf 18 and asm sse4.2
pipe
Code:
avs2yuv_x64 -depth 10 1.avs -o - | x265.exe --y4m - --ctu 32 --preset ultrafast -o nul --pools 10 --crf 18 --frame-threads 2 > pipe.txt 2>&1 --asm sse4.2

y4m  [info]: 1920x1080 fps 24000/1001 i420p10 unknown frame count
raw  [info]: output file: nul
x265 [info]: HEVC encoder version 3.0_Au+25-39b35ea86283
x265 [info]: build info [Windows][GCC 9.1.1][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2

encoded 4316 frames in 58.54s (73.73 fps), 1629.90 kb/s, Avg QP:24.65
direct
Code:
x265.exe 1.avs --ctu 32 --preset ultrafast -o nul --pools 10 --crf 18 --frame-threads 2 > direct.txt 2>&1 --asm sse4.2

lavf [info]: 
 Format    : avisynth
 Codec     : rawvideo ( raw video )
 PixFmt    : yuv420p10le
 Framerate : 24000/1001
 Timebase  : 1001/24000
 Duration  : 0:03:00
lavf [info]: 1920x1080 fps 24000/1001 i420p10 frames 0 - 4315 of 4316
raw  [info]: output file: nul
x265 [info]: HEVC encoder version 3.0_Au+25-39b35ea86283
x265 [info]: build info [Windows][GCC 9.1.1][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2

encoded 4316 frames in 61.19s (70.53 fps), 1629.90 kb/s, Avg QP:24.65
tested real encoding scenario where bottleneck is x265
pipe
Code:
avs2yuv_x64 -depth 10 1.avs -o - | x265.exe --y4m - --ctu 32 --preset slower --crf 18 -o nul --frame-threads 2 --no-amp --no-sao --no-strong-intra-smoothing > pipe.txt 2>&1 --asm avx512

y4m  [info]: 1920x1080 fps 24000/1001 i420p10 unknown frame count
raw  [info]: output file: nul
x265 [info]: HEVC encoder version 3.0_Au+25-39b35ea86283
x265 [info]: build info [Windows][GCC 9.1.1][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512

encoded 501 frames in 153.32s (3.27 fps), 10340.94 kb/s, Avg QP:22.84
direct
Code:
x265.exe 1.avs --ctu 32 --preset slower --crf 18 -o nul --frame-threads 2 --no-amp --no-sao --no-strong-intra-smoothing > direct.txt 2>&1 --asm avx512

lavf [info]: 
 Format    : avisynth
 Codec     : rawvideo ( raw video )
 PixFmt    : yuv420p10le
 Framerate : 24000/1001
 Timebase  : 1001/24000
 Duration  : 0:00:20
lavf [info]: 1920x1080 fps 24000/1001 i420p10 frames 0 - 500 of 501
raw  [info]: output file: nul
x265 [info]: HEVC encoder version 3.0_Au+25-39b35ea86283
x265 [info]: build info [Windows][GCC 9.1.1][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512

encoded 501 frames in 153.33s (3.27 fps), 10340.94 kb/s, Avg QP:22.84

Last edited by StvG; 16th May 2019 at 22:32.
StvG is offline   Reply With Quote
Old 17th May 2019, 00:56   #6819  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
Quote:
Originally Posted by StvG View Post
Maybe bottleneck for you is x265 so the speed difference between direct and piped is killed?
On a Celeron J3455? Incredibly likely. The lack of AVX2 alone probably makes the biggest difference.

If you use FFmpeg with libx265, what fps does it pull? If it's close to the same speed as the LAVF input in x265, the difference is due to the way the libavformat AviSynth demuxer is written.
qyot27 is offline   Reply With Quote
Old 17th May 2019, 03:03   #6820  |  Link
StvG
Registered User
 
Join Date: Jul 2018
Posts: 447
Almost the same speed as "direct"
Code:
ffmpeg.exe -i 1.avs -c:v libx265 -preset ultrafast -x265-params ctu=32:pools=10:frame-threads=2 -f rawvideo - > x265.txt 2>&1

ffmpeg version 7211e1c Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.1.1 (GCC) 20190517
  configuration: --enable-libx265 --enable-avisynth --extra-cflags='-march=core-avx2 -mtune=native -pipe -s -O2' --cpu=core-avx2 --disable-debug --enable-gpl --cross-prefix=x86_64-w64-mingw32- --target-os=mingw32 --arch=x86_64 --pkg-config-flags=--static --enable-zlib --disable-pthreads --enable-w32threads --enable-version3
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, avisynth, from '1.avs':
  Duration: 00:03:00.01, start: 0.000000, bitrate: 0 kb/s
    Stream #0:0: Video: rawvideo (Y3[11][10] / 0xA0B3359), yuv420p10le, 1920x1080, 23.98 fps, 23.98 tbr, 23.98 tbn, 23.98 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> hevc (libx265))
Press [q] to stop, [?] for help
x265 [info]: HEVC encoder version 3.0_Au+25-39b35ea86283
x265 [info]: build info [Windows][GCC 9.1.1][64 bit] 10bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2

Output #0, rawvideo, to 'pipe:':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: hevc (libx265), yuv420p10le, 1920x1080, q=2-31, 23.98 fps, 23.98 tbn, 23.98 tbc
    Metadata:
      encoder         : Lavc58.35.100 libx265

encoded 4316 frames in 52.01s (82.98 fps), 313.44 kb/s, Avg QP:34.64
StvG is offline   Reply With Quote
Reply

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 17:52.


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