Hello, dear Tip Tuesday people! During the COVID-19 emergency, many have to work from home. Some rely on metered connections, which makes gigabytes almost as precious as drinkable water. Some others have unlimited data but a slow connection, so uploading a gigabyte could take hours. For those working in the image and video field, limited data and limited speed is a nightmare. So I thought I’d share an easy tip to remind you that, with Amped Replay, you can often cut the part of the video you need without re-encoding pixels (so, no quality loss!). It only takes three clicks and may save several gigabytes… keep reading to find out more!
As usual, let’s use a simple example to explain the feature we’re talking about. We are working on this 347 MB file extracted from a DVR system. The video is wrapped in an executable file and we know it (should) includes frames from four different cameras. We’re only interested in one specific event occurring in one specific camera, and we need to share the part of interest with a colleague, who is also working from home. How can Amped Replay help us?
Let’s begin by dragging the file into the software. It will show an encouraging “Inspecting video file” progress bar, followed by an even more promising “Initializing video conversion” progress bar and, after a minute, we’re shown this lovely view:
As you can see in the red box, Replay detected the four cameras and now lets us choose the one we want to work on (Cam 1, in our case). We’re ready to play the video and search for the part of interest. We need those frames between the entrance and the exit of the motorcycle. We can click on the player bar and scrub the video very quickly until we find the scene we’re looking for. Once we’ve found it, we can move frame-by-frame using keyboard shortcuts J (previous frame) and L (next frame), or clicking on the corresponding buttons in the player bar:
Once we’re happy we click on the “Start Range” button, then we move until the end of the scene of interest, and we click on the “End Range” button. We all agree that it wouldn’t make much sense to send 4 full-length video streams when the only part of footage we need is that small chunk from Camera 1!
So what do we need to do? Since our goal is not to enhance or annotate the video, but to send the relevant part of it to our colleague, we just move to the Export tab.
Here, we see there are four buttons that all start with the word “Export”:
- Export Current Image will simply do what it says (but it’s not what we need in our case);
- Export Original Video as AVI will export the original, native video format in an AVI container. The conversion will be done with stream copy, if possible, avoiding transcoding and so avoiding quality degradation. If a frame range is selected (like in our case!), only the sub-clip will be exported;
- Export Original Video as MP4 will export the original video transcoding it to an MP4 format, so as to ensure maximum compatibility with standard players.
- Export Processed Video as MP4 will export the processed video, along with eventual enhancements or annotations to an MP4 format.
Which is the option that suits best our example? Well, it’s definitely option 2: Export Original Video as AVI! We will solve both problems (multiple cameras and unnecessarily long video) with a single click: only the selected range from Camera 1 will be exported, which is just what we needed.
After clicking on the button, we’ll simply be prompted to where we want to store the file. Stream-copy was possible in this case, so the exporting is lightning fast: frames are just copied without any re-encoding (i.e., each pixel retains its exact value after the export). And what’s the output video file size? 11.5MB. And no quality loss! We’ve simply trimmed away useless data.
Along with the exported video, a PDF report file will be created, which provides information about the file we started from (hash, codec details, etc.), details about the processing we applied (in this case, only the range selection), and the name and hash of the exported file. We will send this report to our colleague, so they can verify the integrity with the hash and they’ll be able to replicate exactly what we’ve done, should they need to.
Okay, let’s look back at the whole story: we started from a 347 MB proprietary video file that contained footage from four CCTV cameras, of which only one was needed, and only a small chunk of it. After roughly 3 minutes of work with Amped Replay, we have extracted the frames we needed, without any loss in quality, and we have an 11.5 MB video file, plus an 0.7MB PDF file that allows our colleague to verify the integrity after transferring the file and to know everything we’ve done. It’s hard to imagine something better than this!
Before we say goodbye, a final remark: sometimes it’s not possible to start trimming the video precisely at the selected frame (because you need to start from a keyframe to do a proper stream copy). The software will thus automatically adjust the selection to allow the exporting: normally it will just include a few more frames before the first one you selected. Anyway, remember to take a look at the exported video, so to make sure all the frames of interest have been included and if some are missing at the beginning, just make a more conservative range selection and export again.
That’s all for today! We hope you’ve found this issue of the Video Evidence Pitfalls series interesting and useful! Stay tuned and don’t miss the next ones. You can also follow us on LinkedIn, YouTube, Twitter, and Facebook: we’ll post a link to every new tip so you won’t miss any!