Save foreground and background in Remove Background

Hi

I have compiled the Remove Background tutorial successfully and it gives me impressive results for my use case. I now have two questions:

  1. The tutorial shows the foreground on the screen - how can I save these in a video?
  2. How can I save the background in a video?

Thanks

Rainer