[FFmpeg-trac] #5878(avdevice:new): x11grab slow with smaller -video_size

FFmpeg trac at avcodec.org
Fri Oct 7 19:07:06 EEST 2016


#5878: x11grab slow with smaller -video_size
-------------------------------------+------------------------------------
             Reporter:  lolilolicon  |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  avdevice
              Version:  unspecified  |               Resolution:
             Keywords:  x11grab      |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+------------------------------------

Comment (by lolilolicon):

 Replying to [ticket:5878 lolilolicon]:
 >
 > For perspective, the ImageMagick command `import` takes consistantly
 around
 > `0.350` second

 This is completely wrong, PEBKAC. I used `import -window root -crop WxH
 +repage png:-`, which dumps a lot of images, not one; the correct command
 is `import -window root -crop WxH+X+Y +repage png:-` and it's much faster
 at smaller sizes. Compare now:

 {{{
   video_size     ffmpeg import
 20000   200x100   0.692 0.123
 40000   400x100   0.689 0.086
 60000   200x300   0.703 0.090
 60000   600x100   0.691 0.088
 80000   800x100   0.524 0.092
 100000  1000x100  0.424 0.095
 100000  200x500   0.424 0.094
 120000  1200x100  0.358 0.096
 120000  400x300   0.359 0.097
 140000  1400x100  0.295 0.098
 140000  200x700   0.296 0.100
 160000  1600x100  0.259 0.101
 180000  1800x100  0.227 0.104
 180000  200x900   0.227 0.104
 180000  600x300   0.226 0.103
 200000  400x500   0.230 0.106
 240000  800x300   0.199 0.113
 280000  400x700   0.169 0.114
 300000  1000x300  0.164 0.122
 300000  600x500   0.163 0.114
 360000  1200x300  0.133 0.127
 360000  400x900   0.134 0.122
 400000  800x500   0.135 0.132
 420000  1400x300  0.107 0.134
 420000  600x700   0.100 0.125
 480000  1600x300  0.107 0.145
 500000  1000x500  0.104 0.145
 540000  1800x300  0.106 0.150
 540000  600x900   0.103 0.137
 560000  800x700   0.106 0.150
 600000  1200x500  0.105 0.153
 700000  1000x700  0.076 0.168
 700000  1400x500  0.075 0.164
 720000  800x900   0.076 0.166
 800000  1600x500  0.079 0.180
 840000  1200x700  0.080 0.180
 900000  1000x900  0.081 0.187
 900000  1800x500  0.081 0.191
 980000  1400x700  0.084 0.197
 1080000 1200x900  0.085 0.202
 1120000 1600x700  0.090 0.216
 1260000 1400x900  0.058 0.221
 1260000 1800x700  0.062 0.228
 1440000 1600x900  0.064 0.246
 1620000 1800x900  0.069 0.266
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5878#comment:8>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list