pancakes

MicrostockGroup Sponsors


Author Topic: PRORES vs H.264 Tested  (Read 9849 times)

0 Members and 2 Guests are viewing this topic.

« on: June 09, 2016, 01:46 »
+1
I wanted to know which codec is the best, so I wrote a program that does a pixel by pixel comparison of an input video and an output video, converted using various codecs and quality settings.

In this test, I tested H.264, MJPEG, MPEG4, and PRORES.

Results:

QUALITY TEST: H.264 and PRORES are about equal when the original encoder is Lavf56.1.0. About 12.4% of pixels were altered when using the highest quality settings (for H.264 I used the 2nd highest quality setting). The difference in color of each modified pixel was minimal with both codecs.

FILE SIZE: H.264 increased the original file size by a factor of 4.73. PRORES was 81.37 times larger than the original file size.

RESULTS: H.264 and PRORES rendered at similar quality, but H.264 has superior compression, 40x better than PRORES.

I will show results for other encoders and codecs once the testing finishes processing.


ffmpeg -y -loglevel panic -i 'video/2012-01-01-dirt-bike-racing/01225.mp4' -vcodec libx264 -vpre veryslow -crf 1 '/tmp/out2.mov' > /dev/null 2>&1
Lavf56.1.0      libx264  43,013,139     4.73    2       1       tiff    3,526   256,970 0.124

avconv -y -loglevel quiet -i 'video/2012-01-01-dirt-bike-racing/01225.mp4' -c:v mjpeg  -an '/tmp/out2.mov' > /dev/null 2>&1
Lavf56.1.0      mjpeg    63,567,788     6.98    1       1       tiff    36,807  877,614 0.423

avconv -y -loglevel quiet -i 'video/2012-01-01-dirt-bike-racing/01225.mp4' -c:v mpeg4 -qscale 1 -mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 -an '/tmp/out2.mov' > /dev/null 2>&1
Lavf56.1.0      mpeg4    54,680,471     6.01    1       1       tiff    7,078   492,330 0.237

avconv -y -loglevel quiet -i 'video/2012-01-01-dirt-bike-racing/01225.mp4' -c:v prores -qscale 1 -profile:v 3 -an '/tmp/out2.mov' > /dev/null 2>&1
Lavf56.1.0      prores  740,580,696     81.37   3       1       tiff    1,736   257,918 0.124

The columns of the results are: original encoder, output codec, new file size, ratio of file size compared to original, profile, qscale, image frame file format, difference in pixels affected, total number of pixels affected, and ratio of pixels affected.


« Reply #1 on: June 09, 2016, 07:33 »
0
So is the conclusion that H264 is every bit as good as PRORES? And happens to do better when compressed?

« Reply #2 on: June 09, 2016, 08:12 »
0
I was always told that h264 is a great finishing final codec for the end film but ProRes is better if you want to carry on editing and colour grading?

« Reply #3 on: June 09, 2016, 10:03 »
0
Since 99.9% of all clips we sell are going to be edited into a larger final product it makes sense to provide an editing format. If you edit in Final Cut for example, you're editing in ProRes anyway and everything works faster. Also, 10-bit color in ProRes. (I know there's a 10-bit h264 but hardly standard).

The only reason to go h264 is of course bandwidth, but I don't see that being much of a problem these days. How many video editors sit on an ISDN line with 5GB limited downloads per month?

« Reply #4 on: June 09, 2016, 10:16 »
+1
 I get lots of banding issues with h264 and smooth gradients (which you get with animations) forcing me to add a bit of noise to fight this. Noise makes the h264 files a lot bigger.
As a delivery codec H264 is great. But for editing/grading/color correction then ProRes is a lot better, much more detail in the colors, and 10 bit/channel!

For your tests, you could try out some visually identical H264 and ProRes files, and see what happens when you do heavy color correction/grading. Only after this you realise what the real problems are with the heavy chroma subsampling that H264 does. Great for delivery, bad as an intermediate codec.

And most important, when stock customers think that ProRes is better, you deliver ProRes.
« Last Edit: June 09, 2016, 10:20 by ccbcc »

Benozaur

« Reply #5 on: June 09, 2016, 11:11 »
0
Like comparing razor blades to cotton candy.

What was your source file? Was it 32 bit float exr sequence with lots of motion and a full linear color space?

h.264 = delivery codec (4:2:0 8 bit)
prores = intermediary codec (up to 4:4:4 12 bit)

Of course if you are shooting on a Panasonic GH4, Sony a7S, Canon 7D or other DSLR then you are stuck in 8 bit 4:2:0 anyway and there is absolutely no reason to render out your final video in prores because the extra information that prores is capable of storing simply isn't there to start with. You just end up with a bigger file thats just as prone to banding and macro blocking as it is straight off the camera.

If you are shooting with an Arri Alexa, Red Dragon, Blackmagic Ursa 4.6k or other dedicated cinema camera then you would be getting either RAW (later transcoded to prores to edit) or prores in-camera, then this would make sense.

Another option for most of us DSLR owners would be to get an external recorder like the Atomos Shogun or Odyssey Q7+ to read straight off your camera's clean HDMI out feed and record natively in prores if you need it.

As for my work flow - I deliver Photo JPEG to stock agencies when the source material is shot with an 8 bit codec and prores HQ when I shoot with one of the big boys...

« Reply #6 on: June 09, 2016, 12:33 »
0
there is absolutely no reason to render out your final video in prores because the extra information that prores is capable of storing simply isn't there to start with

That's only true if you upload the footage ungraded/unedited. If you add for example a vignette it's still better to work in 16-bit and export a 10-bit ProRes HQ even if you shot it on a GH4.

It makes even more of a difference if you shoot in 4k and recompose and downsize to HD. There is extra information there even from the 8-bit GH4 clip to make use of the ProRes if you go from 4k to HD.

« Reply #7 on: June 09, 2016, 14:18 »
0
You're probably absolutely 100% right 75% of the time.

Benozaur

« Reply #8 on: June 09, 2016, 17:45 »
+1
there is absolutely no reason to render out your final video in prores because the extra information that prores is capable of storing simply isn't there to start with

That's only true if you upload the footage ungraded/unedited. If you add for example a vignette it's still better to work in 16-bit and export a 10-bit ProRes HQ even if you shot it on a GH4.

It makes even more of a difference if you shoot in 4k and recompose and downsize to HD. There is extra information there even from the 8-bit GH4 clip to make use of the ProRes if you go from 4k to HD.

Yes, I suppose you are right about the downscaling 4K to HD which would turn your chroma subsampling from 4:2:0 to a theoretical 4:4:4 but the info is still the same and you haven't actually added any more data, just squished four pixels into one so color accuracy is not improved at all. You can then grade it to your heart's content bearing in mind that the source material is essentially "flawed" to start with.
Exporting your work prores HQ does not increase the quality of the source material (even after grading) - however - exporting h.264 can seriously mess your footage up... So that might be a practical reason to export prores.

The best reason to export prores from an h.264 source (which is cheating BTW) has already been addressed by ccbcc
And most important, when stock customers think that ProRes is better, you deliver ProRes.

« Reply #9 on: June 09, 2016, 19:29 »
0
I am seeing the same thing over and over again, testing various input files.

H.264: substantially smaller file size as compared to prores

H.264 and PRORES modify about the same number of pixels, or often H.264 modifies fewer pixels after rendering

When pixels are changed, PRORES changes each pixel to a smaller degree than H.264, or to a similar degree. But I don't see H.264 modifying each pixel to a lesser degree than PRORES.

PRORES has  less of an impact on pixels, H.264 changes fewer pixels, H.264 has vastly smaller file size.

« Reply #10 on: June 09, 2016, 23:50 »
+1
. How many video editors sit on an ISDN line with 5GB limited downloads per month?

 I have not thought about ISDN lines in years. Thank you for the trip down memory lane.  :)

« Reply #11 on: June 10, 2016, 03:33 »
0
I have not thought about ISDN lines in years. Thank you for the trip down memory lane.  :)

Haha, yeah, we had two lines for a whopping 128 kbps but man that was expensive...

« Reply #12 on: June 10, 2016, 06:47 »
0
I am seeing the same thing over and over again, testing various input files.

H.264: substantially smaller file size as compared to prores

H.264 and PRORES modify about the same number of pixels, or often H.264 modifies fewer pixels after rendering

When pixels are changed, PRORES changes each pixel to a smaller degree than H.264, or to a similar degree. But I don't see H.264 modifying each pixel to a lesser degree than PRORES.

PRORES has  less of an impact on pixels, H.264 changes fewer pixels, H.264 has vastly smaller file size.

Have you actually read and understood all the points that people made in this thread?

Benozaur

« Reply #13 on: June 10, 2016, 09:27 »
0
OK put VERY SIMPLY h.264 modifies and compresses whole groups or blocks of pixels over time, prores does not.
Hence the macro blocking and banding issues especially on a long GOP (group of pictures) setting.
h.264 employs a variable bitrate algorithm to encode and subsequently decode (Codec = encode/decode BTW).
It is more processor intensive to edit because your computer has to decode groups of pixels over varying lengths of time.
Prores on the other hand compresses less and doesn't shuffle groups or blocks of pixels around nearly as much as h.264 because it is most flexible as a constant bit rate codec. Meaning that it doesn't have to keyframe and store information as to what groups of pixels, where they are and for how long in order for your computer to decode them correctly. The extra info resulting in larger file sizes is because each frame is treated seperately (at a constant bit rate) as opposed to a block of pixels borrowed from a previous few frames resulting in less data per frame to be stored.

I suggest you read up on the two codecs on Wikipedia for a deeper understanding:
https://en.wikipedia.org/wiki/Apple_ProRes
https://en.wikipedia.org/wiki/H.264/MPEG-4_AVC

« Reply #14 on: June 10, 2016, 16:26 »
0
I'm not a technical guy per se, but this is interesting reading.

« Reply #15 on: June 20, 2016, 11:47 »
0
Did not read... but here
A professional told me one day that they tested all kind of compresseion at the time (ALL) and PhotoJpeg was the best of all.
ProRes will be better in quality, but the data will be long to transfer.

They did not test H 264... BUT my opinion is that it's the worst. It perfect for a final project, but if you are buying a H264 clip then want to color grade it, you will result with soooooooo much artifacts and compression problem.

PhotoJpeg for the win.

op

« Reply #16 on: June 20, 2016, 12:28 »
0
Did not read... but here
A professional told me one day that they tested all kind of compresseion at the time (ALL) and PhotoJpeg was the best of all.
ProRes will be better in quality, but the data will be long to transfer.

They did not test H 264... BUT my opinion is that it's the worst. It perfect for a final project, but if you are buying a H264 clip then want to color grade it, you will result with soooooooo much artifacts and compression problem.

PhotoJpeg for the win.

What to do mean by ALL? Because there a lot of codec better than Photo-Jpeg as Pro-res, Cineform, DNxHD, Pixlet, QT animation, huffyuv, lagarith etc. Actually, among editing codec, it might be the worst.


« Reply #17 on: June 20, 2016, 12:30 »
0
The pro buyers want ProRes. I will supply ProRes. In 2016 downloading 1 GB is not a big deal for most people. If it's a large 4k clip the sites downconvert to h264 anyway so the pros can buy the 4k, the rest the HD if size is a problem.

« Reply #18 on: June 21, 2016, 01:16 »
0
in my testing...PhotoJpeg is the worst. the gradient banding is extensive. main reason i don't submit to Istock


 

Related Topics

  Subject / Started by Replies Last post
5 Replies
6993 Views
Last post March 03, 2009, 10:11
by maigi
11 Replies
9018 Views
Last post November 06, 2016, 13:38
by ccbcc
4 Replies
8511 Views
Last post December 21, 2015, 05:41
by click_click
2 Replies
3426 Views
Last post May 26, 2016, 08:16
by Mantis
1 Replies
4310 Views
Last post October 11, 2017, 14:55
by smcbuki

Sponsors

Mega Bundle of 5,900+ Professional Lightroom Presets

Microstock Poll Results

Sponsors