[FFmpeg-user] ffmpeg stuck grabbing the screen
Martin Ždila
m.zdila at gmail.com
Mon Feb 27 12:04:59 EET 2017
Hello,
We have ubuntu xenial installed where we run Xvfb and use ffmpeg to grab
screen from it. On the one machine it unfortunately gets stuck on 12th
frame, unless we provide -r parameter:
ffmpeg -y -loglevel debug -video_size 320x340 -framerate 25 -f x11grab -i
:0.0+100,200 output.mp4
ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --enable-nonfree --enable-gpl --enable-version3
--enable-x11grab --cpu=native --enable-libx264 --enable-libpulse
--enable-libfdk-aac
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Splitting the commandline.
Reading option '-y' ... matched as option 'y' (overwrite output files) with
argument '1'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument 'debug'.
Reading option '-video_size' ... matched as AVOption 'video_size' with
argument '320x340'.
Reading option '-framerate' ... matched as AVOption 'framerate' with
argument '25'.
Reading option '-f' ... matched as option 'f' (force format) with argument
'x11grab'.
Reading option '-i' ... matched as input url with argument ':0.0+100,200'.
Reading option 'output.mp4' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option y (overwrite output files) with argument 1.
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url :0.0+100,200.
Applying option f (force format) with argument x11grab.
Successfully parsed a group of options.
Opening an input file: :0.0+100,200.
[x11grab @ 0x2e464e0] Probe buffer size limit of 5000000 bytes reached
[x11grab @ 0x2e464e0] Stream #0: not enough frames to estimate rate;
consider increasing probesize
Input #0, x11grab, from ':0.0+100,200':
Duration: N/A, bitrate: N/A
Stream #0:0, 12, 1/1000000: Video: rawvideo, 1 reference frame (BGR[0]
/ 0x524742), bgr0, 320x340, 0/1, 25 fps, 1000k tbr, 1000k tbn, 1000k tbc
Successfully opened the file.
Parsing a group of options: output url output.mp4.
Successfully parsed a group of options.
Opening an output file: output.mp4.
[file @ 0x2e551c0] Setting default whitelist 'file,crypto'
Successfully opened the file.
detected 1 logical cores
[graph 0 input from stream 0:0 @ 0x2e548e0] Setting 'video_size' to value
'320x340'
[graph 0 input from stream 0:0 @ 0x2e548e0] Setting 'pix_fmt' to value '298'
[graph 0 input from stream 0:0 @ 0x2e548e0] Setting 'time_base' to value
'1/1000000'
[graph 0 input from stream 0:0 @ 0x2e548e0] Setting 'pixel_aspect' to value
'0/1'
[graph 0 input from stream 0:0 @ 0x2e548e0] Setting 'sws_param' to value
'flags=2'
[graph 0 input from stream 0:0 @ 0x2e548e0] Setting 'frame_rate' to value
'25/1'
[graph 0 input from stream 0:0 @ 0x2e548e0] w:320 h:340 pixfmt:bgr0
tb:1/1000000 fr:25/1 sar:0/1 sws_param:flags=2
[format @ 0x2e53740] compat: called with
args=[yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21]
[format @ 0x2e53740] Setting 'pix_fmts' to value
'yuv420p|yuvj420p|yuv422p|yuvj422p|yuv444p|yuvj444p|nv12|nv16|nv21'
[auto-inserted scaler 0 @ 0x2e527c0] Setting 'flags' to value 'bicubic'
[auto-inserted scaler 0 @ 0x2e527c0] w:iw h:ih flags:'bicubic' interl:0
[format @ 0x2e53740] auto-inserting filter 'auto-inserted scaler 0' between
the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 0x2e54800] query_formats: 4 queried, 2 merged, 1 already
done, 0 delayed
[auto-inserted scaler 0 @ 0x2e527c0] picking yuv444p out of 8 ref:bgr0
alpha:0
[auto-inserted scaler 0 @ 0x2e527c0] w:320 h:340 fmt:bgr0 sar:0/1 -> w:320
h:340 fmt:yuv444p sar:0/1 flags:0x4
No pixel format specified, yuv444p for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264 @ 0x2e51840] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x2e51840] profile High 4:4:4 Predictive, level 2.1, 4:4:4 8-bit
[libx264 @ 0x2e51840] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC codec
- Copyleft 2003-2015 - http://www.videolan.org/x264.html - options: cabac=1
ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 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=4 threads=1 lookahead_threads=1
sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0
constrained_intra=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=25 scenecut=40
intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0
qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output.mp4':
Metadata:
encoder : Lavf57.56.101
Stream #0:0, 0, 1/12800: Video: h264 (libx264), 1 reference frame
([33][0][0][0] / 0x0021), yuv444p, 320x340, 0/1, q=-1--1, 25 fps, 12800
tbn, 25 tbc
Metadata:
encoder : Lavc57.64.101 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per
stream)
[rawvideo @ 0x2e4fce0] PACKET SIZE: 435200, STRIDE: 1280
Clipping frame in rate conversion by 0.000008
cur_dts is invalid (this is harmless if it occurs once at the start per
stream)
[rawvideo @ 0x2e4fce0] PACKET SIZE: 435200, STRIDE: 1280
cur_dts is invalid (this is harmless if it occurs once at the start per
stream)
[rawvideo @ 0x2e4fce0] PACKET SIZE: 435200, STRIDE: 1280
cur_dts is invalid (this is harmless if it occurs once at the start per
stream)
[rawvideo @ 0x2e4fce0] PACKET SIZE: 435200, STRIDE: 1280
cur_dts is invalid (this is harmless if it occurs once at the start per
stream)
[rawvideo @ 0x2e4fce0] PACKET SIZE: 435200, STRIDE: 1280
cur_dts is invalid (this is harmless if it occurs once at the start per
stream)
[rawvideo @ 0x2e4fce0] PACKET SIZE: 435200, STRIDE: 1280
cur_dts is invalid (this is harmless if it occurs once at the start per
stream)
[rawvideo @ 0x2e4fce0] PACKET SIZE: 435200, STRIDE: 1280
cur_dts is invalid (this is harmless if it occurs once at the start per
stream)
[rawvideo @ 0x2e4fce0] PACKET SIZE: 435200, STRIDE: 1280
cur_dts is invalid (this is harmless if it occurs once at the start per
stream)
[rawvideo @ 0x2e4fce0] PACKET SIZE: 435200, STRIDE: 1280
cur_dts is invalid (this is harmless if it occurs once at the start per
stream)
[rawvideo @ 0x2e4fce0] PACKET SIZE: 435200, STRIDE: 1280
cur_dts is invalid (this is harmless if it occurs once at the start per
stream)
[rawvideo @ 0x2e4fce0] PACKET SIZE: 435200, STRIDE: 1280
cur_dts is invalid (this is harmless if it occurs once at the start per
stream)
[rawvideo @ 0x2e4fce0] PACKET SIZE: 435200, STRIDE: 1280
cur_dts is invalid (this is harmless if it occurs once at the start per
stream)
[rawvideo @ 0x2e4fce0] PACKET SIZE: 435200, STRIDE: 1280
cur_dts is invalid (this is harmless if it occurs once at the start per
stream)
[rawvideo @ 0x2e4fce0] PACKET SIZE: 435200, STRIDE: 1280
*** dropping frame 12 from stream 0 at ts 0
cur_dts is invalid (this is harmless if it occurs once at the start per
stream)
[rawvideo @ 0x2e4fce0] PACKET SIZE: 435200, STRIDE: 1280
*** dropping frame 12 from stream 0 at ts 0
cur_dts is invalid (this is harmless if it occurs once at the start per
stream)
...
Ffmpeg is compiled from the source. On the different machine, also with
ubuntu xenial and the same ffmpeg version it works without providig -r
parameter.
Is it a bug? Should we report it?
--
Ing. Martin Ždila
More information about the ffmpeg-user
mailing list