Vid-20220607-wa0021mp4 (2026)
To turn a filename like into a "proper feature" for a dataset or application, you need to extract the hidden metadata. This filename is a standard format used by WhatsApp , and it contains specific temporal data. The Extracted Feature Original Filename: VID-20220607-WA0021.mp4 Media Type: Video Date Recorded/Saved: June 7, 2022 Source: WhatsApp ( WA )
import re from datetime import datetime filename = "VID-20220607-WA0021.mp4" # Fast extraction using Regex match = re.search(r"VID-(\d{4})(\d{2})(\d{2})-WA(\d+)", filename) if match: year, month, day, seq = match.groups() date_obj = datetime(int(year), int(month), int(day)) feature_set = { "is_video": True, "date": date_obj.strftime('%Y-%m-%d'), "day_name": date_obj.strftime('%A'), "whatsapp_sequence": int(seq) } print(feature_set) Use code with caution. VID-20220607-WA0021mp4
0021 (The 21st media file saved on that specific day) How to Programmatically Create Features To turn a filename like into a "proper