Samuel Fernández Menduiña bio photo

Samuel Fernández Menduiña

Researcher at AtlantTIC, Uvigo. MSc Signal Processing, ICL.

LinkedIn Github

In this post, I aim to give a quick intro to the Electrical Network Frequency (ENF) and to provide a motivation to our letter on SPL.


First of all, the ENF is the name of a forensic criterion used in digital videos or audio recordings. For simplicity, I'll focus on the video scenario. It has tons of applications, as time of recording verification, synchronization, or forgery detection, to name a few. But, how does it work?


The electrical network has a nominal frequency of 50 Hz. That is, theoretically, it should be a beautiful waveform, as the following one:




Even though, due to the generating mechanisms of the electrical energy, when the power demand increases, the frequency decreases slightly (and conversely, when the power demand decreases the frequency increases). In large scale networks, this leads to random frequency drift, that can be considered unique in time. For instance, you may check the frequency in the European grid in real-time here.


Finally, when using the voltage from the network to power lamps, the luminance they produce is proportional to the intensity they receive. Those skilled in the art would say there's a rectification process as well, but we shouldn't spoil a good story with non-linearities, should we?


Hence, the variations in the frequency of the network translate to variations in the luminance of the lamps. And they can be captured with digital cameras. Don't believe me? Check this Youtube video. Or, for a realistic scenario, you can check this one. Do you see the blink in the background? That's the ENF.


You may wonder why you don't see this variation with your own eyes. Well, it's simply too fast. Cameras can record it due to a SigProc phenomenon called aliasing, that reduces significantly the frequency of the blink. But it's unreachable for the human eye.


Then, comparing this frequency with a ground-truth (a reference signal you know in advance) allows us to obtain, for example, the time of recording. Remember, the frequency is unique in time: it would only match with the correct segment. Have a look at this example. The red one comes from the Internet, the blue one from a video recorded on real-time:




Everything seems pretty easy. Now, I can introduce one of the real problems. What if the ENF is not the only source of variation in the luminance of the video? For instance, most of the interesting videos in practice have movement. The method I depicted above fails under this scenario (now, the blue one is the ground truth):




And this is the problem we tried to solve in our paper. As a spoiler, we obtained:



But I may write another entry only devoted to this. Hope you find the post entertaining!