Can I reduce the delay between video frames?
It can be done with ffmpeg. I ended up using following:

ffmpeg -i input-file -vf "setpts=ifnot(isnan(PREV_OUTPTS)\,PREV_OUTPTS) + min(1000\,PTS - PREV_INPTS)" -c:v libx264 -preset ultrafast -crf 0 output.mkv


You can print expressions like this, which is useful for testing:

ffmpeg -i input-file -vf "setpts=print(PREV_INPTS)\;print(PTS - PREV_INPTS)\;print(ifnot(isnan(PREV_OUTPTS)\,PREV_OUTPTS) + min(1000\,PTS - PREV_INPTS))" -c:v libx264 -preset ultrafast -crf 0 output.mkv


Following documentation may be helpful:

https://ffmpeg.org/ffmpeg-all.html#Expression-Evaluation

https://ffmpeg.org/ffmpeg-all.html#setpts