YaLTeR / bxt-rs

Fastest video recording and TAS tools for Half-Life & mods.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[bxt_cap] Game freezes until moov atom flag is moved to the beginning of the file

chinese-soup opened this issue · comments

commented

Game freezes upon finishing capturing until ffmpeg finishes:
[mp4 @ 0x55602df8f400] Starting second pass: moving the moov atom to the beginning of the file

Is there a way for it to not freeze the game while still preserving the faststart flag?

While there should be nothing preventing bxt-rs from detaching the FFmpeg subprocess once we're done pumping data into it, the freeze was left semi-intentionally.

  1. It gives a clear indication of when the output mp4 is ready to use.
  2. It lets bxt-rs collect the final FFmpeg output (possibly containing errors) and display it without causing confusion with potentially the next capture running.
  3. It prevents a class of errors when you bxt_cap_stop then bxt_cap_start before the previous one finishes.

That's not to say I like the freeze, maybe some alternative solution like freezing on bxt_cap_start till the previous capture is done can work.