Stefano Tommesani

  • Increase font size
  • Default font size
  • Decrease font size
Home Programming Easily upload videos of security cameras to YouTube

Easily upload videos of security cameras to YouTube

Hits

In this example, we will import video from a Yi security camera into YouTube. The same process, with eventual adjustment to the naming of directories in the SD card used by the camera to record videos, will also apply to other brands of security cameras.

Disclaimer: Before considering uploading video from security cameras to YouTube, make sure that the local legislation is granting you permission to share the videos, and make sure that no person or recognizable object (e.g. a car by the plate) is contained in the video. The information provided on this article does not, and is not intended to, constitute legal advice; instead, all information, content, and materials available on this page are for general informational purposes only

As you cannot export the video stored in the SD card of the Yi camera using the Yi application, turn off the camera and extract the MicroSD card. Using a SD adapter, insert the SD card into the card reader of your PC, and open the folder named "record":

YiImport1

The TMP file is the MP4 video that the camera was recording when it was turned off, and each folder contains the video files for 1 hour (the folder name is [YEAR]Y[MONTH]M[DAY]D[HOUR]H). If we want to upload all videos from 16 to 17 of Apr 4th, 2021, let's open the folder 2021Y04M04D16H:

YiImport2

Please note that the time zone used by the security camera might not match your one, so before moving on, play one video file from the folder to verify that it's actually containing the period of time you want to publish.

The folder contains 60 files, if the camera was recording continuously, and each MP4 video file contains 1 minute of video. As we want to upload the full hour to YouTube as a single file, we need to join all these MP4 video files without reprocessing them, to avoid quality loss and wasting time recompressing the video. For joining the files we will use MP4Joiner from MP4Tools: select all files in the folder, and drag them into the MP4 Joiner window; after a few seconds processing the video files, MP4 Joiner will show the information and first frame of every video file:

YiImport3

As we don't want to re-encode the video, the default options of MP4 Joiner will do. Select the first file in the list and click on the Join button. Please make sure in the dialog that asks for the destination folder for the output video file to pick a directory in your PC, not on the SD card, as SD cards used in security cameras have minimal free space and write performance is well below that of SSD disk. After less than a minute, depending on the performance of the SD card and the output disk, the resulting MP4 file will appear in the ouput folder.

Now, if you are ok with uploading a video file to YouTube that also contains the audio recorded by the camera, then just go ahead and upload it, otherwise we need to strip the audio stream out of the MP4 file. From the command line, go to the folder that contains the MP4 file named Output.mp4 and type:

ffmpeg -i Output.mp4 -vcodec copy -an Output_noaudio.mp4

It is likely that there will be many errors like the following one, just ignore them:

[mp4 @ 000001ea82da0700] Non-monotonous DTS in output stream 0:0; previous: 1290010500, current: 1290010500; changing to 1290010501. This may result in incorrect timestamps in the output file.

After a few seconds, another smaller file named Output_noaudio.mp4 will be created in the same folder, and this is the file that we will upload to YouTube:

YiImport4

 

Last Updated on Monday, 05 April 2021 03:22  

Latest Articles

Easily upload videos of security cameras to YouTube
In this example, we will import video from a Yi security camera into YouTube. The same process, with eventual adjustment to the naming of directories in the SD card used by the camera to record videos, will also apply to other
A software to stand out 27 January 2018, 14.35 Web
A software to stand out
Standing out of the pack starts by being visible, and being noticed by the right group of professionals. No matter how good your profile is, it is lost in a sea of similar profiles, so you need to show up and start attracting
Web page scraping, the easy way 07 January 2018, 00.46 Web
Web page scraping, the easy way
There are many ways to extract data elements from web pages, almost all of them prettier and cooler than the method proposed here, but as we are in an hurry, let's get that data quickly, ok? Suppose we have to extract the
Scraping dynamic page content 06 January 2018, 23.57 Web
Scraping dynamic page content
One of the most common roadblocks when scraping the content of web sites is getting the full contents of the page, including JS-generated data elements (probably, the ones you are looking for). So, when using CEFSharp to scrape
Unit-testing file I/O 26 November 2017, 12.09 Testing
Unit-testing file I/O
Two good news: file I/O is unit-testable, and it is surprisingly easy to do. Let's see how it works! A software no-one asked for First, we need a piece of software that deals with files and that has to be unit-tested. The