Page MenuHomePhabricator

ffmpeg stderr Capture area 1920x1080 at position 0.0 outside the screen size 1280x1024
Closed, ResolvedPublic

Description

[0-0] ffmpeg stderr: [x11grab @ 0x5558b9aa9300] Capture area 1920x1080 at position 0.0 outside the screen size 1280x1024
[0-0] ffmpeg stderr: :94: Invalid argument
[0-2] ffmpeg stderr: [x11grab @ 0x56196e0c6300] Capture area 1920x1080 at position 0.0 outside the screen size 1280x1024
[0-2] ffmpeg stderr: :94: Invalid argument
  • caused by 818403
  • the biggest problem is that the videos of test runs are not created
  • the last build with videos is 1178
  • the first build without videos is 1179
  • not only daily jobs are affected, for example a recent core patch 831231 also has the same error message (wmf-quibble-selenium-php72-docker/169397)

Event Timeline

Well done on spotting the root cause ( https://gerrit.wikimedia.org/r/c/mediawiki/core/+/818403/4/tests/selenium/wdio-mediawiki/index.js ) which does:

tests/selenium/wdio-mediawiki/index.js
		ffmpeg = spawn( 'ffmpeg', [
			'-f', 'x11grab', //  grab the X11 display
-			-video_size', '1280x1024', // video size
+			'-video_size', '1920x1080', // video size

Which got released in wdio-mediawiki 2.2.0.

Xvfb default is:

-screen screennum WxHxD
    This option creates screen screennum and sets its width, height, and depth to W,
    H,  and D respectively.  By default, only screen 0 exists and has the dimensions
    1280x1024x24.

Our CI images in integration/config either use those default or have it explicitly mentioned:

$ git grep Xvfb.*-screen
dockerfiles/node12-test-browser/run-with-xvfb.sh:/usr/bin/Xvfb "$DISPLAY" -screen 0 1280x1024x24 -ac -nolisten tcp &
dockerfiles/node14-test-browser/run-with-xvfb.sh:/usr/bin/Xvfb "$DISPLAY" -screen 0 1280x1024x24 -ac -nolisten tcp &
dockerfiles/node16-test-browser/run-with-xvfb.sh:/usr/bin/Xvfb "$DISPLAY" -screen 0 1280x1024x24 -ac -nolisten tcp &

So for the affected repo you could revert the wdio-mediawiki 2.2.0 upgrade.

A potential way to fix it is to have the lib capture the full screen and thus drop -video_size 1920x1080 entirely.

Note the size is also mentioned at:

tests/selenium/README.md:    Xvfb "$DISPLAY" -screen 0 1920x1080x24 &
zeljkofilipin triaged this task as High priority.

Change 849060 had a related patch set uploaded (by Zfilipin; author: Zfilipin):

[mediawiki/core@master] WIP selenium: ffmpeg stderr Capture area 1920x1080 at position 0.0 outside the screen size 1280x1024

https://gerrit.wikimedia.org/r/849060

A potential way to fix it is to have the lib capture the full screen and thus drop -video_size 1920x1080 entirely.

I've tried this in 849060 and the video is indeed recorded again, but unfortunately only in 640โ€Šร—โ€Š480.

Example:

Change 849060 abandoned by Zfilipin:

[mediawiki/core@master] WIP selenium: ffmpeg stderr Capture area 1920x1080 at position 0.0 outside the screen size 1280x1024

Reason:

https://gerrit.wikimedia.org/r/849060

Looks like wdio-mediawiki v2.2.0 is used only in core and CampaignEvents.

Change 849087 had a related patch set uploaded (by Zfilipin; author: Zfilipin):

[mediawiki/extensions/CampaignEvents@master] selenium: Fix video recording

https://gerrit.wikimedia.org/r/849087

Change 849073 had a related patch set uploaded (by Zfilipin; author: Zfilipin):

[mediawiki/core@master] Revert "selenium: Default to larger window size"

https://gerrit.wikimedia.org/r/849073

Change 849087 merged by jenkins-bot:

[mediawiki/extensions/CampaignEvents@master] selenium: Fix video recording

https://gerrit.wikimedia.org/r/849087

zeljkofilipin changed the task status from Open to In Progress.Oct 25 2022, 1:11 PM

Change 849073 merged by jenkins-bot:

[mediawiki/core@master] Revert "selenium: Default to larger window size"

https://gerrit.wikimedia.org/r/849073

Change 959812 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/core@master] wdio-mediawiki: Release 2.3.0

https://gerrit.wikimedia.org/r/959812

Change 959812 merged by jenkins-bot:

[mediawiki/core@master] wdio-mediawiki: Release 2.3.0

https://gerrit.wikimedia.org/r/959812