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”:
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:
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:
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: