It looks like Unity Recorder is dropping support for animated gifs.
That’s disappointing because Unity Recorder offered the HIGHEST QUALITY gif capture I’ve found.
@markvi Could you share the settings you use in your new recommended approach (capture MP4 and convert) to match the gif quality generated from Unity Recorder?
Everything I’ve tried looks like the pixelated garbage from old workflows prior to Unity Recorder.
we are working hard at improving the quality of MP4 exports, but until this is available to you, your best quality will be obtained by exporting to PNG (because JPEG is at 70% quality in Recorder) and then using one of several tools to do the conversion to GIF. You should make sure that your PNG files have a frame number suffix that ensures that their order is correct.
Thanks @unitybru for the links, and I appreciate that you can’t recommend specific tools.
Personally, I use ScreenToGif because it offers a bunch of easy to use editing tools.
After doing some benchmarking, it seems that my real question is trying to understand what Encoder was used under the hood to generate the gifs in earlier versions of Unity Recorder.
It’s pretty easy to capture the raw images, either JPG or PNG, with Unity Recorder, and then, as you suggest, load and edit them in a 3rd party tool, like ScreenToGif.
But when I go to encode the raw images into a gif, I get nothing close to the quality/size that Unity Recorder generates out of the box. That’s why I’m especially sad to see it go.
For benchmarking, I captured 3 seconds of gameplay and got the following:
Unity Recorder - best quality, 8mb file
FFMpeg Encoder, similar quality 30mb file
System Encoder of raw JPGs, similar quality 39mb file
System Encoder or raw PNGs, similar quality 37mb file
ScreenToGif 2.0 Encoder, crap quality, 15mb file
So without Unity Recorder, my options are files that look good but are too large to share, or files that look like crap.
Thanks for the added info @unitybru . Hopefully it inspires someone to shine, because your Unity colleagues did a nice job.
While I have a fantasy that there’s a single button in the editor called “Capture Twitter Gif”, I’m realizing that’s only a dream. To meet the Twitter size requirements, there’s too many trade-off choices that need to be made.
So here’s my gif workflow for high-def, motion intensive gameplay that approximates the 2.5.5 gif capture quality and stays in the Twitter ballpark:
With your preferred Gif Tool (mine is ScreenToGif), set the capture window to 15fps and 400 x 300 pixels. The smaller you go, the longer the gif can be, and vice versa.
Set up your GameView so that the capture window in #1 fits over the content you want, whether that’s the full gameplay or just a corner of it. Don’t use ‘Maximize on Play’
Play your game and start/stop your gif recording as desired.
Save/Encode the gif with FFmpeg. Most other encoders will create lots of banding and artifacts.
Crop gif dimensions and/or remove frames until you meet the Twitter size requirements.
This month’s #TechnicallyAChallenge is paper lanterns, so it also makes a good twitter comparison. In this one, I like the gif better, especially vs. a full-screened mp4
Ooooookay, this explains why the GIF capturing part of Unity’s recorder sucks so much. No more support.
I also have a bug with the audio recording because the recorder intercepts the audio flux and keeps it to itself jealously, so if you say “include audio” you will not hear it while playing in the Game window in the Editor on a mac, but if you don’t want to record the audio too, then you can hear it.
Is there any real benefit going for GIF for such short sequences? MP4 is superior in all possible ways, starting with the obvious advantage in framerate.
I was wondering what format to pick but no matter what is done, GIF is just plain disgusting. The only thing it had going for it for years was that Twitter would often crash a video’s quality three or four seconds into the playing if it detected, I guess, a limited bandwidth. Twitter has now changed some algo, including picture cropping some two weeks ago, and they likely fiddled with the video algo too.
Has S.R. shared the method they use for producing those GIFs? Is there anything special or is it just creating high resolution and high framerate GIFs from video conversions?