Rating: 5.0

It seems the image is revealed by a 1px area sliding from
the top to the bottom of the video. Let's merge these 1px areas
from all frames into a single image.

1) Install OpenCV and tqdm: `pip3 install opencv-python tqdm`
2) Run the exploit:
```
% cat subliminal.py
import sys
import cv2
print('CV2 versin: ', cv2.__version__)
import numpy as np
from tqdm import tqdm

def extractImages(pathIn, pathOut):
count = 0
vidcap = cv2.VideoCapture(pathIn)

# get video properties
width = round(vidcap.get(cv2.CAP_PROP_FRAME_WIDTH))
height = round(vidcap.get(cv2.CAP_PROP_FRAME_HEIGHT))
fps = round(vidcap.get(cv2.CAP_PROP_FPS))
frame_count = round(vidcap.get(cv2.CAP_PROP_FRAME_COUNT))

print("width={}, height={}, fps={}, frame_count={}".format(width, height, fps, frame_count))

result = np.zeros((height, width, 3), dtype=np.uint8)

for i in tqdm(range(frame_count)):
# get frame
vidcap.set(cv2.CAP_PROP_POS_FRAMES, i)
success, image = vidcap.read()
assert success

for j in range(width):
for k in range(3):
result[i][j][k] = image[i][j][k]

cv2.imwrite(pathOut, result)

if __name__ == '__main__':
input_video = sys.argv[1]
output_name = sys.argv[2]
extractImages(input_video, output_name)

% python3 subliminal.py subliminal_challenge.avi result.jpg
CV2 versin: 4.5.1
width=1280, height=720, fps=60, frame_count=720
100%|█████████████████████████████████| 720/720 [00:16<00:00, 42.59it/s]
```
3) Capture the flag in the `result.jpg`:
![](https://i.imgur.com/TCKbgQO.jpg)
The flag is `Hero{Fr4gM3nt3D_1m4Ge}`