FaceRig

FaceRig

View Stats:
J.Clockson 29 Sep, 2017 @ 12:59pm
Output Delay
Well, you see,I use facerig as facecam in OBS for gaming/letsplays/blablabla.
The visuals of FaceRig is, what's coming in the most delayed. So to get it all synced up, I let everything else (game video/sound, mic) wait for it.
This waiting time, on my system, is around 400ms.

This workes pretty good so far.

The problem is, this waiting time changes, depending on how demanding the game I play is, in regards of system resources.

So, first, a question:
Can I somewhere see/read out, how delayed the (visual) output of facerig is. Like, how many milliseconds past "realtime output" the delay is.

And second, my suggestion:
If a realtime output (0ms delay) is impossible (what it is)
and the minimal delay (depending on the current other workload (game) of the system) is AROUND 400ms,
can you give us the posibility to delay the facerig output a little more to a FIXED output delay, say 500ms.

Does this, or something of this, is somehow understandable? o_O"
Because, I know, what I mean, but I fear I am very weak in explaining stuff in a language, other than my mother tongue ^_^"
Last edited by J.Clockson; 29 Sep, 2017 @ 12:59pm
< >
Showing 1-4 of 4 comments
Adina_Animaze  [developer] 2 Oct, 2017 @ 6:19am 
Hi Ludd,

I think I understood your suggestions, but for now I can only give you a few tips on how to improve the performance.
The thing s that it is normal for all software to have delays or hang-ups if there are more than one running at the same time.
So having FaceRig run in the same time with OBS and another game, will result in delays which we can't really estimate how many seconds they'll be because it all depends on how your system deals with all the programs running in the same time.
There are some things that you can do to make FaceRig footprint smaller on your setup:
1. use FaceRig at a lower resolution, you can go as low as 960x540. I assume you are using FaceRig as webcam view, so the view is already small.
2. use a lower setting in the game you are streaming, after all, you are basically streaming two games (resource wise)
3. use window capture instead of FaceRig Virtual Webcam and disable Broadcast. There is an option to hide the interface.
4. limit FaceRig's refresh rate to 24-30 fps. Go to General Options, Performance Tab.
5. Camera resolution needs to be low.

If I didn't understand it right, please let me know (:
J.Clockson 2 Oct, 2017 @ 12:18pm 
Many, many thanks for your answer.

I am totally aware, that there will always be a delay.
And I did like all your tips. And yes, it helps and I am pretty happy with the result, but one has to do it for every new project.
Also, in December, when I buy me a new gfx-card (sigh, December....), I have to manual recalibrate everything again, for every ongoing project o_O.

It just would be very helpfull to see the current delay as a number on screen.
Even better to set the delay to a slightly higher, but then constant number.

...I am not a programmer, but... xD
Couldnt one set a "system time marker1" when facerig gets its input for starting processing,
and set a second "system time marker2" when it's done with processing and outputting the image.

Now you could substract marker2 from marker1 and - taDA xD - You have the current delay time value..?


Sazzaj  [developer] 3 Oct, 2017 @ 7:35am 
You can actually compute the total delay with info present in FaceRig's UI, although it is not ready at hand posted on the apps HUD.

You have the tracking delay, which is set by the camera refresh rate, so if you choose a resolution with 30fps, you should have a max 0.033 seconds delay from there.

You have the application rendering rate (General Options > Performance tab), which should be a steady 60 fps, that's 0.016 seconds per frame, although sending the video frame through the Virtual Camera, is a triple buffer process so you are actually seeing two frames back, so the video delay is about 0.032 seconds.

The animation is smoothed out using some temporal filtering which may add up to 0.05 - 0.1 seconds of delay, although I'm sure you aren't noticing it very much.

All in all, there shouldn't be more than 0.166 seconds delay on FaceRig's part if you are running this configuration and it has access to resources properly. If the refresh rate of the app goes down to 30, you'll raising the delay to ~0.2 seconds. I wouldn't add the animation smoothing delay here, because you are mentioning a video delay, so the delay between what you see in FaceRig and what you see in broadcast, the animation smoothing is hidden by what you see in FaceRig and should not affect the overall time.

I'm not exactly sure what your setup is and how did you compute the video delay to get the 0.4 seconds value, but you need to take into account that any software that broadcasts and encodes video data will add some processing delay.
J.Clockson 3 Oct, 2017 @ 9:30am 
Hallo Sazzaj,
thank you very much for your (way to serious) answer on my amateurish question o_O"

If I would have known before hand, that someone of your team would be putting out such an indepth answer to that (and maybe therefore have to interupt a more importend task), I would not have asked. I mean it. So, thank you for your time.
~
Like I said, I am not a programmer. The topic just came up in my mind, while using facerig alongside different gaming recording sessions.

I will try to put you provided numbers to good use while testing along. Again, thank you very much for that.

In regards of the 400ms/ .4s delay:
It is just a value, which seems to fit for most cases on my rig - achieved by pure testing; the delay I have to put every other source in OBS (game visuals/sound and mic) to get these in sync with facerig on a recording.

Last edited by J.Clockson; 3 Oct, 2017 @ 9:33am
< >
Showing 1-4 of 4 comments
Per page: 1530 50