VideoHelp Forum


Try DVDFab Video Downloader and rip Netflix video! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 25 of 25
Thread
  1. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    Hello!

    I'm new in encoding by x264 CLI, I have tried many parameters to encode with 2 pass but I've failed. All the time I got this after the first pass
    Although I don't put "--slow-firstpass" I get a very slow speed in the second pass about 1fps- 2 and this is a screenshot

    Click image for larger version

Name:	Screen.png
Views:	771
Size:	17.4 KB
ID:	35503


    My parameters are :

    C:\x264.exe\x264.exe --preset veryslow --ref 16 --pass 1 --bitrate 2000 --stats "H:\Movies\The Rise and Rise of Michael Rimmer -1970.aldo.CG.stats" --level 3.1 --b-adapt 2 --partitions all --bframes 8 --direct auto --output NUL "H:\Movies\The Rise and Rise of Michael Rimmer -1970.aldo.CG\Work\Encode.avs" --me umh --merange 28 --subme 10 --trellis 2 --vbv-bufsize 14000 --vbv-maxrate 14000 --ratetol 3.0 --no-fast-pskip --no-dct-decimate --deblock -2:-2 --b-pyramid normal --aq-strength 0.8 --psy-rd 1.2:0.25
    C:\x264.exe\x264.exe --preset veryslow --ref 16 --pass 2 --bitrate 2000 --stats "H:\Movies\The Rise and Rise of Michael Rimmer -1970.aldo.CG.stats" --level 3.1 --b-adapt 2 --partitions all --bframes 8 --direct auto --output "H:\Movies.mkv" "H:\Movies\The Rise and Rise of Michael Rimmer -1970.aldo.CG\Work\Encode.avs" --me umh --merange 28 --subme 10 --trellis 2 --vbv-bufsize 14000 --vbv-maxrate 14000 --ratetol 3.0 --no-fast-pskip --no-dct-decimate --deblock -2:-2 --b-pyramid normal --aq-strength 0.8 --psy-rd 1.2:0.25 --sar 64:45

    pause
    Thanks in advance
    Last edited by TeNSoR; 3rd Feb 2016 at 08:00.
    Quote Quote  
  2. What is your CPU? Is the speed limited by your avs script? Benchmark the script without encoding, i.e.:
    avs2pipemod.exe -benchmark "script.avs"
    Quote Quote  
  3. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    It's intel icore7. my script has no filters at all because the source is PAL "progressive" just I put d2v and cropped it.
    Quote Quote  
  4. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    Originally Posted by sneaker View Post
    What is your CPU? Is the speed limited by your avs script? Benchmark the script without encoding, i.e.:
    avs2pipemod.exe -benchmark "script.avs"

    Here :

    Click image for larger version

Name:	Screen2.png
Views:	266
Size:	786.8 KB
ID:	35505
    Quote Quote  
  5. Formerly 'vaporeon800' Brad's Avatar
    Join Date
    Apr 2001
    Location
    Vancouver, Canada
    Search PM
    You're using the "veryslow" preset. What did you expect?? I must be missing something.
    Quote Quote  
  6. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    Originally Posted by vaporeon800 View Post
    You're using the "veryslow" preset. What did you expect?? I must be missing something.
    That's true but I tried the same parameters on " Simple x264 Lancher" and I got "15 fps" in pass 2.
    Quote Quote  
  7. Originally Posted by TeNSoR View Post
    Originally Posted by vaporeon800 View Post
    You're using the "veryslow" preset. What did you expect?? I must be missing something.
    That's true but I tried the same parameters on " Simple x264 Lancher" and I got "15 fps" in pass 2.


    Which versions are you using ?

    x264 --help will tell you the core and version

    If there is a problem with that CLI build, try another
    Quote Quote  
  8. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    I have the latest version

    Click image for larger version

Name:	Screen3.png
Views:	402
Size:	2.3 KB
ID:	35508


    Name:  Screen4.png
Views: 981
Size:  1.8 KB
    Last edited by TeNSoR; 3rd Feb 2016 at 10:37.
    Quote Quote  
  9. "latest" version isn't always the "best" . Sometimes bugs are introduced. Is it "vanilla" version or where did you download if from ? Try older version or download another build from somewhere else

    What happens if you use the x264.exe directly from "simple x264 launcher" ? IIRC it's using a 64bit "bridge" with avs4x264mod , but you're probably using avs input directly into 32bit x264. But 64bit x264 shouldn't be 5x faster, maybe only 5-10% at most.
    Quote Quote  
  10. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    Okay, Poisondeathray I will try an older version. This release I downloaded from here "videohelp"
    Quote Quote  
  11. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    Originally Posted by poisondeathray View Post
    "latest" version isn't always the "best" . Sometimes bugs are introduced. Is it "vanilla" version or where did you download if from ? Try older version or download another build from somewhere else

    What happens if you use the x264.exe directly from "simple x264 launcher" ? IIRC it's using a 64bit "bridge" with avs4x264mod , but you're probably using avs input directly into 32bit x264. But 64bit x264 shouldn't be 5x faster, maybe only 5-10% at most.
    Yes. I use x264 win 32 and avs input directly into 32bit x264 version.
    Quote Quote  
  12. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    I tried older versions on a video sample but the same problem.
    Quote Quote  
  13. 3 fps vs. 15 fps - It doesn't make any sense. Simple x264 launcher uses x264.exe too - are you sure you were using the same settings ?

    Post the log file from simple x264 launcher
    Quote Quote  
  14. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    Yes. this is my log file :


    Simple x264 Launcher (Build #1008), built 2016-01-24

    Job started at 2016-02-03, 11:53:53.

    Source file : D:\Senilita 1962\Work\Film.avs
    Output file : D:\Senilita 1962\Work\Senilita 1962.mkv

    --- SYSTEMINFO ---

    Binary Path : C:\Program Files (x86)\MuldeR\Simple x264 Launcher v2
    Avisynth : Yes
    VapourSynth : No

    --- SETTINGS ---

    Encoder : x264 (H.264/AVC), x64, 8-Bit
    Source : Avisynth (avs)
    RC Mode : 2-Pass
    Preset : veryslow
    Tuning : Film
    Profile : High
    Custom : --ref 9 --no-fast-pskip --bframes 8 --b-pyramid normal --direct auto --deblock -3:-3 --subme 11 --analyse all --trellis 2 --aq-strength 1.1 --vbv-bufsize 14000 --vbv-maxrate 14000 --ratetol 3.0 --no-dct-decimate --psy-rd 1.2:0.25 --b-adapt 2 --me umh --merange 28 --thread-input --sar 64:45

    --- CHECK VERSION ---

    Detect video encoder version:

    Creating process:
    "C:\Program Files (x86)\MuldeR\Simple x264 Launcher v2\toolset\x64\x264_8bit_x64.exe" --version

    x264 0.148.2665 a01e339
    (libswscale 4.0.100)
    (libavformat 57.21.101)
    (ffmpegsource 2.22.0.1)
    built by Komisar on Jan 18 2016, gcc: 4.8.4 (multilib.generic.Komisar)
    x264 configuration: --bit-depth=8 --chroma-format=all
    libx264 configuration: --bit-depth=8 --chroma-format=all
    x264 license: GPL version 2 or later
    libswscale/libavformat/ffmpegsource license: GPL version 2 or later

    Detect video source version:

    Creating process:
    "C:\Program Files (x86)\MuldeR\Simple x264 Launcher v2\toolset\x86\avs2yuv_x86.exe"

    Avs2YUV 0.24bm3

    > x264 revision: 2665 (core #148)
    > Avs2YUV version: 0.24.3

    --- GET SOURCE INFO ---

    Creating process:
    "C:\Program Files (x86)\MuldeR\Simple x264 Launcher v2\toolset\x86\avs2yuv_x86.exe" -frames 1 D:\SENILI~1\Work\film.avs NUL

    D:\SENILI~1\Work\film.avs: 672x576, 25 fps, 159224 frames

    Resolution: 672x576
    Frame Rate: 25
    No. Frames: 159224

    --- ENCODING PASS #1 ---

    Creating input process:
    "C:\Program Files (x86)\MuldeR\Simple x264 Launcher v2\toolset\x86\avs2yuv_x86.exe" D:\SENILI~1\Work\film.avs -

    Creating encoder process:
    "C:\Program Files (x86)\MuldeR\Simple x264 Launcher v2\toolset\x64\x264_8bit_x64.exe" --bitrate 1900 --pass 1 --stats "D:\Senilita 1962\Work\Senilita 1962.stats" --preset veryslow --tune film --profile high --ref 9 --no-fast-pskip --bframes 8 --b-pyramid normal --direct auto --deblock -3:-3 --subme 11 --analyse all --trellis 2 --aq-strength 1.1 --vbv-bufsize 14000 --vbv-maxrate 14000 --ratetol 3.0 --no-dct-decimate --psy-rd 1.2:0.25 --b-adapt 2 --me umh --merange 28 --thread-input --sar 64:45 --output "D:\Senilita 1962\Work\Senilita 1962.mkv" --frames 159224 --demuxer y4m --stdin y4m -

    y4m [info]: 672x576p 64:45 @ 25/1 fps (cfr)
    x264 [info]: using SAR=64/45
    x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    x264 [info]: profile Main, level 3.1
    x264 [info]: frame I:827 Avg QP:12.41 size: 48788
    x264 [info]: frame P:35237 Avg QP:15.40 size: 22235
    x264 [info]: frame B:123160 Avg QP:18.49 size: 5682
    x264 [info]: consecutive B-frames: 1.8% 3.4% 13.9% 9.6% 9.3% 58.2% 2.4% 0.6% 0.7%
    x264 [info]: mb I I16..4: 20.9% 0.0% 79.1%
    x264 [info]: mb P I16..4: 27.9% 0.0% 0.0% P16..4: 68.8% 0.0% 0.0% 0.0% 0.0% skip: 3.3%
    x264 [info]: mb B I16..4: 8.2% 0.0% 0.0% B16..8: 40.4% 0.0% 0.0% direct:21.4% skip:30.0% L0:31.6% L1:34.8% BI:33.6%
    x264 [info]: final ratefactor: 16.27
    x264 [info]: direct mvs spatial:100.0% temporal:0.0%
    x264 [info]: coded y,uvDC,uvAC intra: 69.6% 0.0% 0.0% inter: 34.6% 0.0% 0.0%
    x264 [info]: i16 v,h,dc,p: 41% 19% 31% 9%
    x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 16% 11% 6% 7% 8% 6% 8% 6%
    x264 [info]: i8c dc,h,v,p: 100% 0% 0% 0%
    x264 [info]: Weighted P-Frames: Y:22.6% UV:0.0%
    x264 [info]: kb/s:1913.82
    encoded 159224 frames, 66.91 fps, 1913.82 kb/s
    av2y [info]: D:\SENILI~1\Work\film.avs: 672x576, 25 fps, 159224 frames
    Final file size is 1.42 GB bytes.

    --- ENCODING PASS #2 ---

    Creating input process:
    "C:\Program Files (x86)\MuldeR\Simple x264 Launcher v2\toolset\x86\avs2yuv_x86.exe" D:\SENILI~1\Work\film.avs -

    Creating encoder process:
    "C:\Program Files (x86)\MuldeR\Simple x264 Launcher v2\toolset\x64\x264_8bit_x64.exe" --bitrate 1900 --pass 2 --stats "D:\Senilita 1962\Work\Senilita 1962.stats" --preset veryslow --tune film --profile high --ref 9 --no-fast-pskip --bframes 8 --b-pyramid normal --direct auto --deblock -3:-3 --subme 11 --analyse all --trellis 2 --aq-strength 1.1 --vbv-bufsize 14000 --vbv-maxrate 14000 --ratetol 3.0 --no-dct-decimate --psy-rd 1.2:0.25 --b-adapt 2 --me umh --merange 28 --thread-input --sar 64:45 --output "D:\Senilita 1962\Work\Senilita 1962.mkv" --frames 159224 --demuxer y4m --stdin y4m -

    y4m [info]: 672x576p 64:45 @ 25/1 fps (cfr)
    x264 [info]: using SAR=64/45
    x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
    x264 [info]: profile High, level 3.1
    x264 [info]: frame I:827 Avg QP:14.15 size: 44879
    x264 [info]: frame P:35237 Avg QP:16.67 size: 21625
    x264 [info]: frame B:123160 Avg QP:20.05 size: 5803
    x264 [info]: consecutive B-frames: 1.8% 3.4% 13.9% 9.6% 9.3% 58.2% 2.4% 0.6% 0.7%
    x264 [info]: mb I I16..4: 4.7% 81.8% 13.5%
    x264 [info]: mb P I16..4: 0.6% 26.4% 2.0% P16..4: 19.2% 26.5% 16.0% 4.6% 0.7% skip: 3.9%
    x264 [info]: mb B I16..4: 0.1% 3.2% 0.1% B16..8: 31.7% 27.4% 4.1% direct: 8.9% skip:24.5% L0:41.9% L1:37.7% BI:20.4%
    x264 [info]: 8x8 transform intra:91.1% inter:49.6%
    x264 [info]: direct mvs spatial:99.5% temporal:0.5%
    x264 [info]: coded y,uvDC,uvAC intra: 91.6% 0.0% 0.0% inter: 27.6% 0.0% 0.0%
    x264 [info]: i16 v,h,dc,p: 21% 7% 16% 55%
    x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 12% 30% 5% 5% 7% 5% 8% 8%
    x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 8% 8% 7% 11% 15% 9% 10% 7%
    x264 [info]: i8c dc,h,v,p: 42% 58% 0% 0%
    x264 [info]: Weighted P-Frames: Y:23.5% UV:0.0%
    x264 [info]: ref P L0: 42.5% 11.6% 17.0% 7.1% 6.0% 4.6% 4.3% 2.6% 2.7% 1.4% 0.1%
    x264 [info]: ref B L0: 79.7% 10.5% 3.9% 2.1% 1.4% 1.3% 0.7% 0.3%
    x264 [info]: ref B L1: 94.1% 5.9%
    x264 [info]: kb/s:1901.57
    encoded 159224 frames, 14.96 fps, 1901.57 kb/s
    av2y [info]: D:\SENILI~1\Work\film.avs: 672x576, 25 fps, 159224 frames
    Final file size is 1.41 GB bytes.

    --- COMPLETED ---

    Job finished at 2016-02-03, 15:31:07. Process took 217 minutes, 13 seconds.
    Quote Quote  
  15. Look more closely - they aren't the same settings e.g 16 reference frames vs. 9, a few other differences but the references frames will be a large contributor for the slowdown difference

    He's using avs2yuv to pipe 32bit avisynth to 64bit x264. If everything is the same, typically doing it that way with 64bit might be about 0-10% faster . It certainly won't account for 400% difference
    Quote Quote  
  16. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    Originally Posted by poisondeathray View Post
    Look more closely - they aren't the same settings e.g 16 reference frames vs. 9, a few other differences but the references frames will be a large contributor for the slowdown difference

    He's using avs2yuv to pipe 32bit avisynth to 64bit x264. If everything is the same, typically doing it that way with 64bit might be about 0-10% faster . It certainly won't account for 400% difference
    I will download a different version but most of 64 bit didn't work properly in my system, poisondeathray. By the way I tried to encode with a different "ref" I made it "--ref 5" it was fast in the 1 pass (about 27- 29 fps) but the main problem in the 2pass reduced to 7fps.
    Quote Quote  
  17. Originally Posted by TeNSoR View Post

    I will download a different version but most of 64 bit didn't work properly in my system, poisondeathray.


    You can't use 32bit avisynth directly with 64bit x264 . You need to use avs2yuv as he is doing, or similar programs like avs4x26xmod. Basically 32bit processes can only "communicate" with 32bit processes, or they need some sort of "bridge" . You can use 64bit avisynth with 64bit x264, but 64bit avisynth is less stable, fewer filters available

    But the massive slowdown is from your settings difference, not the 32bit vs 64bit difference


    Originally Posted by TeNSoR View Post
    By the way I tried to encode with a different "ref" I made it "--ref 5" it was fast in the 1 pass (about 27- 29 fps) but the main problem in the 2pass reduced to 7fps.

    Then post the full log files for all your encodes. There is still a big discrepancy
    Quote Quote  
  18. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    Originally Posted by poisondeathray View Post
    Originally Posted by TeNSoR View Post

    I will download a different version but most of 64 bit didn't work properly in my system, poisondeathray.


    You can't use 32bit avisynth directly with 64bit x264 . You need to use avs2yuv as he is doing, or similar programs like avs4x26xmod. Basically 32bit processes can only "communicate" with 32bit processes, or they need some sort of "bridge" . You can use 64bit avisynth with 64bit x264, but 64bit avisynth is less stable, fewer filters available

    But the massive slowdown is from your settings difference, not the 32bit vs 64bit difference


    Originally Posted by TeNSoR View Post
    By the way I tried to encode with a different "ref" I made it "--ref 5" it was fast in the 1 pass (about 27- 29 fps) but the main problem in the 2pass reduced to 7fps.

    Then post the full log files for all your encodes. There is still a big discrepancy
    Thanks so much. it was helpful, anyway
    Quote Quote  
  19. Cores are loaded equally or not ? maybe this is single thread vs multi-thread issue...?
    Quote Quote  
  20. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    Originally Posted by pandy View Post
    Cores are loaded equally or not ? maybe this is single thread vs multi-thread issue...?
    I have no idea about that, Pandy, but if you can can you post its parameter?
    Quote Quote  
  21. Originally Posted by TeNSoR View Post
    Originally Posted by pandy View Post
    Cores are loaded equally or not ? maybe this is single thread vs multi-thread issue...?
    I have no idea about that, Pandy, but if you can can you post its parameter?
    This is not about parameters but how efficiently multiple cores are used - maybe something prevent to use all cores and this may explain that big difference.

    x264 parameters that may help are for example 'sliced threads' + 'thread-input' however this problem may be limited to other single thread application which is source for x264 and as such x264 is limited by something else than x264 syntax.
    Last edited by pandy; 4th Feb 2016 at 07:30.
    Quote Quote  
  22. Originally Posted by TeNSoR View Post
    Originally Posted by pandy View Post
    Cores are loaded equally or not ? maybe this is single thread vs multi-thread issue...?
    I have no idea about that, Pandy, but if you can can you post its parameter?
    Use Task Manager to check your CPU usage.
    Quote Quote  
  23. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    Originally Posted by jagabo View Post
    Originally Posted by TeNSoR View Post
    Originally Posted by pandy View Post
    Cores are loaded equally or not ? maybe this is single thread vs multi-thread issue...?
    I have no idea about that, Pandy, but if you can can you post its parameter?
    Use Task Manager to check your CPU usage.
    Thanks Jagabo, Finally I could solve it Now I changed "--ref 9 into "--ref 5" and seems working (18 fps now
    Quote Quote  
  24. Originally Posted by TeNSoR View Post
    I get a very slow speed in the second pass about 1fps- 2 and this is a screenshot
    C:\x264.exe\x264.exe --preset veryslow --ref 16 --pass 2 --bitrate 2000 --stats "H:\Movies\The Rise and Rise of Michael Rimmer -1970.aldo.CG.stats" --level 3.1 --b-adapt 2 --partitions all --bframes 8 --direct auto --output "H:\Movies.mkv" "H:\Movies\The Rise and Rise of Michael Rimmer -1970.aldo.CG\Work\Encode.avs" --me umh --merange 28 --subme 10 --trellis 2 --vbv-bufsize 14000 --vbv-maxrate 14000 --ratetol 3.0 --no-fast-pskip --no-dct-decimate --deblock -2:-2 --b-pyramid normal --aq-strength 0.8 --psy-rd 1.2:0.25 --sar 64:45
    Hello
    If you want more speed, first, don't use --preset veryslow.

    To encode quickly a film:
    --ref 4 (or more) is a good value (greater than 9 is useless)

    --partitions all is useless : --partitions i8x8,p8x8,b8x8 is sufficient

    --bframes 5 (or more) is a good value (greater than 8 is useless)

    --me umh, ok, but for more speed --me dia is possible

    --subme between 8 and 10

    --trellis 2, ok, but for more speed --trellis 1

    --no-fast-pskip is useless, and for more speed, use --no-mixed-refs --no-chroma-me

    --deblock -2:-2 and --aq-strength 0.8 and --psy-rd 1.2:0.25 are strong a for film.


    My setting for a slow encoding (faster than --preset veryslow, and better for film) :
    x264.exe --me umh --subme 10 --merange 32 --rc-lookahead 80 --partitions i8x8,p8x8,b8x8 --psy-rd 1:0 --ref 9 --trellis 2 --b-adapt 2 --bframe 8 --deblock 0:-1 --deadzone-inter 11 --deadzone-intra 0 --qcomp 0.62 --aq-strength 0.95 --chroma-qp-offset 0 --no-dct-decimate --direct spatial --nr 30
    My setting for a good ratio quality/speed:
    x264.exe --me dia --subme 8 --merange 12 --rc-lookahead 30 --partitions i8x8,p8x8,b8x8 --psy-rd 0.7:0.15 --ref 4 --trellis 1 --b-adapt 2 --bframe 5 --deblock -1:-1 --deadzone-inter 21 --deadzone-intra 0 --qcomp 0.60 --aq-strength 0.90 --chroma-qp-offset 4 --no-dct-decimate --no-mixed-refs --no-chroma-me --direct spatial
    Last edited by leon1789; 18th Feb 2016 at 13:46.
    Quote Quote  
  25. Member TeNSoR's Avatar
    Join Date
    Mar 2014
    Location
    Hungary, Debrecen
    Search PM
    Thanks so much, leon1789
    Quote Quote  



Similar Threads