Virtual Cinematography Using Optimization And Temporal Smoothing