-
Notifications
You must be signed in to change notification settings - Fork 4
Add testing of synchronization script with virtual screen buffer #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #167 +/- ##
=========================================
- Coverage 4.46% 4.44% -0.03%
=========================================
Files 19 19
Lines 1924 1933 +9
Branches 262 263 +1
=========================================
Hits 86 86
- Misses 1838 1847 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…oad video artifact, #147.
|
||
- name: Test timesync-stimuli run | ||
run: | | ||
export FRAME_WIDTH=1920 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally place this into a script which could even be used locally .
Do not rely on /tmp
- use ${TMPDIR:-/tmp}
|
||
|
||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments + would be great to actually do the analysis of the grabbed .avi -- do qr parsing and see if timing is congruent with the "design".
export FRAME_HEIGHT=1080 | ||
export FRAME_RATE=60 | ||
export FRAME_BPP=24 | ||
export DISPLAY_PATH="/tmp/reprostim_last_display.txt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not hardcode paths under folders which are public, use mktemp
, e.g. smth like $(mktemp -d ${TMPDIR:-/tmp}/dl-XXXXXXX)
if you want an entire folder to place stuff in.
./test_reprostim_events.sh 2 5 5 1.5 20 "${DISPLAY}" & | ||
echo "Record video for 45 seconds" | ||
ffmpeg -video_size "${FRAME_WIDTH}x${FRAME_HEIGHT}" -framerate "${FRAME_RATE}" -f x11grab -i "$DISPLAY" -t 45 -c:v libx264 -pix_fmt yuv420p "/tmp/reprostim_screenshot_$(date +%Y-%m-%d_%H-%M-%S).mp4" | ||
sleep 45 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be move this entire block into REPROSTIM_CMD
which would already have DISPLAY
# kill Xvfb at the end | ||
sleep 1 | ||
kill $XVFB_RUN_PID | ||
wait $XVFB_RUN_PID 2>/dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when you move all those commands into a script, there would be no need for duplicating the commands here.
xvfb
locally on dev machine and provide instructions how to run scripts.xdotool
-based process generating keyboard events to simulate pulse series with5
key andq
orESC
at the end.reprostim
timesync-stimuli
command with virtual screen buffer to test it automatically with automatically generated container (Add testing of reprostim psychopy container build #146).xvfb-run
or related tool likeimport
orffmpeg
so we could test for qrcodes etc.Closes #147.