How to avoid quality loss on yotube/fb when encoding images into video via FFMPEG I created a video from a bunch of images off my camera using FFMPEG. I set it to 10fps. The output video looks fine. As soon as I upload it to Facebook or Youtube the quality is reduced significantly.

Here is the command I used to create the video:

ffmpeg -framerate 10 -pattern_type glob -i 'resized/*.JPG' -s:v 1280x720 -c:v libx264 -profile:v high -crf 20 -pix_fmt yuv420p  out.mp4

Each image has been resized to 1000x1500 pixels.

Screenshot from video from ffmpeg: https://www.dropbox.com/s/r3v30lj15a5hl6a/local.png?dl=0
Screenshot from video from Youtube: https://www.dropbox.com/s/qrur54r7xsnnrxs/youtube.png?dl=0

If you look carefully you can see the Youtube one is missing a lot of sharpness and detail. It looks much worse when playing through the video.

FYI - I know nothing about video encoding, I just googled for the ffmpeg command so most likely I am doing something silly.

Thank you!
YouTube re-encodes whatever you give it. The process is lossy so there will be a quality reduction. All you can do is give it a very high quality:

ffmpeg -framerate 10 -pattern_type glob -i 'resized/*.JPG' -vf scale=1280:-2 -c:v libx264 -crf 17 out.mp4



Use -crf 17 or -crf 18 for higher quality.
Try without -pix_fmt yuv420p. I'm not sure what YouTube uses for pixel format conversion, but perhaps it will look better than the FFmpeg swscale if they are using something different.
No need for -profile:v high. Let the encoder choose. You usually only need to set a profile when your target device is limited in profile support.