Windows gameplay recording & editing
On my new computer I use Nvidia's ShadowPlay to record my gameplay - taking advantage of NVENC and getting the full 2560x1440@60 resolution. Unfortunately it's not perfect - it sometimes refuses to start recording (working with Nvidia support on this) and occasionally it gets the audio inputs mixed up and doesn't record my mic (or the in-game audio). But I haven't had a corrupt recording yet (knock on wood) and the quality is great.
For editing the videos I use ... ffmpeg. Why ffmpeg instead of a more traditional NLE? Because it's quick. Ask any YouTuber and they will tell you editing takes time. And I'd rather be playing Danger Zone than editing videos.
For solo games I need to determine the start and end of the main video then add on the intro & outro. On the iMac I could do this inside Quicktime Player, but now I needed to find new ways. The first step is to determine the start & end of the main video, which I do using ffplay via a batch file (so %1 becomes the name of MP4 recording):
ffplay -vf "drawtext=fontsize=100:borderw=5:bordercolor=white:text='%%{pts}'" %1
This plays the video but overlays a timestamp at the top. I can then watch the video, skip forwards and backwards and step frame by frame to find the start and end cut points. Then I use ffmpeg via a second batch file to combine the two audio channels and add on the intro and outro:
ffmpeg -y -i %1 -filter_complex:a "[0:1][0:2] amix" -c:v copy -c:a alac temp.mov
ffmpeg -y -ss %2 -to %3 -i temp.mov -i intro_B.mp4 -i outro_B.mp4 -filter_complex "[0:v] setpts=PTS-STARTPTS, fps=60 [vo]; [0:a] asetpts=PTS-STARTPTS, aresample=48000 [ao]; [1:v][1:a][vo][ao][2:v][2:a] concat=n=3:v=1:a=1" -c:v h264_nvenc -preset slow -profile:v high -coder cabac -b:v 24M -pix_fmt yuv420p -g 30 -bf 2 -maxrate 24M -c:a aac -b:a 384k -profile:a aac_low -movflags +faststart %4
erase temp.mov
And that's it, the video is now ready to upload to YouTube. But I also need to make the thumbnail. Again, I do this using ffmpeg. Again, I use the ffplay script to identify the timestamp of the frame I want to use in the thumbnail. Then I come up with the text for the thumbnail and put it in YT.txt and use another batch file to create the PNG:
ffmpeg -y -ss %2 -i %1 -i DZ_logo_2.png -filter_complex "[0:v]crop=1280:720:640:360[base]; [base] [1:v]overlay=y=(H-h)/2, drawtext=fontfile=RockSalt-Regular.ttf:x=(w-text_w)/2:y=20: borderw=3:fontcolor=white:bordercolor=black:fontsize=%3:textfile=YT.txt" -frames 1 %4.png
And that's it. I've minimized the time, money & effort I need to spend turning my Danger Zone games into YouTube videos.
Comments
Post a Comment