How to share your Zoom recordings (for free) — Part 2
Part 2 explains how to make your video files 13% of the original size to share with friends, for free
In my previous post, we learnt how to record Zoom meetings at a
.mkv file using OBS Studio. But we noted that the video format was not playable on most devices like iPhone and desktop without additional software like VLC. And we also saw that the file size was about 1 GB/hour of recording — that’s quite large. Using the method outlined in this post, I was able to convert a 51 min presentation in .mkv at 978 MB into .mp4 at 90 MB (10X improvement).
Why this works is that you rarely need the full resolution for a Zoom video. Yes, there are some times when you want full HD resolution but generally most Zoom meeting shared screens aren’t very high in resolution anyway so you don’t lose anything by decreasing the total resolution of the video.
Let’s learn how to compress the file for sharing or archiving.
What you’ll need installed
- Windows 10
- the Powershell command prompt (this normally comes with Windows 10). Download the .msi file from Github link here.
- ffmpeg, download over here by scrolling down to Releases. The official site is here.
Extra things after downloading and installing ffmpeg
- make sure to include in your system’s
environment variablesthe path to where you installed FFMPEG. You can do this by opening the start menu and searching for
environment, going into environment variables, and under the
Pathvariable, add the path your ffmpeg installation. For example, mine was
Convert to mp4 using FFMPEG
Compress using ffmpeg takes just a few minutes. Inspired by this post and this, I added some Powershell specific tweaks myself, like setting the variable in Powershell. To begin, either open Powershell from the start menu and navigate to your Videos folder, or use the shortcut hack where you use Explorer to navigate to the Videos folder, then with no file selected, hold down the
SHIFT KEY and right click, then select
Open Powershell window here.
Now copy this command into the Powershell prompt
Set-Variable -Name "filename" -Value '.\myfile.mkv'; Set-Variable -Name "outfile" -Value ([System.IO.Path]::GetFileNameWithoutExtension($filename) + ".mp4") ; ffmpeg -i "$filename" -vcodec libx264 -preset slow -acodec mp3 -s hd720 -crf 18 -r 24 "$outfile"
It should look something like this:
How this command works
- The first
Set-Variablesets a variable of name
-Nameand value specified by
-Value. To change the file name, just edit the
.\myfile.mkvto the name of your file.
;the semicolon demarcates a new command in Powershell. This allows us to execute multiple lines of code.
- The second
Set-Variablesets a variable of name
"outfile"to the value of the input filename minus the original extension and adding an
.mp4extension. The filename is obtained through
[System.IO.Path]::GetFileNameWithoutExtension($filename), where we refer to variables using the dollar sign, i.e.
ffmpegcommand works because the ffmpeg directory should be in your environment PATH.
-i "$filename"= input file path (note enclosure with quotes)
-vcodec libx264= video codec libx264
-preset slow= sets the speed of compression where slower means smaller file size but takes longer. Other values like
-acodec mp3= audio codec set to mp3.
-s hd720= size to HD720, which is sufficient resolution for rewatching Zoom shared screen. Alternatively you can specify a different size such as
1024x768if you want a different size.
-crf 18= the constant rate factor, where higher value means more compression and more loss.
-r 24= frame-rate set to 24 frames per second, which is the minimum for zero flickering for human eyesight and was the standard for cinema movies. You don’t need any higher.
"$outfile"= the output file name (note the quotes)
You’ll see an output similar to the above. The time on the bottom-most line means how much of the video has been processed, and will increase until it reaches the full length of the video. The speed tells you the approximate time it will take to complete, where a 7x speed will process a 1 hour video in 14 min.
Finally, open your new file, which is found in the same folder but now with the .mp4 extension. Check the visual and audio quality.
Other important things
Troubleshooting video quality
If video quality is poor, you can lower the
-crf value or omit the
-crf and the
-s parameter altogether to leave the resolution original. Do note that the file size will be bigger, although you will still get some good compression with the mp4 format.
Formats natively supported for Mac
Quoting from https://support.apple.com/en-us/HT201290 , “QuickTime movie files (.mov), most MPEG files (.mp4, .m4v, .m4a, .mp3, .mpg), some AVI and WAV files”
Splitting files without any conversion
If you want to split a file based on time, you can use this as an instant split. It takes no time at all. This is most useful when sending over Whatsapp because of the size limit of videos — just split into two like this:
ffmpeg -ss 00:25:00 -i .\input.mp4 -vcodec copy -acodec copy .\output.mp4
-ss is the start time and
-to is the end time.
Results with different settings
ffmpeg -to 01:02:00 -i '.\myfile.mkv' -vcodec libx264 -preset medium -acodec libmp3lame -s 1024x576 -r 24 'newfile.mp4'
The above was able to compress a 1 hour 3.6 GB mkv file that was recorded at high resolution 1600x900 and 30 fps and bitrate 7119 kb/s into a 96 MB mp4 file at 1024x576 and 24 fps with bitrate 79 kb/s. Worked fine on my 1600x900 screen resolution with no perceptible loss of quality.
For more reading, see https://opensource.com/article/17/6/ffmpeg-convert-media-file-formats