2

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 ;-)

3

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?

| improve this answer | |
  • J2K isn't the best mezzanine format. It has some peculiarities that make it better suited to being a transport codec. In other words, it takes a lot of tuning for the application and in a mezzanine setting, you don't take advantage of the unique features of it that make the tuning worthwhile. – Michael Liebman Jan 17 '18 at 3:32
  • Good point, I just did ffmpeg -codecs|grep jpeg so I thought I'd add it for completeness. I've personally had nothing but trouble with jpeg2000. – stib Jan 17 '18 at 5:01
  • Thanks, prores 422 seems to work well (giving a 1gb file). I tried using both uncompressed and DNxHD as the input, the latter running a bit quicker (14s vs. 18s). Their output is visually identical, as far as I can tell. – Darren Cook Jan 17 '18 at 9:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.