Inspiration

Imagine that something serious happens at a business, a public building, or another location with security cameras. Someone needs to understand what happened, but there may be several hours of surveillance footage to review. The incident itself might have lasted less than a minute. Finding that minute, however, could take hours. That is the problem that inspired Afterimage.

I started thinking about how much important information is stored in surveillance footage and how difficult it can be to access when it matters most. Having security cameras does not automatically mean that relevant footage will be found quickly. Someone still has to locate the right recording, review it, and identify the moments worth examining. I came across a particularly interesting example involving Jocelyn Pilling and Whole Foods Market. In a 2023 California court ruling concerning an incident in 2021, the court discussed how some relevant surveillance footage had become unavailable through normal system operations. The case made me consider how much important information can be lost or become difficult to access.

The more I researched the subject, the more I realized this was a documented challenge. The Scientific Working Group on Digital Evidence discusses how surveillance recordings can be overwritten because of retention limits, while the College of Policing highlights the time and effort involved in retrieving and reviewing CCTV footage. Research from the Australian Institute of Criminology also found that nine in ten interviewed investigators used CCTV when it was available. These findings helped me understand that the problem wasn't simply a lack of information. It was the difficulty of finding useful information within enormous amounts of recorded footage.

I began asking myself a question: What if someone could upload surveillance footage and have AI help identify the moments that deserve attention first? Rather than spending hours watching a recording from beginning to end, what if technology could help narrow the search to specific timestamps and provide context about what happened? That question became Afterimage. My goal is to help people spend less time searching through recordings and more time understanding them. I believe that making information accessible sooner can have real value, particularly in situations where time matters.

What it does

Afterimage is an AI-powered surveillance video analysis platform designed to help users identify potentially significant events within recorded footage without manually watching every second. Users provide a video, and the application analyzes its visual content and available audio to identify moments that may deserve further attention. Instead of returning only a general summary, Afterimage organizes its findings into individual events with timestamps and explanations.

The current application focuses on several capabilities:

  1. Video analysis: Users upload a recording for AI-assisted analysis of its visual content.

  2. Significant event identification: The system identifies potentially important moments and provides contextual explanations.

  3. Timestamp-based navigation: Each identified event is connected to its corresponding location in the original recording.

  4. Audio transcription: OpenAI Whisper transcribes available audio to provide additional context.

  5. Individual clip generation: Users can select an identified event and generate a shorter recording around that moment.

  6. Downloadable results: The application is designed to provide downloadable clips and associated caption files.

The central idea is to give users a starting point for reviewing lengthy recordings. Rather than searching through an entire video, they can first examine the moments identified by the system. Afterimage is intended to support security personnel, investigators, organizations, and other authorized users by making recorded information easier to access and review. It is an assistance tool, not a system that independently determines what happened.

How we built it

I built Afterimage as a full-stack web application combining frontend development, backend processing, artificial intelligence, and video processing. The frontend uses React, Vite, JavaScript, TypeScript, and Tailwind CSS, while the backend uses Node.js and Express to handle uploads, analysis requests, and communication between services.

For AI analysis, I integrated OpenAI's GPT-4.1-mini and Whisper for audio transcription. I also incorporated FFmpeg to process recordings and extract selected portions of videos. This was particularly important because I didn't want the application to simply tell someone where an event occurred. I wanted users to be able to access that section of the original recording directly.

The workflow begins when a user uploads a recording. The backend prepares the video for analysis, the AI services examine the available visual and audio information, and the application organizes the results into timestamped events. Users can then select an event for closer review, with FFmpeg handling the corresponding video processing.

The frontend is deployed through Vercel, while the Express backend runs on Render. Connecting these separate services required careful configuration of API endpoints, environment variables, file storage, and processing limits. Video files also introduced practical challenges involving upload sizes, server resources, and processing time. Bringing all these components together taught me that building an AI application involves much more than simply connecting a model to a website.

Challenges we ran into

This was easily the most difficult part of building Afterimage. I expected the AI integration to take time, but I didn't anticipate how many problems would come from getting the different components to communicate. One of my first major challenges was a persistent 401 Incorrect API key error from OpenAI. Even though I thought I had entered the correct key, the error showed a partially masked key ending in different characters than the one in my .env file. I had to investigate how environment variables were loaded, where the backend was getting its credentials, and whether my local configuration matched the settings on Render.

Deploying the backend introduced another set of problems. Since the frontend was hosted on Vercel and the backend ran separately on Render, I had to troubleshoot API URLs, deployment settings, and file locations. At one point, generated clip links were pointing to the frontend instead of the backend where the actual files were stored. Clip generation became another major challenge. Although Afterimage could identify events, the resulting FFmpeg requests sometimes produced empty videos or server errors. I had to investigate how timestamps were passed between the AI analysis and video-processing systems.

Testing also became expensive because repeating a complete AI analysis used additional API credits, even when the actual problem was somewhere else in the backend. I gradually learned to isolate individual components and test the specific part that was failing instead of repeatedly running the entire workflow. These challenges taught me that getting one feature to work is very different from building an application that works reliably as a complete system.

Accomplishments that we're proud of

One of the accomplishments I am most proud of is taking an idea based on a real problem and turning it into an actual, deployed application. I didn't want Afterimage to be another project that looked impressive but only demonstrated an AI interface. I wanted to build something that could accept a recording, analyze its contents, identify potentially significant events, and connect those events to the original footage.

I am particularly proud of the event-to-timestamp workflow because it represents the central idea behind Afterimage. Identifying an event is only useful if someone can actually find and examine it. Bringing together AI analysis, transcription, timestamp navigation, and video processing required me to think beyond the model's response and build an entire system around it.

More than anything, I am proud that Afterimage has a purpose beyond demonstrating what AI can do. I started with a problem involving real recordings and the difficulty of finding important moments. Having a deployed application that brings these technologies together, even while I continue improving its reliability, is something I am genuinely proud of.

What we learned

Building Afterimage changed how I think about developing AI applications. Before this project, it was easy to think of an AI model as the central part of a product: provide information, receive an answer, and display the result. In practice, the model is only one part of a much larger system. The backend has to process the recording, timestamps need to correspond to the correct moments, and video-processing tools need to produce clips that actually work. Each problem forced me to understand how the different components depended on one another.

I also learned that using AI in a security-related application requires a different level of care. AI can miss an event, misunderstand what it sees, or provide descriptions without enough context. Something unusual is not automatically evidence of wrongdoing, and an event the model overlooks could still matter. That is why I see Afterimage as an assistance tool rather than a system that determines what happened. Its purpose is to help people locate potentially relevant footage while leaving the original recording available for human review and verification.

Perhaps the biggest lesson was understanding that efficiency isn't simply about making something faster. It is about identifying unnecessary work, improving how information moves through a process, and allowing people to spend more time on the tasks that actually matter. I also learned that privacy, appropriate access, and the preservation of original recordings must be considered from the beginning, particularly when working with sensitive surveillance footage.

What's next for After Image

The current version of Afterimage is a foundation, and there is still a lot I want to improve. My first priority is making the existing workflow more reliable, particularly the connection between event detection, timestamps, and clip generation. If the application identifies an event at a certain point in a recording, the resulting clip needs to contain the correct moment and enough surrounding context for someone to understand what happened.

One direction I find particularly interesting is supporting multiple camera recordings around the same incident. For example, an event at a public building might appear in footage from several different cameras. A reviewer could otherwise spend considerable time opening recordings individually and comparing timestamps. Organizing multiple recordings around a common timeframe and helping users locate relevant sections could make the process significantly more efficient. This is not something the current version supports yet, but it is a direction I would like to explore.

I also want to improve how Afterimage explains its findings and makes them easier to review. AI-generated descriptions should never replace the original footage or be treated as definitive conclusions. Any real-world implementation would also need secure file handling, appropriate access controls, clear retention policies, and safeguards against unauthorized use. My focus is on helping authorized users review specific recordings, not identifying or tracking individuals.

Ultimately, I want Afterimage to make reviewing surveillance footage less about searching through hours of recordings and more about getting to the moments that deserve attention. There is still a lot to prove, especially when it comes to reliability, but I want to continue developing it into something with practical value beyond a hackathon demonstration.

Afterimage is built around one idea: when something important happens, finding the moment should not be the hardest part.

Built With

Share this project:

Updates

Submission history