Using ffmpeg to convert to Photo Jpeg with minimal loss of quality I've a 30-second clip, which is HD 1080p, 30fps, "Photo JPEG" compression, 480MB.

I've brought it into Fusion 9, made a small change, and rendered: but the Saver options (under Quicktime) are either uncompressed (which gives me a 5GB file!!), or DNxHD (e.g. "DNxHD HQ 1080p, 8 bit" gives me an 820MB file). (I think the lack of choices might be a limitation of the Linux version of Fusion 9?)

The next tool in the chain does not read DNxHD; I could work with the uncompressed file, but I'd like to avoid big files if I can. Can I use ffmpeg to convert it to the original "Photo JPEG" format?  (If not, is there something of similar quality and file size?)

("it" being either the uncompressed file or the DNxHD file)

I'd like to find the settings that give a nice file size reduction, but with no noticeable reduction in quality. I want to have my cake and eat it ;-)
DNxHD and JPEG are not the only game in town as far as intermediate codecs are concerned (intermediate codecs being high-quality, visually lossless codecs designed for moving media between steps in a post-production chain). Probably the most-used intermediate codec is Apple's prores 422, which can be encoded cross platform using ffmpeg thus:

ffmpeg -i uncompressed.mov -c:v prores -profile:v 3 -c:a pcm_s16le output.mov


One of the biggest advantages of prores is the support for 10-bit encoding, giving you much better colour fidelity. You can also use the prores 4444 variation to avoid chroma subsampling (reduction of the colour resolution) and alpha channel support.

Failing that you can use motion-JPEG, or even 2 flavours of lossless JPEG (I have no idea what the difference is). Oh and there's JPEG2000 if you really want, though it's not recommended. Substitute your codec of choice here:

ffmpeg -i uncompressed.mov -c:v CODEC -c:a pcm_s16le output.mov


where CODEC is one of:


jpegls - lossless JPEG (?)
ljpeg - another lossless JPEG (?)
mjpeg - motion JPEG
jpeg2000 - JPEG 2000


Since you're on linux I won't suggest Cineform, it's a good intermediate codec on win/mac but I don't think there's a CFHD codec for linux yet, and ffmpeg can only decode it (it's been open-sourced so that will probably change). There are a couple of more obscure ones like Grass Valley, huffyUV, dirac and so on, but if you can't use DNxHD it's unlikely these will be any use to you. Just as an aside, DNxHD is freely available from Avid, is it possible to install the codec on the target machine?