Screen and window recording transcoding

background introduction

    During some training or communication, it is hoped that the video can be left to watch later, which creates a need for video recording. At the same time, when storing, it is hoped that it can occupy less space on the local disk, and the fonts in the video can be seen clearly. After practice, choose screen recording software and transcoding software, and the video will be within 300M after about 1 hour of video transcoding. The following is a brief introduction to the use of the software

### Software Introduction

The screen recording software uses the open source OBS, the official website address and the quick download address are

Open Broadcaster Software | OBS

https://github.91chi.fun/https://github.com//BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-n5.0-latest-win64-gpl-5.0.zip

The transcoding software uses the open source ffmpeg, the official website address and the quick download address are

FFmpeg

https://cdn-fastly.obsproject.com/downloads/OBS-Studio-27.2.3-Full-Installer-x64.exe

Introduction to using OBS

After installing OBS, select Settings

Set the video parameters as follows, note that the resolution setting must be consistent with the current computer, otherwise the interface recording will not be complete.

Set the output properties as follows, hardware encoding refers to using gpu encoding, soft encoding refers to using cpu encoding

Then add a scene in the scene position, such as "desktop recording", add the source as "audio input capture", "monitor capture"

After the selection is completed, you can see the screen preview information in the middle interface. If an error is reported at this time, it is generally a problem with the system display settings. You can perform Baidu

After the audio input is collected, there will be "microphone input" and "desktop audio output" in the "mixer" section. If you don't want to collect the microphone sound, you need to click the input "speaker" icon to mute, and the output is the same

If you want to record a window, you can create a new scene, select the window capture, when the window is captured, right-click the preview position, you can set the window centered or stretched state

Note that if the window is recorded, the window can be placed back, but it cannot be minimized, and the window state cannot be captured after being minimized.

Introduction to the use of ffmpeg

After using obs to record, the video file is relatively large. In order to facilitate storage, the video quality and video size are reduced by transcoding.

After the ffmpeg download is complete, unzip it to a local folder, and you can see the ffmpeg.exe program in the bin directory

Next configure environment variables

Right click on this computer-->Advanced System Settings-->Advanced-->Environment Variables-->System Variables-->Path-->Edit-->Add, fill in the above path

Create a new cmd window, enter ffmpeg -version, indicating that the installation is successful

Next, enter the following command in cmd to realize transcoding

Suggestion: use intel integrated graphics card, modify the resolution, generally 1080 720 480, -1 means proportional scaling

ffmpeg -i "E:\项目\xxx.mp4" -vf scale=-1:720 -vcodec h264_qsv -preset slow -r 15 -x264opts keyint=75 -vcodec h264_qsv -preset slow -b:v 600k -f mp4 "E:\项目\xxx-720P.mp4"

Guess you like

Origin blog.csdn.net/ll413343176/article/details/123756279