# Camera-Sourced Heart Rate Synchronicity: A Measure of Immersion in Audiovisual Experiences
## 3 Methodology
### Recording Heart Rate  
A _Canon 700D_ camera [60] (purchased in the UK) was mounted in portrait orientation underneath the TV screen. This is not a state-of-the-art or specifically chosen model; it was released in 2013, and it may be considered an entry-level digital lens single-reflex camera based on its technical specifications and retail price. Previous research indicates that higher levels of video compression can negatively impact the performance of heart rate extraction from video data [61]. Hence, the camera was set to the mode with the lowest compression ratio for the camera. This led to the selection of a 1280 by 720 pixel resolution with progressive scanning (also known as 720p) and a frame rate of 50 FPS. As lower resolution negatively influences the accuracy of remote heart rate measurements [62], the camera's optical zoom was used to ensure that the participant's face took up as much of the frame as possible. Aperture and shutter speed were then set to create a bright and blur-free image. The aperture parameter was set to /5.6F. The shutter speed parameter was set at the maximum value possible for shooting at 50 FPS, 1/60s. Finally, the sensitivity (ISO) setting was raised to 1600 based on visual inspection to further brighten the video footage. _LosslessCut (V3.54.0)_[63] was used to cut the videos of the participants to 30 s before and after the film clip. Subsequently, start and end timestamps were calculated by obtaining the time the video file was created using _Exiftool (V12.60)_[64] and adding the cut times from _LosslessCut_[63]. The electrocardiogram (ECG) data were captured by a _Polar H10_[65] chest strap at a sample rate of 130 Hz and transmitted to the _Polar Sensor Logger App_[66], along with a time stamp for each sample. This recording was then truncated using the aforementioned video start and end timestamps. Hence, the ECG data and video data were synchronised using the recording device clocks. The synchrony of the clocks was assessed before each session to ensure they aligned to the nearest second. _PyVHR (V2.0)_[47] was used to estimate the heart rate during each video. The code used to process the video footage can be found in the code repository published alongside this manuscript [67]. The software operates as follows:  
* Skin patches are extracted from the facial video footage. * Pre-filtering is applied to each pixel signal within the patches. * Each patch is processed to obtain a blood volume pulse (BVP) signal. Figure 2: Power spectral density of the full 16:35 non-normalised binaural audio recordings of the audiovisual stimuli in each condition. This analysis shows the difference in the frequency spectrum influenced by the presentation mode, notably at frequencies below 200 Hz and above 15 KHz. * Post-filtering is applied to each of the BVP signals. * A rectangular windowing function is applied to each BVP signal. * For each window of the BVP signals, the peak of the power spectral density is obtained. Each of these values corresponds to the estimated HR for the corresponding patch and window. * The median of the HR values, across all patches, is obtained for each window. To allow the videos to be processed using _PyVHR_[47], they had to be rotated so that the face was the right way up, as the camera had been mounted on its side. This rotation was implemented through a change in metadata, using _Exiffool_[64]; hence, there was no loss of information within the video file. Each video was processed with the default filter parameters, and the median heart rate was obtained. To improve the accuracy of the camera-sourced HR data, this was then used to inform a second pass, where the videos were reprocessed with a low cutoff frequency set corresponding to 25 BPM below this value. To configure _PyVHR_[47], a decision had to be made regarding an appropriate stride and window length for the HR data. It is suggested that the insightful frequency range within ISC features is dependent on the stimuli [41].