Skip to content

Instantly share code, notes, and snippets.

@kodawah
Last active May 22, 2017 17:55
Show Gist options
  • Save kodawah/9272807132e5438dfd269482d33b670c to your computer and use it in GitHub Desktop.
Save kodawah/9272807132e5438dfd269482d33b670c to your computer and use it in GitHub Desktop.

##introduction

This benchmark evaluates the different presets options offered by x264, using medium as reference, and providing size and time differences (relative and not).

##benchmark Tests run with latest x264 (12139) and FFmpeg, configured to run with threading enabled. The slower and veryslow presets have been modified to keep the number of refs constant and compatible with most decoders. All results represent an average over 10 runs computed by perf.

Presently three resolutions have been tested, which match most of the user uploads and consequently the configured profiles. In order to avoid excessive compression ratios, real world recordings have been used, excluding animations and timelapses.

##results

###640x480

  • Bitrate: 600
  • VBV Bufsize: 1800
  • VBV Maxrate: 660
Preset Time [s] Size [b] Time Delta % (rel) Size Delta % (rel)
medium 34.445 16648488 n/a n/a
slow 48.438 17116013 +40.62% (n/a) +2.80% (n/a)
slower 62.510 17029769 +81.47% (+29.05%) +2.29% (-0.50%)
veryslow 107.439 16281061 +211.91% (+71.87%) -2.20% (-4.39%)
placebo 216.579 16370121 +528.76% (+101.58%) -1.67% (+0.54%)

###1280x720

  • Bitrate: 2500
  • VBV Bufsize: 7500
  • VBV Maxrate: 2750
Preset Time [s] Size [b] Time Delta % (rel) Size Delta % (rel)
medium 90.904 100836312 n/a n/a
slow 146.083 98632679 +60.70% (n/a) -2.18% (n/a)
slower 193.508 95456543 +112.87% (+32.46%) -5.33% (-3.22%)
veryslow 267.181 88398702 +193.91% (+38.07%) -12.33% (-7.39%)

###1920x1080

  • Bitrate: 4500
  • VBV Bufsize: 13500
  • VBV Maxrate: 4950
Preset Time [s] Size [b] Time Delta % (rel) Size Delta % (rel)
medium 924.418 1084546578 n/a n/a
slow 1441.836 1068057242 +55.97% (n/a) -1.52% (n/a)
slower 1945.088 1046225176 +110.41% (+34.90%) -3.53% (-2.04%)
veryslow 2696.771 1000463357 +191.72% (+38.64%) -7.75% (-4.37%)

###2160x1440

  • Bitrate: 12000
  • VBV Bufsize: 36000
  • VBV Maxrate: 13200
Preset Time [s] Size [b] Time Delta % (rel) Size Delta % (rel)
medium 120.190 125179086 n/a n/a
slow 180.077 124696534 +49.82% (n/a) -0.38% (n/a)
slower 243.627 117941229 +102.70% (+35.29%) -5.78% (-5.41%)
veryslow 325.389 106540459 +170.72% (+33.56%) -14.88% (-9.66%)

###3840x2160

  • Bitrate: 22000
  • VBV Bufsize: 66000
  • VBV Maxrate: 24200
Preset Time [s] Size [b] Time Delta % (rel) Size Delta % (rel)
medium 92.361 126806962 n/a n/a
slow 127.628 123677093 +38.18% (n/a) -2.46% (n/a)
slower 180.176 123672415 +95.07% (+41.17%) -2.47% (-0.003%)
veryslow 255.432 122853521 +176.55% (+41.76) -3.11% (-0.66%)

##conclusions

  1. In general, increasing the preset at the current crf level (20) brings noticable enhancements in very noisy areas, such as for leaves or water.
  2. Changing preset for non-HD resolutions is not recommended, as the slow and veryslow presets provided worse performance in time and bitrate than the reference. Using veryslow or placebo on the other hand provides some size improvements, but at an extreme time increase.
  3. According to the currest results, setting anything other than slow would not be advisable, since the tradeoff between size and speed changes would not be relevant enough. This might change when chunked encoding is activated.
  4. The "Size Delta" data matches to a bitrate change as well. This means that at the slow preset, crf could be reduced to 18 for 720p content and to 19 for 1080p, at the same space occupation. Alternatively, just updating the preset will bring a storage and bandwidth reduction of about 1-2%. Both solutions would come at an increased encoding time of about 1/4.
  5. The additional encoding time for the slow preset falls within alternative post-processing methods (such as noise reduction, leveling and so on).
  6. A detailed list of enabled settings for each preset is available here

##breakdown

time

Preset 640x480 1280x720 1920x1080 2160x1440 3840x2160
slow +40.62% +60.70% +55.97% +49.82% +38.18%
slower +81.47% +112.87% +110.41% +102.70% +95.07%
veryslow +211.91% +193.91% +191.72% +170.72% +176.55%

size

Preset 640x480 1280x720 1920x1080 2160x1440 3840x2160
slow +2.80% -2.18% -1.52% -0.38% -2.46%
slower +2.29% -5.33% -3.53% -5.78% -2.47%
veryslow -2.20% -7.75% -7.75% -14.88% -3.11%

##raw data

###640x480

Performance counter stats for 'ffmpeg -copyts -vsync passthrough -analyzeduration 10000000 -i ./122470433.wmv -map 0:2 -pix_fmt yuv420p -force_key_frames expr:gte(t,n_forced*3) -vf sws_flags=gauss;scale=640:480,setsar=1/1,fps=fps=24/1:start_time=0 -vcodec libx264 -crf 20 -preset medium -x264opts ref=5:colorprim=undef:transfer=undef:colormatrix=undef:stitchable:keyint=infinite:vbv-bufsize=1800:vbv-maxrate=660:qpmin=5 -fastfirstpass 0 -level 3.0 -profile:v high -pass 1 -v quiet -an -dn medium.mp4 -y' (10 runs):

     264891.942210 task-clock                #    7.690 CPUs utilized            ( +-  0.08% )
         1,257,849 context-switches          #    0.005 M/sec                    ( +-  0.09% )
           178,696 cpu-migrations            #    0.675 K/sec                    ( +-  0.27% )
            54,758 page-faults               #    0.207 K/sec                    ( +-  0.10% )
   794,540,051,835 cycles                    #    2.999 GHz                      ( +-  0.11% ) [83.33%]
   464,639,877,020 stalled-cycles-frontend   #   58.48% frontend cycles idle     ( +-  0.19% ) [83.34%]
   185,859,184,203 stalled-cycles-backend    #   23.39% backend  cycles idle     ( +-  0.28% ) [66.66%]
   947,388,548,474 instructions              #    1.19  insns per cycle
                                             #    0.49  stalled cycles per insn  ( +-  0.01% ) [83.33%]
    57,633,675,123 branches                  #  217.574 M/sec                    ( +-  0.01% ) [83.34%]
       865,117,519 branch-misses             #    1.50% of all branches          ( +-  0.04% ) [83.33%]

      34.445159173 seconds time elapsed                                          ( +-  0.18% )

Performance counter stats for 'ffmpeg -copyts -vsync passthrough -analyzeduration 10000000 -i ./122470433.wmv -map 0:2 -pix_fmt yuv420p -force_key_frames expr:gte(t,n_forced*3) -vf sws_flags=gauss;scale=640:480,setsar=1/1,fps=fps=24/1:start_time=0 -vcodec libx264 -crf 20 -preset slow -x264opts ref=5:colorprim=undef:transfer=undef:colormatrix=undef:stitchable:keyint=infinite:vbv-bufsize=1800:vbv-maxrate=660:qpmin=5 -fastfirstpass 0 -level 3.0 -profile:v high -pass 1 -v quiet -an -dn slow.mp4 -y' (10 runs):

     288281.273215 task-clock                #    5.951 CPUs utilized            ( +-  0.06% )
         1,808,715 context-switches          #    0.006 M/sec                    ( +-  0.07% )
           157,474 cpu-migrations            #    0.546 K/sec                    ( +-  0.41% )
            57,026 page-faults               #    0.198 K/sec                    ( +-  0.13% )
   858,768,264,333 cycles                    #    2.979 GHz                      ( +-  0.06% ) [83.33%]
   484,532,813,118 stalled-cycles-frontend   #   56.42% frontend cycles idle     ( +-  0.10% ) [83.33%]
   193,221,471,360 stalled-cycles-backend    #   22.50% backend  cycles idle     ( +-  0.14% ) [66.68%]
 1,074,575,135,824 instructions              #    1.25  insns per cycle
                                             #    0.45  stalled cycles per insn  ( +-  0.00% ) [83.35%]
    69,993,218,877 branches                  #  242.795 M/sec                    ( +-  0.01% ) [83.32%]
     1,143,118,818 branch-misses             #    1.63% of all branches          ( +-  0.05% ) [83.34%]

      48.438882524 seconds time elapsed                                          ( +-  0.18% )

Performance counter stats for 'ffmpeg -copyts -vsync passthrough -analyzeduration 10000000 -i ./122470433.wmv -map 0:2 -pix_fmt yuv420p -force_key_frames expr:gte(t,n_forced*3) -vf sws_flags=gauss;scale=640:480,setsar=1/1,fps=fps=24/1:start_time=0 -vcodec libx264 -crf 20 -preset slower -x264opts ref=5:colorprim=undef:transfer=undef:colormatrix=undef:stitchable:keyint=infinite:vbv-bufsize=1800:vbv-maxrate=660:qpmin=5 -fastfirstpass 0 -level 3.0 -profile:v high -pass 1 -v quiet -an -dn slower.mp4 -y' (10 runs):

     330596.333941 task-clock                #    5.289 CPUs utilized            ( +-  0.04% )
         1,807,396 context-switches          #    0.005 M/sec                    ( +-  0.06% )
           150,702 cpu-migrations            #    0.456 K/sec                    ( +-  0.65% )
            59,987 page-faults               #    0.181 K/sec                    ( +-  0.15% )
   986,103,433,047 cycles                    #    2.983 GHz                      ( +-  0.07% ) [83.33%]
   538,975,789,715 stalled-cycles-frontend   #   54.66% frontend cycles idle     ( +-  0.12% ) [83.33%]
   215,453,361,052 stalled-cycles-backend    #   21.85% backend  cycles idle     ( +-  0.13% ) [66.69%]
 1,255,208,215,815 instructions              #    1.27  insns per cycle
                                             #    0.43  stalled cycles per insn  ( +-  0.01% ) [83.35%]
    86,448,354,972 branches                  #  261.492 M/sec                    ( +-  0.01% ) [83.33%]
     1,840,879,377 branch-misses             #    2.13% of all branches          ( +-  0.05% ) [83.33%]

      62.510410729 seconds time elapsed                                          ( +-  0.08% )

Performance counter stats for 'ffmpeg -copyts -vsync passthrough -analyzeduration 10000000 -i ./122470433.wmv -map 0:2 -pix_fmt yuv420p -force_key_frames expr:gte(t,n_forced*3) -vf sws_flags=gauss;scale=640:480,setsar=1/1,fps=fps=24/1:start_time=0 -vcodec libx264 -crf 20 -preset veryslow -x264opts ref=5:colorprim=undef:transfer=undef:colormatrix=undef:stitchable:keyint=infinite:vbv-bufsize=1800:vbv-maxrate=660:qpmin=5 -fastfirstpass 0 -level 3.0 -profile:v high -pass 1 -v quiet -an -dn veryslow.mp4 -y' (10 runs):

     421168.850451 task-clock                #    3.920 CPUs utilized            ( +-  0.09% )
         3,607,703 context-switches          #    0.009 M/sec                    ( +-  0.23% )
           150,459 cpu-migrations            #    0.357 K/sec                    ( +-  1.64% )
            66,357 page-faults               #    0.158 K/sec                    ( +-  0.11% )
 1,234,790,922,555 cycles                    #    2.932 GHz                      ( +-  0.09% ) [83.34%]
   640,406,474,681 stalled-cycles-frontend   #   51.86% frontend cycles idle     ( +-  0.16% ) [83.34%]
   230,646,852,053 stalled-cycles-backend    #   18.68% backend  cycles idle     ( +-  0.15% ) [66.66%]
 1,662,178,478,806 instructions              #    1.35  insns per cycle        
                                             #    0.39  stalled cycles per insn  ( +-  0.01% ) [83.33%]
   121,081,143,520 branches                  #  287.488 M/sec                    ( +-  0.01% ) [83.34%]
     2,675,534,145 branch-misses             #    2.21% of all branches          ( +-  0.04% ) [83.32%]

     107.439877557 seconds time elapsed                                          ( +-  0.33% )

Performance counter stats for 'ffmpeg -copyts -vsync passthrough -analyzeduration 10000000 -i ./122470433.wmv -map 0:2 -pix_fmt yuv420p -force_key_frames expr:gte(t,n_forced*3) -vf sws_flags=gauss;scale=640:480,setsar=1/1,fps=fps=24/1:start_time=0 -vcodec libx264 -crf 20 -preset placebo -x264opts ref=5:colorprim=undef:transfer=undef:colormatrix=undef:stitchable:keyint=infinite:vbv-bufsize=1800:vbv-maxrate=660:qpmin=5 -fastfirstpass 0 -level 3.0 -profile:v high -pass 1 -v quiet -an -dn placebo.mp4 -y' (10 runs):

    1739490.551503 task-clock                #    8.032 CPUs utilized            ( +-  0.03% )
         7,733,084 context-switches          #    0.004 M/sec                    ( +-  0.14% )
           237,682 cpu-migrations            #    0.137 K/sec                    ( +-  2.81% )
            83,443 page-faults               #    0.048 K/sec                    ( +-  0.24% )
 5,099,602,544,482 cycles                    #    2.932 GHz                      ( +-  0.03% ) [83.34%]
 2,827,305,253,328 stalled-cycles-frontend   #   55.44% frontend cycles idle     ( +-  0.05% ) [83.33%]
   802,619,101,616 stalled-cycles-backend    #   15.74% backend  cycles idle     ( +-  0.12% ) [66.67%]
 6,237,679,238,965 instructions              #    1.22  insns per cycle
                                             #    0.45  stalled cycles per insn  ( +-  0.01% ) [83.33%]
   464,789,200,373 branches                  #  267.198 M/sec                    ( +-  0.01% ) [83.33%]
    19,242,355,329 branch-misses             #    4.14% of all branches          ( +-  0.01% ) [83.33%]

     216.579374467 seconds time elapsed                                          ( +-  0.21% )

###1280x720

Performance counter stats for 'ffmpeg -v quiet -copyts -vsync passthrough -analyzeduration 10000000 -i ./work-at-vimeo.mp4 -map 0:0 -pix_fmt yuv420p -force_key_frames expr:gte(t,n_forced*3) -vf sws_flags=gauss;scale=1280:720,setsar=1/1,fps=fps=24/1:start_time=0 -vcodec libx264 -crf 20 -preset medium -x264opts ref=5:colorprim=undef:transfer=undef:colormatrix=undef:stitchable:keyint=infinite:vbv-bufsize=7500:vbv-maxrate=2750:qpmin=5 -fastfirstpass 0 -level 4.0 -profile:v high -pass 1 medium.mp4 -y' (10 runs):

   1504330.433676 task-clock                #   16.548 CPUs utilized            ( +-  0.06% )
          714,372 context-switches          #    0.475 K/sec                    ( +-  0.11% )
          202,327 cpu-migrations            #    0.134 K/sec                    ( +-  0.29% )
           94,970 page-faults               #    0.063 K/sec                    ( +-  0.19% )
4,458,172,121,550 cycles                    #    2.964 GHz                      ( +-  0.04% ) [83.34%]
2,855,042,662,542 stalled-cycles-frontend   #   64.04% frontend cycles idle     ( +-  0.06% ) [83.33%]
1,133,831,231,742 stalled-cycles-backend    #   25.43% backend  cycles idle     ( +-  0.08% ) [66.67%]
4,239,003,897,015 instructions              #    0.95  insns per cycle
                                            #    0.67  stalled cycles per insn  ( +-  0.00% ) [83.33%]
  260,087,077,513 branches                  #  172.892 M/sec                    ( +-  0.00% ) [83.33%]
   15,259,927,670 branch-misses             #    5.87% of all branches          ( +-  0.01% ) [83.33%]

     90.904486223 seconds time elapsed                                          ( +-  0.10% )

Performance counter stats for 'ffmpeg -v quiet -copyts -vsync passthrough -analyzeduration 10000000 -i ./work-at-vimeo.mp4 -map 0:0 -pix_fmt yuv420p -force_key_frames expr:gte(t,n_forced*3) -vf sws_flags=gauss;scale=1280:720,setsar=1/1,fps=fps=24/1:start_time=0 -vcodec libx264 -crf 20 -preset slow -x264opts ref=5:colorprim=undef:transfer=undef:colormatrix=undef:stitchable:keyint=infinite:vbv-bufsize=7500:vbv-maxrate=2750:qpmin=5 -fastfirstpass 0 -level 4.0 -profile:v high -pass 1 slow.mp4 -y' (10 runs):

   2059187.139885 task-clock                #   14.096 CPUs utilized            ( +-  0.10% )
        1,112,372 context-switches          #    0.540 K/sec                    ( +-  0.14% )
          192,208 cpu-migrations            #    0.093 K/sec                    ( +-  0.18% )
           98,847 page-faults               #    0.048 K/sec                    ( +-  0.18% )
6,144,865,894,957 cycles                    #    2.984 GHz                      ( +-  0.09% ) [83.33%]
3,780,550,417,718 stalled-cycles-frontend   #   61.52% frontend cycles idle     ( +-  0.14% ) [83.34%]
1,405,893,174,258 stalled-cycles-backend    #   22.88% backend  cycles idle     ( +-  0.16% ) [66.67%]
6,197,606,736,321 instructions              #    1.01  insns per cycle
                                            #    0.61  stalled cycles per insn  ( +-  0.00% ) [83.33%]
  361,227,947,223 branches                  #  175.423 M/sec                    ( +-  0.00% ) [83.32%]
   20,763,245,999 branch-misses             #    5.75% of all branches          ( +-  0.03% ) [83.34%]

    146.083725181 seconds time elapsed                                          ( +-  0.13% )

Performance counter stats for 'ffmpeg -v quiet -copyts -vsync passthrough -analyzeduration 10000000 -i ./work-at-vimeo.mp4 -map 0:0 -pix_fmt yuv420p -force_key_frames expr:gte(t,n_forced*3) -vf sws_flags=gauss;scale=1280:720,setsar=1/1,fps=fps=24/1:start_time=0 -vcodec libx264 -crf 20 -preset slower -x264opts ref=5:colorprim=undef:transfer=undef:colormatrix=undef:stitchable:keyint=infinite:vbv-bufsize=7500:vbv-maxrate=2750:qpmin=5 -fastfirstpass 0 -level 4.0 -profile:v high -pass 1 slower.mp4 -y' (10 runs):

   2495001.333497 task-clock                #   12.893 CPUs utilized            ( +-  0.04% )
          883,299 context-switches          #    0.354 K/sec                    ( +-  0.08% )
          157,007 cpu-migrations            #    0.063 K/sec                    ( +-  0.24% )
          104,345 page-faults               #    0.042 K/sec                    ( +-  0.11% )
7,464,192,853,954 cycles                    #    2.992 GHz                      ( +-  0.03% ) [83.33%]
4,453,569,769,227 stalled-cycles-frontend   #   59.67% frontend cycles idle     ( +-  0.04% ) [83.33%]
1,651,065,622,837 stalled-cycles-backend    #   22.12% backend  cycles idle     ( +-  0.04% ) [66.67%]
7,851,715,357,377 instructions              #    1.05  insns per cycle
                                            #    0.57  stalled cycles per insn  ( +-  0.00% ) [83.34%]
  482,534,906,407 branches                  #  193.401 M/sec                    ( +-  0.00% ) [83.33%]
   28,100,537,432 branch-misses             #    5.82% of all branches          ( +-  0.02% ) [83.33%]

    193.508932403 seconds time elapsed                                          ( +-  0.09% )

Performance counter stats for 'ffmpeg -v quiet -copyts -vsync passthrough -analyzeduration 10000000 -i ./work-at-vimeo.mp4 -map 0:0 -pix_fmt yuv420p -force_key_frames expr:gte(t,n_forced*3) -vf sws_flags=gauss;scale=1280:720,setsar=1/1,fps=fps=24/1:start_time=0 -vcodec libx264 -crf 20 -preset veryslow -x264opts ref=5:colorprim=undef:transfer=undef:colormatrix=undef:stitchable:keyint=infinite:vbv-bufsize=7500:vbv-maxrate=2750:qpmin=5 -fastfirstpass 0 -level 4.0 -profile:v high -pass 1 veryslow.mp4 -y' (10 runs):

    3304320.644565 task-clock                #   12.367 CPUs utilized            ( +-  0.05% )
         2,238,405 context-switches          #    0.677 K/sec                    ( +-  0.04% )
           185,860 cpu-migrations            #    0.056 K/sec                    ( +-  0.20% )
            97,918 page-faults               #    0.030 K/sec                    ( +-  0.08% )
 9,880,480,772,397 cycles                    #    2.990 GHz                      ( +-  0.04% ) [83.33%]
 5,769,486,368,231 stalled-cycles-frontend   #   58.39% frontend cycles idle     ( +-  0.07% ) [83.33%]
 1,977,470,054,698 stalled-cycles-backend    #   20.01% backend  cycles idle     ( +-  0.07% ) [66.67%]
10,788,678,815,584 instructions              #    1.09  insns per cycle
                                             #    0.53  stalled cycles per insn  ( +-  0.00% ) [83.34%]
   685,748,736,829 branches                  #  207.531 M/sec                    ( +-  0.00% ) [83.33%]
    35,718,167,154 branch-misses             #    5.21% of all branches          ( +-  0.01% ) [83.34%]

     267.181982765 seconds time elapsed                                          ( +-  0.09% )

###1920x1080

Performance counter stats for 'ffmpeg -v quiet -copyts -vsync passthrough -analyzeduration 10000000 -i ./siracha-255672416.mp4 -map 0:0 -pix_fmt yuv420p -force _key_frames expr:gte(t,n_forced*3) -vf sws_flags=gauss;scale=1920:1080,setsar=1/1,fps=fps=24/1:start_time=0 -vcodec libx264 -crf 20 -preset medium -x264opts ref =5:colorprim=undef:transfer=undef:colormatrix=undef:stitchable:keyint=infinite:vbv-bufsize=13500:vbv-maxrate=4950:qpmin=5 -fastfirstpass 0 -level 4.0 -profile:v high -pass 1 medium.mp4 -y' (10 runs):

   16647452.139973 task-clock                #   18.009 CPUs utilized            ( +-  0.03% )
         5,229,227 context-switches          #    0.314 K/sec                    ( +-  0.12% )
         1,377,166 cpu-migrations            #    0.083 K/sec                    ( +-  0.10% )
           126,457 page-faults               #    0.008 K/sec                    ( +-  0.12% )
49,089,897,224,969 cycles                    #    2.949 GHz                      ( +-  0.02% ) [83.33%]
32,162,404,935,377 stalled-cycles-frontend   #   65.52% frontend cycles idle     ( +-  0.04% ) [83.33%]
12,916,647,452,386 stalled-cycles-backend    #   26.31% backend  cycles idle     ( +-  0.05% ) [66.67%]
44,936,060,092,704 instructions              #    0.92  insns per cycle
                                             #    0.72  stalled cycles per insn  ( +-  0.00% ) [83.34%]
 2,740,455,128,244 branches                  #  164.617 M/sec                    ( +-  0.00% ) [83.33%]
   151,602,585,759 branch-misses             #    5.53% of all branches          ( +-  0.01% ) [83.33%]

     924.418225971 seconds time elapsed                                          ( +-  0.02% )

Performance counter stats for 'ffmpeg -v quiet -copyts -vsync passthrough -analyzeduration 10000000 -i ./siracha-255672416.mp4 -map 0:0 -pix_fmt yuv420p -force_key_frames expr:gte(t,n_forced*3) -vf sws_flags=gauss;scale=1920:1080,setsar=1/1,fps=fps=24/1:start_time=0 -vcodec libx264 -crf 20 -preset slow -x264opts ref=5:colorprim=undef:transfer=undef:colormatrix=undef:stitchable:keyint=infinite:vbv-bufsize=13500:vbv-maxrate=4950:qpmin=5 -fastfirstpass 0 -level 4.0 -profile:v high -pass 1 slow.mp4 -y' (10 runs):

   22534468.392659 task-clock                #   15.629 CPUs utilized            ( +-  0.05% )
         7,640,559 context-switches          #    0.339 K/sec                    ( +-  0.06% )
         1,362,763 cpu-migrations            #    0.060 K/sec                    ( +-  0.07% )
           131,199 page-faults               #    0.006 K/sec                    ( +-  0.09% )
66,831,388,545,296 cycles                    #    2.966 GHz                      ( +-  0.05% ) [83.33%]
42,333,232,554,079 stalled-cycles-frontend   #   63.34% frontend cycles idle     ( +-  0.08% ) [83.33%]
15,853,959,796,759 stalled-cycles-backend    #   23.72% backend  cycles idle     ( +-  0.12% ) [66.67%]
64,429,110,754,107 instructions              #    0.96  insns per cycle
                                             #    0.66  stalled cycles per insn  ( +-  0.00% ) [83.34%]
 3,759,715,616,107 branches                  #  166.843 M/sec                    ( +-  0.00% ) [83.33%]
   207,007,977,454 branch-misses             #    5.51% of all branches          ( +-  0.01% ) [83.33%]

    1441.836365425 seconds time elapsed                                          ( +-  0.03% )

Performance counter stats for 'ffmpeg -v quiet -copyts -vsync passthrough -analyzeduration 10000000 -i ./siracha-255672416.mp4 -map 0:0 -pix_fmt yuv420p -force_key_frames expr:gte(t,n_forced*3) -vf sws_flags=gauss;scale=1920:1080,setsar=1/1,fps=fps=24/1:start_time=0 -vcodec libx264 -crf 20 -preset slower -x264opts ref=5:colorprim=undef:transfer=undef:colormatrix=undef:stitchable:keyint=infinite:vbv-bufsize=13500:vbv-maxrate=4950:qpmin=5 -fastfirstpass 0 -level 4.0 -profile:v high -pass 1 slower.mp4 -y' (10 runs):

   26930990.449295 task-clock                #   13.846 CPUs utilized            ( +-  0.04% )
         5,815,926 context-switches          #    0.216 K/sec                    ( +-  0.06% )
         1,102,651 cpu-migrations            #    0.041 K/sec                    ( +-  0.09% )
           135,632 page-faults               #    0.005 K/sec                    ( +-  0.21% )
80,055,162,565,978 cycles                    #    2.973 GHz                      ( +-  0.03% ) [83.33%]
49,247,353,108,468 stalled-cycles-frontend   #   61.52% frontend cycles idle     ( +-  0.05% ) [83.33%]
18,298,978,414,082 stalled-cycles-backend    #   22.86% backend  cycles idle     ( +-  0.07% ) [66.67%]
80,520,729,475,385 instructions              #    1.01  insns per cycle        
                                             #    0.61  stalled cycles per insn  ( +-  0.00% ) [83.33%]
 4,958,022,815,652 branches                  #  184.101 M/sec                    ( +-  0.00% ) [83.33%]
   282,420,675,138 branch-misses             #    5.70% of all branches          ( +-  0.01% ) [83.33%]

    1945.088630518 seconds time elapsed                                          ( +-  0.03% )

Performance counter stats for 'ffmpeg -copyts -vsync passthrough -analyzeduration 10000000 -i ./siracha-255672416.mp4 -map 0:0 -pix_fmt yuv420p -force_key_frames expr:gte(t,n_forced*3) -vf sws_flags=gauss;scale=1920:1080,setsar=1/1,fps=fps=24/1:start_time=0 -vcodec libx264 -crf 20 -preset veryslow -x264opts ref=5:colorprim=undef:transfer=undef:colormatrix=undef:stitchable:keyint=infinite:vbv-bufsize=13500:vbv-maxrate=4950:qpmin=5 -fastfirstpass 0 -level 4.0 -profile:v high -pass 1 -v quiet veryslow.mp4 -y' (10 runs):

    36458762.618204 task-clock                #   13.519 CPUs utilized            ( +-  0.02% )
         15,031,679 context-switches          #    0.412 K/sec                    ( +-  0.02% )
          1,403,592 cpu-migrations            #    0.038 K/sec                    ( +-  0.08% )
            125,450 page-faults               #    0.003 K/sec                    ( +-  0.28% )
108,359,238,150,622 cycles                    #    2.972 GHz                      ( +-  0.02% ) [83.33%]
 64,922,352,846,748 stalled-cycles-frontend   #   59.91% frontend cycles idle     ( +-  0.03% ) [83.33%]
 22,583,500,967,242 stalled-cycles-backend    #   20.84% backend  cycles idle     ( +-  0.03% ) [66.67%]
114,221,626,033,218 instructions              #    1.05  insns per cycle
                                              #    0.57  stalled cycles per insn  ( +-  0.00% ) [83.34%]
  7,275,178,703,835 branches                  #  199.545 M/sec                    ( +-  0.00% ) [83.33%]
    370,834,563,029 branch-misses             #    5.10% of all branches          ( +-  0.01% ) [83.33%]

     2696.771519835 seconds time elapsed                                          ( +-  0.04% )

###2160x1440

Performance counter stats for 'ffmpeg -copyts -vsync passthrough -analyzeduration 10000000 -i ./2k.avi -map 0:0 -pix_fmt yuv420p -force_key_frames expr:gte(t,n_forced*3) -vf sws_flags=gauss;scale=2560:1440,setsar=1/1,fps=fps=24/1:start_time=0 -vcodec libx264 -crf 20 -preset medium -x264opts ref=5:colorprim=undef:transfer=undef:colormatrix=undef:stitchable:keyint=infinite:vbv-bufsize=36000:vbv-maxrate=13200:qpmin=5 -fastfirstpass 0 -level 5.2 -profile:v high -pass 1 -an -dn -v quiet medium.mp4 -y' (10 runs):

    2208056.618718 task-clock                #   18.371 CPUs utilized            ( +-  0.07% )
           448,693 context-switches          #    0.203 K/sec                    ( +-  0.10% )
           114,638 cpu-migrations            #    0.052 K/sec                    ( +-  0.34% )
           115,344 page-faults               #    0.052 K/sec                    ( +-  0.16% )
 6,494,448,660,215 cycles                    #    2.941 GHz                      ( +-  0.05% ) [83.33%]
 4,232,467,768,691 stalled-cycles-frontend   #   65.17% frontend cycles idle     ( +-  0.07% ) [83.33%]
 1,634,704,810,501 stalled-cycles-backend    #   25.17% backend  cycles idle     ( +-  0.10% ) [66.67%]
 6,051,256,000,547 instructions              #    0.93  insns per cycle
                                             #    0.70  stalled cycles per insn  ( +-  0.00% ) [83.34%]
   368,082,697,410 branches                  #  166.700 M/sec                    ( +-  0.00% ) [83.33%]
    19,739,031,268 branch-misses             #    5.36% of all branches          ( +-  0.02% ) [83.33%]

     120.190724027 seconds time elapsed                                          ( +-  0.11% )

Performance counter stats for 'ffmpeg -copyts -vsync passthrough -analyzeduration 10000000 -i ./2k.avi -map 0:0 -pix_fmt yuv420p -force_key_frames expr:gte(t,n_forced*3) -vf sws_flags=gauss;scale=2560:1440,setsar=1/1,fps=fps=24/1:start_time=0 -vcodec libx264 -crf 20 -preset slow -x264opts ref=5:colorprim=undef:transfer=undef:colormatrix=undef:stitchable:keyint=infinite:vbv-bufsize=36000:vbv-maxrate=13200:qpmin=5 -fastfirstpass 0 -level 5.2 -profile:v high -pass 1 -an -dn -v quiet slow.mp4 -y' (10 runs):

    3001662.488603 task-clock                #   16.669 CPUs utilized            ( +-  0.09% )
           647,380 context-switches          #    0.216 K/sec                    ( +-  0.21% )
           125,530 cpu-migrations            #    0.042 K/sec                    ( +-  0.35% )
           118,565 page-faults               #    0.039 K/sec                    ( +-  0.21% )
 8,881,219,732,843 cycles                    #    2.959 GHz                      ( +-  0.05% ) [83.34%]
 5,654,002,521,310 stalled-cycles-frontend   #   63.66% frontend cycles idle     ( +-  0.07% ) [83.33%]
 2,073,448,939,128 stalled-cycles-backend    #   23.35% backend  cycles idle     ( +-  0.09% ) [66.67%]
 8,527,873,122,549 instructions              #    0.96  insns per cycle
                                             #    0.66  stalled cycles per insn  ( +-  0.00% ) [83.33%]
   498,627,393,474 branches                  #  166.117 M/sec                    ( +-  0.00% ) [83.33%]
    27,079,576,186 branch-misses             #    5.43% of all branches          ( +-  0.03% ) [83.33%]

     180.077853917 seconds time elapsed                                          ( +-  0.06% )

Performance counter stats for 'ffmpeg -copyts -vsync passthrough -analyzeduration 10000000 -i ./2k.avi -map 0:0 -pix_fmt yuv420p -force_key_frames expr:gte(t,n_forced*3) -vf sws_flags=gauss;scale=2560:1440,setsar=1/1,fps=fps=24/1:start_time=0 -vcodec libx264 -crf 20 -preset slower -x264opts ref=5:colorprim=undef:transfer=undef:colormatrix=undef:stitchable:keyint=infinite:vbv-bufsize=36000:vbv-maxrate=13200:qpmin=5 -fastfirstpass 0 -level 5.2 -profile:v high -pass 1 -an -dn -v quiet slower.mp4 -y' (10 runs):

    3677392.110163 task-clock                #   15.094 CPUs utilized            ( +-  0.06% )
           513,610 context-switches          #    0.140 K/sec                    ( +-  0.22% )
           103,267 cpu-migrations            #    0.028 K/sec                    ( +-  0.25% )
           124,620 page-faults               #    0.034 K/sec                    ( +-  0.21% )
10,869,836,633,767 cycles                    #    2.956 GHz                      ( +-  0.04% ) [83.33%]
 6,749,978,239,857 stalled-cycles-frontend   #   62.10% frontend cycles idle     ( +-  0.06% ) [83.34%]
 2,434,096,189,745 stalled-cycles-backend    #   22.39% backend  cycles idle     ( +-  0.06% ) [66.67%]
10,816,722,527,014 instructions              #    1.00  insns per cycle
                                             #    0.62  stalled cycles per insn  ( +-  0.00% ) [83.34%]
   667,861,586,752 branches                  #  181.613 M/sec                    ( +-  0.00% ) [83.33%]
    37,265,399,910 branch-misses             #    5.58% of all branches          ( +-  0.03% ) [83.33%]

     243.627920351 seconds time elapsed                                          ( +-  0.10% )

Performance counter stats for 'ffmpeg -copyts -vsync passthrough -analyzeduration 10000000 -i ./2k.avi -map 0:0 -pix_fmt yuv420p -force_key_frames expr:gte(t,n_forced*3) -vf sws_flags=gauss;scale=2560:1440,setsar=1/1,fps=fps=24/1:start_time=0 -vcodec libx264 -crf 20 -preset veryslow -x264opts ref=5:colorprim=undef:transfer=undef:colormatrix=undef:stitchable:keyint=infinite:vbv-bufsize=36000:vbv-maxrate=13200:qpmin=5 -fastfirstpass 0 -level 5.2 -profile:v high -pass 1 -an -dn -v quiet veryslow.mp4 -y' (10 runs):

    4729712.141024 task-clock                #   14.536 CPUs utilized            ( +-  0.07% )
         1,205,871 context-switches          #    0.255 K/sec                    ( +-  0.05% )
           128,213 cpu-migrations            #    0.027 K/sec                    ( +-  0.37% )
           118,889 page-faults               #    0.025 K/sec                    ( +-  1.30% )
14,040,555,568,703 cycles                    #    2.969 GHz                      ( +-  0.05% ) [83.34%]
 8,504,690,605,861 stalled-cycles-frontend   #   60.57% frontend cycles idle     ( +-  0.07% ) [83.33%]
 2,914,522,411,073 stalled-cycles-backend    #   20.76% backend  cycles idle     ( +-  0.06% ) [66.67%]
14,609,377,301,811 instructions              #    1.04  insns per cycle
                                             #    0.58  stalled cycles per insn  ( +-  0.00% ) [83.34%]
   928,822,874,010 branches                  #  196.380 M/sec                    ( +-  0.00% ) [83.33%]
    46,413,350,223 branch-misses             #    5.00% of all branches          ( +-  0.02% ) [83.33%]

     325.389334498 seconds time elapsed                                          ( +-  0.16% )

###3840x2160

Performance counter stats for 'ffmpeg -copyts -vsync passthrough -analyzeduration 10000000 -i ./4k.mov -map 0:1 -pix_fmt yuv420p -force_key_frames expr:gte(t,n_forced*3) -vf sws_flags=gauss;scale=3840:2160,setsar=1/1,fps=fps=24/1:start_time=0 -vcodec libx264 -crf 20 -preset medium -x264opts ref=5:colorprim=undef:transfer=undef:colormatrix=undef:stitchable:keyint=infinite:vbv-bufsize=66000:vbv-maxrate=24200:qpmin=5 -fastfirstpass 0 -level 5.2 -profile:v high -pass 1 -an -dn -v quiet medium.mp4 -y' (10 runs):

    1825417.708719 task-clock                #   19.764 CPUs utilized            ( +-  0.09% )
           256,772 context-switches          #    0.141 K/sec                    ( +-  0.27% )
            51,281 cpu-migrations            #    0.028 K/sec                    ( +-  0.47% )
           178,272 page-faults               #    0.098 K/sec                    ( +-  0.07% )
 5,346,726,895,605 cycles                    #    2.929 GHz                      ( +-  0.06% ) [83.33%]
 3,454,624,421,552 stalled-cycles-frontend   #   64.61% frontend cycles idle     ( +-  0.09% ) [83.33%]
 1,252,739,161,538 stalled-cycles-backend    #   23.43% backend  cycles idle     ( +-  0.12% ) [66.67%]
 5,009,845,146,697 instructions              #    0.94  insns per cycle
                                             #    0.69  stalled cycles per insn  ( +-  0.01% ) [83.34%]
   309,446,079,937 branches                  #  169.521 M/sec                    ( +-  0.01% ) [83.33%]
    18,406,623,066 branch-misses             #    5.95% of all branches          ( +-  0.02% ) [83.34%]

      92.361155766 seconds time elapsed                                          ( +-  0.20% )

Performance counter stats for 'ffmpeg -copyts -vsync passthrough -analyzeduration 10000000 -i ./4k.mov -map 0:1 -pix_fmt yuv420p -force_key_frames expr:gte(t,n_forced*3) -vf sws_flags=gauss;scale=3840:2160,setsar=1/1,fps=fps=24/1:start_time=0 -vcodec libx264 -crf 20 -preset slow -x264opts ref=5:colorprim=undef:transfer=undef:colormatrix=undef:stitchable:keyint=infinite:vbv-bufsize=66000:vbv-maxrate=24200:qpmin=5 -fastfirstpass 0 -level 5.2 -profile:v high -pass 1 -an -dn -v quiet slow.mp4 -y' (10 runs):

    2258332.209652 task-clock                #   17.695 CPUs utilized            ( +-  0.10% )
           294,423 context-switches          #    0.130 K/sec                    ( +-  0.36% )
            59,808 cpu-migrations            #    0.026 K/sec                    ( +-  0.28% )
           177,297 page-faults               #    0.079 K/sec                    ( +-  0.13% )
 6,673,127,916,510 cycles                    #    2.955 GHz                      ( +-  0.09% ) [83.33%]
 4,217,890,206,827 stalled-cycles-frontend   #   63.21% frontend cycles idle     ( +-  0.14% ) [83.34%]
 1,506,415,332,193 stalled-cycles-backend    #   22.57% backend  cycles idle     ( +-  0.14% ) [66.67%]
 6,446,989,056,786 instructions              #    0.97  insns per cycle
                                             #    0.65  stalled cycles per insn  ( +-  0.01% ) [83.33%]
   385,450,201,621 branches                  #  170.679 M/sec                    ( +-  0.01% ) [83.33%]
    22,506,349,155 branch-misses             #    5.84% of all branches          ( +-  0.04% ) [83.33%]

     127.628953913 seconds time elapsed                                          ( +-  0.13% )

Performance counter stats for 'ffmpeg -copyts -vsync passthrough -analyzeduration 10000000 -i ./4k.mov -map 0:1 -pix_fmt yuv420p -force_key_frames expr:gte(t,n_forced*3) -vf sws_flags=gauss;scale=3840:2160,setsar=1/1,fps=fps=24/1:start_time=0 -vcodec libx264 -crf 20 -preset slower -x264opts ref=5:colorprim=undef:transfer=undef:colormatrix=undef:stitchable:keyint=infinite:vbv-bufsize=66000:vbv-maxrate=24200:qpmin=5 -fastfirstpass 0 -level 5.2 -profile:v high -pass 1 -an -dn -v quiet slower.mp4 -y' (10 runs):

    2972720.902690 task-clock                #   16.499 CPUs utilized            ( +-  0.06% )
           277,600 context-switches          #    0.093 K/sec                    ( +-  0.22% )
            50,365 cpu-migrations            #    0.017 K/sec                    ( +-  0.32% )
           181,562 page-faults               #    0.061 K/sec                    ( +-  0.05% )
 8,795,587,558,236 cycles                    #    2.959 GHz                      ( +-  0.06% ) [83.33%]
 5,428,816,405,881 stalled-cycles-frontend   #   61.72% frontend cycles idle     ( +-  0.09% ) [83.33%]
 1,876,189,452,942 stalled-cycles-backend    #   21.33% backend  cycles idle     ( +-  0.09% ) [66.67%]
 8,763,948,928,221 instructions              #    1.00  insns per cycle
                                             #    0.62  stalled cycles per insn  ( +-  0.01% ) [83.33%]
   564,336,897,336 branches                  #  189.839 M/sec                    ( +-  0.01% ) [83.33%]
    33,575,280,946 branch-misses             #    5.95% of all branches          ( +-  0.02% ) [83.33%]

     180.176150997 seconds time elapsed                                          ( +-  0.17% )

Performance counter stats for 'ffmpeg -copyts -vsync passthrough -analyzeduration 10000000 -i ./4k.mov -map 0:1 -pix_fmt yuv420p -force_key_frames expr:gte(t,n_forced*3) -vf sws_flags=gauss;scale=3840:2160,setsar=1/1,fps=fps=24/1:start_time=0 -vcodec libx264 -crf 20 -preset veryslow -x264opts ref=5:colorprim=undef:transfer=undef:colormatrix=undef:stitchable:keyint=infinite:vbv-bufsize=66000:vbv-maxrate=24200:qpmin=5 -fastfirstpass 0 -level 5.2 -profile:v high -pass 1 -an -dn -v quiet veryslow.mp4 -y' (10 runs):

    4263322.151308 task-clock                #   16.691 CPUs utilized            ( +-  0.05% )
           513,941 context-switches          #    0.121 K/sec                    ( +-  0.19% )
            64,383 cpu-migrations            #    0.015 K/sec                    ( +-  0.65% )
           178,670 page-faults               #    0.042 K/sec                    ( +-  0.12% )
12,563,495,782,383 cycles                    #    2.947 GHz                      ( +-  0.05% ) [83.33%]
 7,613,977,295,644 stalled-cycles-frontend   #   60.60% frontend cycles idle     ( +-  0.08% ) [83.33%]
 2,424,872,349,892 stalled-cycles-backend    #   19.30% backend  cycles idle     ( +-  0.07% ) [66.67%]
12,912,989,034,760 instructions              #    1.03  insns per cycle
                                             #    0.59  stalled cycles per insn  ( +-  0.01% ) [83.34%]
   868,838,373,461 branches                  #  203.794 M/sec                    ( +-  0.01% ) [83.33%]
    47,229,968,658 branch-misses             #    5.44% of all branches          ( +-  0.03% ) [83.33%]

     255.432456858 seconds time elapsed                                          ( +-  0.12% )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment