Preservation of YouTube videos
YouTube is a video-sharing platform which allows users to easily and quickly upload videos taken on their phones. An attorney or investigator might see a video on YouTube relevant to their case or subject, which they want to download and preserve before YouTube or the video's author removes it. This article demonstrates a tool which is free and easy to use to preserve YouTube videos and content from hundreds of other sites.
Background
As a digital forensic consultant, I've been asked by attorneys numerous times to preserve a video that is on YouTube. While anyone can screen capture a video or install any number of browser extensions that can make a copy of an online video, these methods do not provide logging or metadata that is sufficient for litigation. Years ago, I discovered a tool which is easy to use and provides logging and metadata capture. While some may not consider it to be a "forensic tool", I consider that testing and validating this tool on a known data set to be sufficient for the purpose of capturing videos, especially in a pre-litigation preservation type of effort.
Youtube-dl is a free tool for Windows, Mac OS X, and Linux/Unix. It can be used to download and preserve videos or entire playlists from YouTube AND hundreds of other sites.
How to preserve a YouTube video using youtube-dl.
For the sake of being attorney-friendly, we're going to take the easiest route to get up and running. If you prefer the Python version, then you're probably able to figure out how to get this running.
- Download youtube-dl from its website or Github.
If you are using a Windows PC, you can download the Windows executable, which can be run without installing Python. The Windows exe version of Youtube-dl DOES require Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package (x86) to run. So, you may need to download and install that if you don't already have it installed (many of you do). - This is a command-line tool so you'll need to Click Start Window -> Type CMD -> Press ENTER, to open the Command Prompt. For more help on this, visit WikiHow or Google it.
- Find the video you want to capture in YouTube. In the browser's address bar, you'll just need to copy the address of the video you want to download:
https://www.youtube.com/watch?v=jRuTh0BsH-c&t=27s - Then, you can navigate to the folder you downloaded youtube-dl to using the command prompt, and execute youtube-dl. The command I most often use is shown below. A list of the parameters can be found in the Readme.md.
youtube-dl --write-info-json --write-annotations --no-mark-watched "https://www.youtube.com/watch?v=jRuTh0BsH-c&t=27s" - Two or more files will be generated in the folder you ran the youtube-dl command from:
The generated MP4 will be the video. Notice that the Last Modified date is 11/14/2021, which is the date the video was originally uploaded to YouTube.
The JSON file is a most easily viewed in the Firefox web browser application. It just works. The JSON plugin for Notepad++ will also do the job. - The JSON file will have metadata about the video, including some of the samples below:
uploader_url "http://www.youtube.com/user/TheVidgeo" description "Conor McGregor was seen roaming the forest at the National Zoo..." view_count 3071758 channel_url "https://www.youtube.com/channel/UC8R9qer16sBzPCv-FXYKMlw" tags 0 "Funny" 1 "MMA" 2 "UFC" 3 "Parody" 4 "Conor McGregor" 5 "WWE" 6 "Randy Orton" 7 "RKO" 8 "Matrix" 9 "Bullet Time" 10 "Mission Impossible" 11 "Hell's Kitchen" 12 "Tom Cruise" - That's it! Remember to test and document your actions. It's a good idea to also hash the video so that you can ensure its integrity as it is transmitted to counsel or others. Review the Readme.md file for the tool before using. Oh, and congratulations! You've just downloaded one of the most entertaining videos on the entire Internet!

Comments
Post a Comment