if some one get DISPLAY: error message here is solution
Opened this issue · 2 comments
Hi first thanks for this great script , second I had issue the script couldnt recocgnize the right Desiplay name anyway I use this fixed value to solve my issue -i :0.0+$X,$Y
ffmpeg -f x11grab -s "$W"x"$H" -framerate 60 -thread_queue_size 512 -i :0.0+$X,$Y \
I hope this helps someone else , and if you have issue with the new parameters , use this command to get your display number
ps -u $(id -u) -o pid= | xargs -I PID -r cat /proc/PID/environ 2> /dev/null | tr '\0' '\n' | grep ^DISPLAY=: | sort -u
@SalimF I think that's when not using XORG so there's no $DISPLAY
I made a PR to fix it :) #3
You can try the code here: https://github.com/SPDUK/screen-recorder-script/blob/3d96d5c90c8309d36a867888a48b262b8fe16422/recorder.sh
Let me know if it fixes it (works on my machine) and then I can merge it
Nope it's not working for me I got this error
[x11grab @ 0x55cf3c13a080] Cannot open display .0+1,0, error 5.
.0+1,0: Input/output error
BTW I'm using Linux Mint 19 XFCE