How to prevent frame smoothing (i.e. get really sharp frame images) when making a video with ffmpeg?
Since you're asking for "uncompressed" I assume you don't care about file size. If so, I suggest rendering to mjpeg. This smoothing issue is because your command is defaulting to h.264. The difference between h.264 and mjpeg is that mjpeg is intra-frame compression only, but h.264 is intra- and inter-frame compression. As such, mjpeg is a massive file by comparison, but each frame is unique and not dependent on previous frames like in h.264. One benefit is frame fidelity, enough should fix your issue. Mjpeg is also pretty universal. You won't need a codec pack to play it. 

To make your images into an mjpeg video run:

 ffmpeg -framerate 20 -i slice%04d.png c:v mjpeg -q:v 3 -an output.mov



c:v mjpeg means video codec
-q:v 3 is a quality control factor. Range is a linear 2-31, lower is better. Tune the number to your tastes. 
-an means no audio channel included. This is good to run if that's your goal, as some codecs confuse players if you don't. 
Output is mov but I'm pretty sure you can wrap mp4 or avi too. Mp4 seems mostly likely to work for your users on windows as well as mac.


Before you try this, maybe don't quite give up on h.264 yet. Run your original command with the crf flag. 

 ffmpeg -framerate 20 -i slice%04d.png -crf 18 -an test.mp4



crf is "constant rate factor", and is a quality control. Range is exponential 0-60something. Lower is better and 18 is considered functionally lossless.