Recording error on Jenkins slave
da-yaroslav-orel opened this issue · 14 comments
Can you please look into this?
08:30:23 INFO -Trying to execute the following command: [cmd, /c, for /f "tokens=2" %i in ('tasklist ^| findstr "ffmpeg"') do @echo %i]
08:30:23 INFO -Trying to execute the following command: [SendSignalCtrlC.exe, ]
08:30:23 INFO -Process kill output: "" is not a valid PID.
0x00000057 == (FormatMessage failed)
08:30:23 DEBUG -Recording output log: ffmpeg version N-81784-g92de2c2 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 30.100 / 55. 30.100
libavcodec 57. 58.100 / 57. 58.100
libavformat 57. 51.100 / 57. 51.100
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 63.100 / 6. 63.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 2.100 / 2. 2.100
libpostproc 54. 0.100 / 54. 0.100
[gdigrab @ 0000000001c32cc0] Capturing whole desktop as 1920x1080x32 at (0,0)
[gdigrab @ 0000000001c32cc0] Failed to capture image (error 5)
[gdigrab @ 0000000001c32cc0] Could not find codec parameters for stream 0 (Video: bmp, none, 1988680 kb/s): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, gdigrab, from 'desktop':
Duration: N/A, bitrate: 1988680 kb/s
Stream #0:0: Video: bmp, none, 1988680 kb/s, 29.97 fps, 1000k tbr, 1000k tbn, 1000k tbc
Output #0, mp4, to 'D:\Jenkins\YO\workspace\Development\VideoEnroll\Framework\target\video\temporary_recording_2016_13_10_08_29_38.mp4':
Output file #0 does not contain any stream
Could you provide more details? What operation systems is?
From logs I see 08:30:23 INFO -Process kill output: "" is not a valid PID.
It means that ffmpeg process id detected incorrectly. By to understand why? We need to get more information
Windows Server 2012
It's a remote vm. It's configured to be Jenkins slave.
I have access there via RDP.
I tried to execute this command line through build job:
ffmpeg -y -video_size 1920x1080 -f gdigrab -i desktop -an -framerate 24 D:\Jenkins\YO\workspace\Multi-Product-Enrollment\Framework\target\video\temporary_recording.mp4
It's interesting that it starts to record only if I have active RDP session going on.
If session is off or session window is minimized, it fails with the error I posted earlier : [gdigrab @ 0000000001c32cc0] Failed to capture image (error 5)
So it's not a bug in VideoRecorder. I think you should google about ffmpeg and gdigrab and RDP. Probably when you singn off machine it closes session and disconect the screen. So for ffmpeg it looks like you machine doesn't have monitor
Maybe you have workaround ideas?
I would suggest to use VNC instead of RDP,. Second variant is to Google about this problem :)
VNC is no better. I googled about it. No luck. One of the popular solutions - redirect session to console but then i get another error: [gdigrab @ 0000000001c028a0] Capture area (0,0),(1920,1080) extends outside window area (0,0),(1024,768)desktop: I/O error
On one of my previous projects we used bat script that exit RDP without closing session. You may google such solution and try
Can't find it. Tell me, why does recorder sets resolution to (1920,1080) when it should be (1024,768) ?
VideoRecorder defines screen resolution automatically. Probably I should add ability to set screen resolution in configuration section
That would be nice
Agree, will plan it for next realease
fixed 4131c66
@da-yaroslav-orel I've found such a tool https://technet.microsoft.com/ru-ru/sysinternals/bb963905.aspx . It can help to keep RDP connection alive
I can't see how this tool should help me. Session seems to be disconnected whenever I'm not logged in manually.