VideoHelp Forum
+ Reply to Thread
Results 1 to 10 of 10
Thread
  1. Member
    Join Date
    Feb 2012
    Location
    India
    Search Comp PM
    I have been trying to make a proper encode with x265 (from x265.cc). I tested some 0.5 builds before.

    Now however since last night, I have been trying to make a simple encode out of it. Source is a BluRay.

    My AVS script

    Code:
    DirectShowSource("C:\axel\Encode\00023.m2ts", fps=23.976, audio=false, convertfps=true).AssumeFPS(24000,1001)
    crop(0, 140, 0, -140)
    Spline36Resize(1280,536)
    SelectRangeEvery(500,10)
    x265 log


    Code:
    C:\Users\Administrator>C:\axel\x265\avs4x265.exe --bitrate 4500 -o "C:\axel\x265\Dallas 720p.h265" "C:\dump\Dallas 720p.avs"
    avs  [info]: Avisynth 2.6+ detected, forcing conversion to YV12
    yuv  [info]: 1280x536 24000Hz C420, frames 0 - 3369 of 0
    x265 [info]: using cpu capabilities: MMX2 SSE SSE2Fast SSSE3 SSE4.2 AVX
    x265 [info]: HEVC encoder version 0.6+320-807495b7a9fc
    x265 [info]: build info [Windows][GCC 4.8.2][64 bit] 8bpp
    x265 [info]: Main profile, Level-6.2 (Main tier)
    x265 [info]: WPP streams / pool / frames  : 9 / 8 / 3
    x265 [info]: CU size                             : 64
    x265 [info]: Max RQT depth inter / intra         : 1 / 1
    x265 [info]: ME / range / subpel / merge         : hex / 60 / 2 / 2
    x265 [info]: Keyframe min / max                  : 250 / 250
    x265 [info]: Rate Control / AQ-Strength / CUTree : ABR-4500 kbps / 1.0 / 1
    x265 [info]: Lookahead / bframes / badapt        : 20 / 4 / 2
    x265 [info]: b-pyramid / weightp / refs          : 1 / 1 / 3
    x265 [info]: tools: rect amp rd=3 lft sao-lcu sign-hide
    x265 [info]: frame I: 321    kb/s: 165624.82
    x265 [info]: frame P: 750    kb/s: 11194.37
    x265 [info]: frame B: 2299   kb/s: 8613.36
    x265 [info]: global : 3370   kb/s: 24143.46
    x265 [info]: 303 of 750 (40.40%) P frames weighted
    
    
    encoded 3370 frames in 187.92s (17.93 fps), 24143.46 kb/s
    And for some reason while I give abr 4500, x265 encodes at strange bitrates and resulting file looks like this.

    http://imgur.com/pZzYbhO,8ufUtWA,UliLTqG,0egG2QH
    Quote Quote  
  2. maybe they broke the 1pass abr encoding mode somehow.
    Selecting 10 frames every 500 frames and thus probably having every 10 frames a scene change might be too much for the 1pass rate control.
    -> Have you tried:
    a. an older version of x265
    b. without the SelectRangeEvery ?
    Quote Quote  
  3. Member
    Join Date
    Feb 2012
    Location
    India
    Search Comp PM
    Ok It seems there is something odd going on here. Since I mostly have 24/25 fps sources at home thats what I have used to test x265.

    I made directshow change the input fps to 24 and it worked.


    Old avs script

    DirectShowSource("C:\axel\Encode\00023.m2ts", fps=23.976, audio=false, convertfps=true).AssumeFPS(24000,1001)
    New svs script

    DirectShowSource("C:\axel\Dalas.Encode\00023.m2ts" , fps=24.000, audio=false, convertfps=true).AssumeFPS(24,1)


    and rest of it is same.




    x265 log after changing fps


    Code:
    C:\Users\Administrator>C:\axel\x265\avs4x265.exe --bitrate 4500 -o "C:\axel\x265\Dallas 720p.h265" "C:\dump\Dallas 720p.avs"
    avs  [info]: Avisynth 2.6+ detected, forcing conversion to YV12
    yuv  [info]: 1280x536 24Hz C420, frames 0 - 3369 of 0
    x265 [info]: using cpu capabilities: MMX2 SSE SSE2Fast SSSE3 SSE4.2 AVX
    x265 [info]: HEVC encoder version 0.6+320-807495b7a9fc
    x265 [info]: build info [Windows][GCC 4.8.2][64 bit] 8bpp
    x265 [info]: Main profile, Level-3.1 (Main tier)
    x265 [info]: WPP streams / pool / frames  : 9 / 8 / 3
    x265 [info]: CU size                             : 64
    x265 [info]: Max RQT depth inter / intra         : 1 / 1
    x265 [info]: ME / range / subpel / merge         : hex / 60 / 2 / 2
    x265 [info]: Keyframe min / max                  : 250 / 250
    x265 [info]: Rate Control / AQ-Strength / CUTree : ABR-4500 kbps / 1.0 / 1
    x265 [info]: Lookahead / bframes / badapt        : 20 / 4 / 2
    x265 [info]: b-pyramid / weightp / refs          : 1 / 1 / 3
    x265 [info]: tools: rect amp rd=3 lft sao-lcu sign-hide
    x265 [info]: frame I: 326    kb/s: 33944.01
    x265 [info]: frame P: 743    kb/s: 2629.74
    x265 [info]: frame B: 2301   kb/s: 947.94
    x265 [info]: global : 3370   kb/s: 4510.64
    x265 [info]: 289 of 743 (38.90%) P frames weighted
    
    
    encoded 3370 frames in 383.09s (8.80 fps), 4510.64 kb/s
    http://i1.someimage.com/zcHajeu.png


    http://i1.someimage.com/d9PWjYK.png

    So x265 is having trouble with 23.976 fps or something wrong in my end?


    I will grab some more 23.976 stuff to test.
    Quote Quote  
  4. I don't use avs4x265, I don't use Avisynth+ and I also don't use DirectShowSource, but here x265 has no problem with 23.976 content, so my guess is that is it related to your end,..
    Quote Quote  
  5. Member
    Join Date
    Feb 2012
    Location
    India
    Search Comp PM
    I am sure Avisynth+ And DirectShowSource is not the issue because I use them for x264 encode all the time.

    However I will do test with avs2yuv to know if it's avs4x265.
    Quote Quote  
  6. Member
    Join Date
    Feb 2012
    Location
    India
    Search Comp PM
    Using avs2yuv 0.2 did testing again.

    x265 screwed up again. To make sure it's not avs2yuv I tried to do same test with x264 with normal result.

    Anyone know whats going wrong?

    x265



    x264




    x265 log

    Code:
    C:\Users\Administrator>"C:\dump\avs2yuv.exe" "C:\work\00.avs" -frames 2530 -o -| "C:\axel\x265\x265.exe" --input-res 1272x712 --fps 24 --input -  --frames 2530 --bitrate 3500 --output "C:\work\00.h265"
    yuv  [info]: 1272x712 24Hz C420, frames 0 - 2529 of 0
    x265 [info]: using cpu capabilities: MMX2 SSE SSE2Fast SSSE3 SSE4.2 AVX
    x265 [info]: HEVC encoder version 0.6+320-807495b7a9fc
    x265 [info]: build info [Windows][GCC 4.8.2][64 bit] 8bpp
    x265 [info]: Main profile, Level-3.1 (Main tier)
    x265 [info]: WPP streams / pool / frames  : 12 / 8 / 3
    x265 [info]: CU size                             : 64
    x265 [info]: Max RQT depth inter / intra         : 1 / 1
    x265 [info]: ME / range / subpel / merge         : hex / 60 / 2 / 2
    x265 [info]: Keyframe min / max                  : 250 / 250
    x265 [info]: Rate Control / AQ-Strength / CUTree : ABR-3500 kbps / 1.0 / 1
    x265 [info]: Lookahead / bframes / badapt        : 20 / 4 / 2
    x265 [info]: b-pyramid / weightp / refs          : 1 / 1 / 3
    x265 [info]: tools: rect amp rd=3 lft sao-lcu sign-hide
    C:\work\00.avs: 1272x712, 24 fps, 2530 frames
    x265 [info]: frame I: 169    kb/s: 11550.88
    x265 [info]: frame P: 800    kb/s: 3697.09
    x265 [info]: frame B: 1561   kb/s: 2585.35
    x265 [info]: global : 2530   kb/s: 3535.77
    x265 [info]: 414 of 800 (51.75%) P frames weighted
    
    encoded 2530 frames in 404.43s (6.26 fps), 3535.77 kb/s

    x264 Log

    Code:
    C:\Users\Administrator>"C:\dump\avs2yuv.exe" "C:\work\00.avs" -o - | "C:\x264.exe" - --stdin y4m --bitrate 3500 --output "C:\work\00.mkv"
    C:\work\00.avs: 1272x712, 24 fps, 2530 frames
    y4m [info]: 1272x712p 0:0 @ 24/1 fps (cfr)
    y4m [info]: color matrix: undef
    x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    x264 [info]: profile High, level 3.1
    x264 [info]: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1fade_compensate=0.00 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0constrained_intra=0 fgo=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=24 scenecut=40 intra_refresh=0rc_lookahead=40 rc=abr mbtree=1 bitrate=3500 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00 aq-sensitivity=10.00 aq-factor=1.00:1.00:1.00 aq2=0 aq3=0
    x264 [info]: started at Fri Jan 24 22:50:37 2014
    
    x264 [info]: frame I:243   Avg QP:13.86  size: 65054
    x264 [info]: frame P:1288  Avg QP:17.62  size: 19188
    x264 [info]: frame B:998   Avg QP:18.55  size:  6473
    x264 [info]: consecutive B-frames: 36.7% 29.6%  7.5% 26.3%
    x264 [info]: mb I  I16..4: 19.1% 63.8% 17.1%
    x264 [info]: mb P  I16..4:  6.5% 11.7%  1.8%  P16..4: 37.4% 13.9%  6.4%  0.0%  0.0%    skip:22.4%
    x264 [info]: mb B  I16..4:  0.3%  0.5%  0.1%  B16..8: 35.7%  4.8%  0.7%  direct: 6.0%  skip:52.0%  L0:39.8% L1:53.7% BI: 6.5%
    x264 [info]: final ratefactor: 17.01
    x264 [info]: 8x8 transform intra:61.1% inter:79.1%
    x264 [info]: coded y,uvDC,uvAC intra: 57.1% 73.2% 52.7% inter: 19.8% 31.2% 2.7%
    x264 [info]: i16 v,h,dc,p: 54% 17%  7% 23%
    x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 18% 25%  4%  5%  6%  6%  6%  6%
    x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 22% 13%  5%  7%  6%  6%  5%  4%
    x264 [info]: i8c dc,h,v,p: 52% 20% 21%  7%
    x264 [info]: Weighted P-Frames: Y:3.8% UV:2.4%
    x264 [info]: ref P L0: 70.8%  8.2% 15.2%  5.7%  0.1%
    x264 [info]: ref B L0: 89.2% 10.0%  0.8%
    x264 [info]: ref B L1: 95.8%  4.2%
    x264 [info]: kb/s:3566.91
    
    encoded 2529 frames, 44.72 fps, 3566.98 kb/s, 44.81 MB
    x264 [info]: ended at Fri Jan 24 22:51:34 2014
    x264 [info]: encoding duration 0:00:57
    Quote Quote  
  7. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Originally Posted by protoX View Post
    I am sure Avisynth+ And DirectShowSource is not the issue because I use them for x264 encode all the time.
    Downgrade to "normal" Avisynth, and see if this makes some difference
    Last edited by El Heggunte; 24th Jan 2014 at 17:07.
    Quote Quote  
  8. Member
    Join Date
    Feb 2012
    Location
    India
    Search Comp PM
    I have removed Avisynth+ and installed the stable 2.5.8 release. However that didn't do much help. Frames are still bad.

    However I encoded a file using Hybrid, which is making proper encodes. Hybrid won't show the complete command line for encodes. Any chance I could get it to find out what's going wrong?



    Code:
    C:\Users\Administrator>"C:\axel\avs2yuv.exe" "C:\work\robo.avs" -frames 2980 -o-| "C:\axel\x265.exe" --input-res 1280x720 --fps 23.976 --input -  --frames 2980 --bitrate 3500 --output "C:\work\00.h265"
    yuv  [info]: 1280x720 23Hz C420, frames 0 - 2979 of 0
    x265 [info]: using cpu capabilities: MMX2 SSE SSE2Fast SSSE3 SSE4.2 AVX
    x265 [info]: HEVC encoder version 0.6+324-237bf6667405
    x265 [info]: build info [Windows][GCC 4.8.2][32 bit] 8bpp
    x265 [info]: Main profile, Level-3.1 (Main tier)
    x265 [info]: WPP streams / pool / frames  : 12 / 8 / 3
    x265 [info]: CU size                             : 64
    x265 [info]: Max RQT depth inter / intra         : 1 / 1
    x265 [info]: ME / range / subpel / merge         : hex / 60 / 2 / 2
    x265 [info]: Keyframe min / max                  : 250 / 250
    x265 [info]: Rate Control / AQ-Strength / CUTree : ABR-3500 kbps / 1.0 / 1
    x265 [info]: Lookahead / bframes / badapt        : 20 / 4 / 2
    x265 [info]: b-pyramid / weightp / refs          : 1 / 1 / 3
    x265 [info]: tools: rect amp rd=3 lft sao-lcu sign-hide
    C:\work\robo.avs: 1280x720, 24000/1001 fps, 2980 frames
    x265 [info]: frame I: 181    kb/s: 12518.01
    x265 [info]: frame P: 2798   kb/s: 2830.37
    x265 [info]: frame B: 1      kb/s: 365.98
    x265 [info]: global : 2980   kb/s: 3417.95
    x265 [info]: 240 of 2798 (8.58%) P frames weighted
    
    encoded 2980 frames in 694.05s (4.29 fps), 3417.96 kb/s

    Code:
    Filtering input files,..
    Analysing 1 input files,...
    analyzing: robo.avs
    starting auto routines for source number: 1
     -> finished auto routines for source number 1.
    Input is completely analysed,...
    Creating jobs for 1 sources,...
     -> Creating jobs for source 1,...
     -> Generating calls for: C:\work\robo.mp4
    adding x265 calls for source: 1
    createJobs for C:\work\robo.mp4
     optimizing the subJobs
    Added new job with id 19_25_58_4810
    Created jobs for:
     C:/work/robo.avs
    
    Starting Main@19:25:58.504:
    "C:\PROGRA~1\Hybrid\x265.exe" --input - --input-res 1280x720 --fps 23.976 --frames 575 --b-adapt 2 --bitrate 1500 --no-signhide --output "C:\Users\ADMINI~1\AppData\Local\Temp\1\robo_19_25_58_4810_01.265"
    x265 [info]: using cpu capabilities: MMX2 SSE SSE2Fast SSSE3 SSE4.2 AVX
    x265 [info]: HEVC encoder version 0.6+295-ce41ee0f5c8c
    x265 [info]: build info [Windows][GCC 4.8.2][64 bit] 8bpp
    x265 [info]: Main profile, Level-3.1 (Main tier)
    x265 [info]: WPP streams / pool / frames  : 12 / 8 / 3
    x265 [info]: CU size                             : 64
    x265 [info]: Max RQT depth inter / intra         : 1 / 1
    x265 [info]: ME / range / subpel / merge         : hex / 60 / 2 / 2
    x265 [info]: Keyframe min / max                  : 250 / 250
    x265 [info]: Rate Control / AQ-Strength / CUTree : ABR-1500 kbps / 1.0 / 1
    x265 [info]: Lookahead / bframes / badapt        : 20 / 4 / 2
    x265 [info]: b-pyramid / weightp / refs          : 1 / 1 / 3
    x265 [info]: tools: rect amp rd=3 lft sao-lcu
    encoded 575 frames in 147.07s (3.91 fps), 1480.02 kb/s
    x265 [info]: frame I: 6      kb/s: 3537.52
    x265 [info]: frame P: 294    kb/s: 2184.15
    x265 [info]: frame B: 275    kb/s: 682.36
    x265 [info]: global : 575    kb/s: 1480.02
    x265 [info]: 82 of 294 (27.89%) P frames weighted
    finished after 00:02:27.221
    
    Starting Main@19:28:25.745:
    "C:\PROGRA~1\Hybrid\MP4Box.exe" -add "C:\Users\ADMINI~1\AppData\Local\Temp\1\ROBO_1~1.265"#video:fps=23.976 -brand hvc1 -itags tool="Hybrid 2014.01.22.1" -tmp "C:\Users\Administrator\AppData\Local\Temp\1" -new "C:\work\19_25_58_4810__02.mp4"
    finished after 00:00:00.082
    finishedJob: 19_25_58_4810
    Job 19_25_58_4810 finished!
    Last edited by protoX; 25th Jan 2014 at 12:28.
    Quote Quote  
  9. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    it sounds to me that you are not feeding x265.exe a properly formated source or most likely you have a h265 decoder issue.
    Quote Quote  
  10. However I encoded a file using Hybrid, which is making proper encodes. Hybrid won't show the complete command line for encodes.
    "Disable Jobs->Minimize job command line" and you can see the complete callls.
    Also if you create a debug output file, it will also include the complete calls.
    (btw. Hybrid is using latest Avisynth 2.6 MT)
    Last edited by Selur; 25th Jan 2014 at 14:21.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!