H264 or H265

JeremyLopezFoppiani 26 Sep 2020 01:53
ProresLT could be a good start for cameras that record in h264 at 100mbps and at the same time not have a huge and difficult to upload file; what do you think?
GeneralTitles 13 Jan 2023 07:05
A big part of how advanced coding methods work, is to work around the way mother nature's "data compression" in the human vision system works, which literally throws away color information as a function of the opponent color process in the post-retinal ganglion cells, not to mention the visual cortex's separate processing of luminance and color. The human vision system, color (Hugh/chroma) has 1/3 of the resolution of the luminance (the achromatic lightness/darkness, i.e. B&W).

4:2:2 is sampling color at half the resolution of luminance, 4:2:0 which is commonly used for h264 is even less.. Then DCT throws away even more data.

A point I'm getting to here is that the majority of data that gets thrown away happens the first time that the full resolution image is sent through compression. There is an additional data loss with successive generations, however if the video is otherwise unchanged, those successive generation losses are much lower than the initial first compression.

But, if the image is changed, such as color graded and especially scaled or repositioned, the next recompression can have a greater data loss due to the changes in the image. This is why you wanna do all of your grading and changes directly to the source as close to the camera original as possible before doing any further compressions or preparing for any distribution.

As a customer of stock

When I am looking for stock footage to use as part of say a visual effect or just a cut in as a shot, I look for shots that are essentially camper original and have no grading done to them. If something was shot in 10 bit log, I would prefer it as 10 bit log, with no grade.

Among other things, if you are selling a piece of stock, you have no way of knowing what grade or look the filmmaker is ultimately going to need. And based on some sad experiences, the few times that I purchased some stock that did have "something done do it," I was unable to use it in the show, due to the increased artifacts and other issues.

On ProRes and BitDepth

ProRes uses DCT like h264, but what makes ProRes extra useful is that:
1) ProRes Is at least 4:2;2 subsampling, with 4:4:4 versions available
2) All frames are independent I frames, or in other words, every frame is a key frame and does not rely on the previous frame for decoding.
3) ProRes supports 10 bit, and 4:4:4 versions support 12 bit

The data rates for ProRes however are much higher than typical h264 implementations, because every frame is an independent frame at 4:2:2. As an example, the 4K data rate of ProRes Proxy, the lowest level ProRes, it's about the same as the Mini 3 Pro. ProRes 4:2:2 HQ is five times higher than the Mini 3 Pro.

That said, there is absolutely no benefit to up-converting to ProRes, unless there are changes from the camera original in terms of scaling or color grading etc. But if there's been any color grading or other manipulation to the footage, then 10 bit ProRes 4:2:2 is the minimum that should be used.

h265

As far as I'm concerned, h265 is unacceptable for intermediate stages, ProRes would be preferred.

For camera origination h265 might be less than ideal, though I have not done a side-by-side test with complex imagery with a lot of motion.

And there are some unanswered questions, for instance, does the Mini 3 Pro use the same data rate with h265 as it does with h264? And does the Mini 3 Pro use 4:2:2 or 4:2:0 with either h264 or h265? I haven't found answers to these kinds of questions, and the published specifications from DJI are not complete in this regard.

EDIT: I did some test and evaluations on my Mini 3 Pro:

- Mini 3 Pro uses 4:2:0 for both h264 and h265,
- Normal is 8bit, D-Cinelike is 10 bit
- h264 can be 10 bit for frame rates below 30 (at least, I shoot in 24fps h264 10 bit)
- Frame rates higher than 30 are forced to h265
PCDMedia 13 Jan 2023 21:32
In the absence of ProRes what about DNxHR 444 12bit/444 or HQX 12bit/422?
GSfootageUK 15 Jan 2023 08:13
Some great helpful info in this thread.

What I have done lately is take my original files that are either H.264 or H.265 (H.265 when recording 10-bit), then output all to 10-bit H.265. I do that no matter the source as the colour grading adds more colours, so a 10-bit H.265 output would be preferred. I mostly only notice the difference when it comes to banding in skies.

Should I instead be rendering some or all to DNxHR or HQX? I do that with timelapses with a source from 12 or 14 bit RAW files, but that's obviously different.

I do always check my final rendered footage before uploading and occasionally do see issues in complex scenes, and rendering again in DNxHR (or similar) tends to fix that. The reason I don't always do it that way is due to the size of the files. Any advice on the best workflow moving forwards would be appreciated.
Mizamook 15 Jan 2023 08:29
H265 is lovely for sending quick files up to Youtube for friends. Don't do it for stock. Just. Do. Not.

H264 (is not Prores!) is better, but more inefficient, and also limited to 8-bit. Also. Don't.

I had a time where due to internet limitations I was uploading h.264. I'm sad about that. Not surprised that a lot of great footage from that time had trouble selling.

Really look at your files, and look better. In fact, import them into a timeline and mess with them. Muck about with the colours, contrast, etc. Yes, it matters what the source was. Does your camera suck? Or does it excel? It matters. But regardless, UNLESS you are uploading camera-native (as in, NON RE-ENCODED!) you need to export in 10bit or better. The people who don't know, won't care, or notice.

But you can be guaranteed that the people who do, will, and those are the people with money to spend, more often than not. Those who really really care, and really find your incredible unique footage worth asking about, will ask you for your original footage, or in uncompressed. Never happened to me, in over 11 years ... go figure, and my footage bears the record of my entire history learning about colour correction, etc. (not a compliment).

PJPEG
ProRes 422 (or HQ)

or get off the pot.

Seriously. That is all.
GSfootageUK 15 Jan 2023 15:29
Thanks for all the info @Mizamook

I'm limited by my camera, but am doing some testing now with different rendering. My first test has shown scary results when looking closely on detailed areas. Now I'm wondering if I'll have to re-upload a lot of my footage.

Seems odd that Pond5 convert HD files to H.264. I know that's been discussed before in the forum.
GeneralTitles 15 Jan 2023 23:33
WTH, Pond5 just deleted my whole message without any warning as I was posting it?!
GeneralTitles 15 Jan 2023 23:40
That was annoying trying again.

I agree with @Mizamook
"UNLESS you are uploading camera-native (as in, NON RE-ENCODED!) you need to export in 10bit or better."

But just add a little bit regarding h.264, it's just a "flavor" of compression with a number of varieties. Most of the time h.264 is 4:2:0, and 8-bit, but it can be 10 bit (e.g. DJI Mini 3 Pro) and it's also possible to use 4:2:2 subsampling, as in ProRes.

ProRes for instance is also a DCT based codec, but ProRes also does only intraframe compression, and also subsamples at least at 4:2:2.

What concerns me here on Pond5 is that the HD downconverts seem to be very highly compressed 8 bit from the 4K, and there doesn't seem to be any way that we can adjust that, unless I'm missing something? For that matter, there doesn't seem to be a way to prevent down converts at all, or replace them with our own down conversions which might be more ideal in some cases.
Aleatoric 16 Jan 2023 06:54
I don't understand how customers willingly pay for HD downrezzed from 4K with 8-bit h264 ... especially considering that, in my case, my price for HD version is very close to 4K. The file size is so teensy small is must mean only one thing: The quality is horrendous!

@GeneralTitles ... I cannot find anything relating ProRes (variants) to h.264. I thought h.264 was limited as such to 8-bit 4.2.0 At any rate .. it's so different, it's unrecognisable as h.264. Can you please point me to siomething so I can understand this better?

@GSFootageUK ... I don't understand you saying you are limited by your camera. If you convert from your camera-native codec (assuming h.264/265) to anything else, or even to the same codec (unless perfoming no changes, and merely "trimming", you are recompressing (unless uncompressed, obviously but you're not uploading that). So when you compress anything ... you are literally tossing out information. It can never be regained. Reimagined, yes, through amazing software now available, but not truly regained.

Since you are testing stuff, try this: Take a clip. Any clip. Put the camera-native clip on a timeline. Render it to h.264, then again to h.265, and once more to ProRes422. Stack these clips atop each other on tracks so you can "solo" one at a time. Now ... do some colour correction to them. Doesn't have to be fancy, but try basic WB, contrast, etc. Select a particular hue and try to change that a tad. Compare how each of these works with each codec.

You will liklely find, that you can "stretch" the colours, contrast, corrections, noise reduction, efforts a lot more with the better codecs.

Then, and here's the rub, render each out into one codec. Now re-import them again, and see what you can do with each. So .. in the case of a colour cast you don't like, say that if you're an editor trying to colour-match clips ... try to work with each of them. Can you do it? Are you happy? Probably happier with those you worked with in ProRes+, I wager.

Most likely you will find that you can mess with, and re-encode ProRess 422 several times before you see objectionable artifacts and banding, etc. The h264/265 (delivery codecs!) will not put up with this! Things get ugly, quickly, and tracking, masking, noise, chroma/luma/saturation selections, etc. become much harder. Don't even think about chromakey .. the difference is astounding.

I know this first-hand. Sadly, even PJPEG does not stand up as a proper intermediate codec. When I did my bestselling shot, I did multiple iterations and prerenders, and I used PJPEG. Now I know better. I would use Uncompressed now! But sadly, I cannot go back, as I lost the original clip, which was AVCHD. The result would have been tons better had I understood things more.

The first thing a pro editor is going to do with anything they download (from the net, or from a camera card) unless it is already in a proper intermediate codec, like ProRess 422 (NOT LT!!!) is to transcode it, at least the section they need, with handles .. (into PR422/HQ, or DNxHR, depending). This is not "adding information" ... that is a mistaken thing people mention ... it is to expand the width of the ability to work with it. This is to preserve the integrity of the information that is there, as well as make it easier to play/edit on timeline.
GSfootageUK 16 Jan 2023 07:50
@GeneralTitles: I have the Mini 3 Pro and the 10-bit files are H.265. My understanding is there's no way H.264 can be 10-bit. Clearly my knowledge of video codecs is way lower than others here, but I just wanted to make that point. Yes it's odd Pond5 compress 4K uploads to H.264, and this was discussed a while ago in the forum and I thought Pond5 said they were looking into changing that.

@Aleatoric: Lots of great info there, thanks. I do understand the basics when it comes to compressing and re-compressing, that's all stuff I've dealt with for years as a photographer. Video is similar of course, but with a lot more complexities with the various codecs. When I said that I'm limited by my camera I meant that my main mirrorless camera can only record H.264 8-bit. It does give excellent output and when I use a flat profile, I'm able to colour grade and get good results in most cases.

I've done some testing and already see the difference without going through the re-importing and trying to adjust process. Just what I'd usually upload to Pond5 has clear issues when I render to H.264/5, which I hadn't noticed before.

I now want to re-upload all my clips in DN-HR! I see no way to do that without starting again and copying metadata across, meaning I'll lose view and sales data. That's another matter so I won't get into that more here.

So my plan from now on is this. Please confirm I have this right as the best thing in future. I have media from 3 cameras that I'll be using. H.264 8-bit flat from my mirrorless camera, H.265 10-bit flat from my Mini 3 Pro drone and H.265 10-bit flat from my Action camera. If I colour grade from any of those, I'll render in DNxHR HQX 10 or 12-bit for Pond5.

Is that about right with my current equipment?

Thanks for all the info here, it's very helpful.
Salte a la página