A YouTuber accused of murdering his pregnant girlfriend recorded the livestream he used as an alibi four days earlier, a court heard.