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

FFmpeg trac at avcodec.org
Fri Oct 7 17:48: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):

 Done.
 {{{
 % ffmpeg -loglevel 99 -nostdin -f x11grab -draw_mouse 0 -show_region 0
 -video_size 48x64 -i :0+0\,0 -f image2 -codec:v png -frames:v 1 -
 >/dev/null
 ffmpeg version 3.0.git Copyright (c) 2000-2016 the FFmpeg developers
   built with gcc 6.2.1 (GCC) 20160830
   configuration: --prefix=/usr --enable-debug --disable-static --disable-
 stripping --enable-avisynth --enable-avresample --enable-fontconfig
 --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libass
 --enable-libbluray --enable-libfreetype --enable-libfribidi --enable-
 libgsm --enable-libiec61883 --enable-libmodplug --enable-libmp3lame
 --enable-libopencore_amrnb --enable-libopencore_amrwb --disable-
 libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger
 --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora
 --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx
 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid
 --enable-netcdf --enable-shared --enable-version3 --enable-x11grab
   libavutil      55. 32.100 / 55. 32.100
   libavcodec     57. 61.100 / 57. 61.100
   libavformat    57. 51.103 / 57. 51.103
   libavdevice    57.  0.102 / 57.  0.102
   libavfilter     6. 63.100 /  6. 63.100
   libavresample   3.  0.  0 /  3.  0.  0
   libswscale      4.  1.100 /  4.  1.100
   libswresample   2.  2.100 /  2.  2.100
   libpostproc    54.  0.100 / 54.  0.100
 Splitting the commandline.
 Reading option '-loglevel' ... matched as option 'loglevel' (set logging
 level) with argument '99'.
 Reading option '-nostdin' ... matched as option 'stdin' (enable or disable
 interaction on standard input) with argument 0.
 Reading option '-f' ... matched as option 'f' (force format) with argument
 'x11grab'.
 Reading option '-draw_mouse' ... matched as AVOption 'draw_mouse' with
 argument '0'.
 Reading option '-show_region' ... matched as AVOption 'show_region' with
 argument '0'.
 Reading option '-video_size' ... matched as AVOption 'video_size' with
 argument '48x64'.
 Reading option '-i' ... matched as input file with argument ':0+0,0'.
 Reading option '-f' ... matched as option 'f' (force format) with argument
 'image2'.
 Reading option '-codec:v' ... matched as option 'codec' (codec name) with
 argument 'png'.
 Reading option '-frames:v' ... matched as option 'frames' (set the number
 of frames to output) with argument '1'.
 Reading option '-' ... matched as output file.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option loglevel (set logging level) with argument 99.
 Applying option nostdin (enable or disable interaction on standard input)
 with argument 0.
 Successfully parsed a group of options.
 Parsing a group of options: input file :0+0,0.
 Applying option f (force format) with argument x11grab.
 Successfully parsed a group of options.
 Opening an input file: :0+0,0.
 [x11grab @ 0x55e0d6e12ba0] All info found
 [x11grab @ 0x55e0d6e12ba0] rfps: 29.250000 0.019178
 [x11grab @ 0x55e0d6e12ba0] rfps: 29.333333 0.014994
 [x11grab @ 0x55e0d6e12ba0] rfps: 29.416667 0.011324
 [x11grab @ 0x55e0d6e12ba0] rfps: 29.500000 0.008169
 [x11grab @ 0x55e0d6e12ba0] rfps: 29.583333 0.005528
 [x11grab @ 0x55e0d6e12ba0] rfps: 29.666667 0.003401
 [x11grab @ 0x55e0d6e12ba0] rfps: 29.750000 0.001788
 [x11grab @ 0x55e0d6e12ba0] rfps: 29.833333 0.000689
     Last message repeated 1 times
 [x11grab @ 0x55e0d6e12ba0] rfps: 29.916667 0.000104
     Last message repeated 1 times
 [x11grab @ 0x55e0d6e12ba0] rfps: 30.000000 0.000034
     Last message repeated 1 times
 [x11grab @ 0x55e0d6e12ba0] rfps: 60.000000 0.000136
     Last message repeated 1 times
 [x11grab @ 0x55e0d6e12ba0] rfps: 120.000000 0.000544
     Last message repeated 1 times
 [x11grab @ 0x55e0d6e12ba0] rfps: 240.000000 0.002174
     Last message repeated 1 times
 [x11grab @ 0x55e0d6e12ba0] rfps: 29.970030 0.000000
     Last message repeated 1 times
 [x11grab @ 0x55e0d6e12ba0] rfps: 59.940060 0.000000
     Last message repeated 1 times
 [x11grab @ 0x55e0d6e12ba0] stream 0: start_time: 1475851055.803 duration:
 -9223372036854.775
 [x11grab @ 0x55e0d6e12ba0] format: start_time: 1475851055.803 duration:
 -9223372036854.775 bitrate=0 kb/s
 Input #0, x11grab, from ':0+0,0':
   Duration: N/A, start: 1475851055.802931, bitrate: N/A
     Stream #0:0, 21, 1/1000000: Video: rawvideo, 1 reference frame (BGR[0]
 / 0x524742), bgr0, 48x64, 0/1, 29.97 fps, 29.97 tbr, 1000k tbn, 1000k tbc
 Successfully opened the file.
 Parsing a group of options: output file -.
 Applying option f (force format) with argument image2.
 Applying option codec:v (codec name) with argument png.
 Applying option frames:v (set the number of frames to output) with
 argument 1.
 Successfully parsed a group of options.
 Opening an output file: -.
 Successfully opened the file.
 detected 4 logical cores
 [graph 0 input from stream 0:0 @ 0x55e0d6e228e0] Setting 'video_size' to
 value '48x64'
 [graph 0 input from stream 0:0 @ 0x55e0d6e228e0] Setting 'pix_fmt' to
 value '298'
 [graph 0 input from stream 0:0 @ 0x55e0d6e228e0] Setting 'time_base' to
 value '1/1000000'
 [graph 0 input from stream 0:0 @ 0x55e0d6e228e0] Setting 'pixel_aspect' to
 value '0/1'
 [graph 0 input from stream 0:0 @ 0x55e0d6e228e0] Setting 'sws_param' to
 value 'flags=2'
 [graph 0 input from stream 0:0 @ 0x55e0d6e228e0] Setting 'frame_rate' to
 value '30000/1001'
 [graph 0 input from stream 0:0 @ 0x55e0d6e228e0] w:48 h:64 pixfmt:bgr0
 tb:1/1000000 fr:30000/1001 sar:0/1 sws_param:flags=2
 [format @ 0x55e0d6e22e60] compat: called with
 args=[rgb24|rgba|rgb48be|rgba64be|pal8|gray|ya8|gray16be|ya16be|monob]
 [format @ 0x55e0d6e22e60] Setting 'pix_fmts' to value
 'rgb24|rgba|rgb48be|rgba64be|pal8|gray|ya8|gray16be|ya16be|monob'
 [auto-inserted scaler 0 @ 0x55e0d6e23ec0] Setting 'flags' to value
 'bicubic'
 [auto-inserted scaler 0 @ 0x55e0d6e23ec0] w:iw h:ih flags:'bicubic'
 interl:0
 [format @ 0x55e0d6e22e60] auto-inserting filter 'auto-inserted scaler 0'
 between the filter 'Parsed_null_0' and the filter 'format'
 [AVFilterGraph @ 0x55e0d6e1f100] query_formats: 4 queried, 2 merged, 1
 already done, 0 delayed
 [auto-inserted scaler 0 @ 0x55e0d6e23ec0] picking rgb24 out of 9 ref:bgr0
 alpha:0
 [swscaler @ 0x55e0d6e24080] Forcing full internal H chroma due to input
 having non subsampled chroma
 [auto-inserted scaler 0 @ 0x55e0d6e23ec0] w:48 h:64 fmt:bgr0 sar:0/1 ->
 w:48 h:64 fmt:rgb24 sar:0/1 flags:0x4
 Output #0, image2, to 'pipe:':
   Metadata:
     encoder         : Lavf57.51.103
     Stream #0:0, 0, 1001/30000: Video: png, 1 reference frame, rgb24,
 48x64, 0/1, q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc
     Metadata:
       encoder         : Lavc57.61.100 png
 Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo (native) -> png (native))
 cur_dts is invalid (this is harmless if it occurs once at the start per
 stream)
 [rawvideo @ 0x55e0d6e1a920] PACKET SIZE: 12288, STRIDE: 192
 Clipping frame in rate conversion by 0.000008
 No more output streams to write to, finishing.
 [pipe @ 0x55e0d6f85020] Setting default whitelist 'crypto'
 [AVIOContext @ 0x55e0d6f85100] Statistics: 0 seeks, 1 writeouts
 frame=    1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.03 bitrate=N/A
 speed=94.8x
 video:1kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 Input file #0 (:0+0,0):
   Input stream #0:0 (video): 1 packets read (12288 bytes); 1 frames
 decoded;
   Total: 1 packets (12288 bytes) demuxed
 Output file #0 (pipe:):
   Output stream #0:0 (video): 1 frames encoded; 1 packets muxed (1269
 bytes);
   Total: 1 packets (1269 bytes) muxed
 1 frames successfully decoded, 0 decoding errors
 }}}

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


More information about the FFmpeg-trac mailing list