A package was stolen from my package box recently. I knew it happened sometime between Saturday at noon and Sunday at 10 am. During that time I have 93 one-minute video snippets of my package box (I live on a busy street). Clicking on each one was quite tedious and watching each one in full on the Wyze app would take me over 15 hours, not including the time it takes to queue up the next one.
I decided to figure out how to export all those clips, combine them into one video, and watch it at 4x speed.
Pull the SD card from your camera. The video files are located in the
"record" folder. They are saved as individual clips with the structure
/record/date/hour/minute.mp4
.
When you copy off just the clips you're interested in make sure to
keep them in the same
/date/hour/minute.mp4
structure!
I created a script that:
# !/usr/bin/python
import os
################################
## PULL FILES INTO ONE FOLDER ##
################################
dir_path = '../Videos'
days = os.listdir(dir_path)
for day in days:
hours = os.listdir(dir_path + "/"+day)
for hour in hours:
minutes = os.listdir(dir_path + "/" + day + "/" + hour)
if minutes != []:
for minute in minutes:
old_name = dir_path + "/" + day + "/" + hour + "/" + minute
new_name = dir_path + "/" + day + hour + minute
os.rename(old_name, new_name)
###########################
## CREATE FILE NAME LIST ##
###########################
videos = os.listdir(dir_path)
for vid in sorted(videos):
if ".mp4" in vid:
print("file" + " '" + dir_path + "/" + vid + "'")
Name this script processfiles.py
.
Check that dir_path
points to your
videos!
Run the file using:
python3 processfiles.py > mylist.txt
This will create a new file mylist.txt which we will use in the next step.
If you don't already have ffmpeg, install it with:
sudo apt install ffmpeg
Run ffmpeg with:
ffmpeg -f concat -safe 0 -i mylist.txt -c copy allvids.mkv
VLC will allow you to increase the playback speed by going to the Playback menu option and selecting the speed option.
I watched it at about 3-4x speed and found my thief after about 15 minutes.