ShareX / ShareX

ShareX is a free and open source program that lets you capture or record any area of your screen and share it with a single press of a key. It also allows uploading images, text or other types of files to many supported destinations you can choose from.
https://getsharex.com
GNU General Public License v3.0
27.98k stars 3.09k forks source link

[bug] Screen recorder with custom command doesn't have variables for `offset_x` / `y` and `width` / `height` #7391

Open XCanG opened 1 month ago

XCanG commented 1 month ago

Originally I was wanted to record a timelapse video, in order to do that using custom arguments would be not enough, so I was using custom commands instead.

An example command with H.264 / NVENC in my case would be changed from (original text before I enable custom command):

-f lavfi -thread_queue_size 1024 -rtbufsize 256M -i ddagrab=output_idx=0:draw_mouse=true:framerate=60:offset_x=0:offset_y=0:video_size=1920x1080:output_fmt=bgra -c:v h264_nvenc -r 60 -preset p4 -tune hq -b:v 4000k -movflags +faststart -y "output.mp4"

to

-f lavfi -thread_queue_size 1024 -rtbufsize 256M -i ddagrab=output_idx=0:draw_mouse=true:framerate=1:offset_x=0:offset_y=0:video_size=1920x1080:output_fmt=bgra -filter_complex settb=1/60,setpts=N/TB/60 -c:v h264_nvenc -r 60 -preset p4 -tune hq -b:v 4000k -movflags +faststart -y "$output$"

A notable change would be within -i fps reduced to 1 and then with filter settb, setpts it accelerate it to 60 fps, so that it become a timelapse.

However while it is work, there only 2 variables $fps$ and $output$. There is no $x$ / $offset_x$, same with y, width, height.

Because of that region selection didn't work. I think it shouldn't be a hard fix, since the only what is need is to add those variables and put them in place when clicking on custom command checkbox.


Also, if you add natively timelapse option into UI, that would be great.