@LPowell I'll send you the mts file ..
So far I'm LOVING this patch, and it might well be my new standard! I've only tested 24H on a Sandisk 30mb/s 16gb card. I have yet to do any systematic test with alternatives, but here are some things I love:
At a certain point, the gains in perceptible quality vs. costs of storage and loss of functionality aren't worth it to me. Give me some improved settings I can rely on, and let me shoot!! If I need the absolute best quality from a GH2 and don't want to save harddrive space, then it's Q9vb (or X when it's not beta)). For super big projects, I'm just going to rent a RED or an Alexa or whatever. For indie, micro-budget projects or docs, Lpowell's 24H or Quantum 100 at 24H is more than enough.
I guess the one thing that might be a potential short-coming is ETC, which is quite useful for some doc stuff. BUT I'm just basing this on other people's comments and not my own experiments with the patch.
Finally, Lpowell's view that it is the keyframes per second that really matters in terms of motion rendering and not the GOP length per se is fascinating.
@qwerty123 Here's an intuitive analysis of the effects of keyframe rate on real-time video capture:
In an AVCHD encoder, each keyframe produces a fresh set of motion vectors that can potentially be reused in nearby P or B-frames. In a short-GOP encoder, the video image doesn't have much time to change between keyframes, so nearby motion vectors are usually very good approximations of adjacent P and B-frame image details. And with high quality P and B-frame quantizer tables, the small residual discrepancies in pixel details can be compactly encoded at a level of quality equivalent to I-frames.
With a long-GOP encoder (a half-second or more between keyframes), motion vectors gradually go stale as image movement occurs over time. Since the stale motion vectors no longer match the P and B-frame image details very well, the residual discrepancies are bigger and more numerous and the encoder must use coarser quantizer tables to maintain high compression ratios.
Professional Blu-ray encoders optimize long GOP's by statistically pre-analyzing frame data before encoding starts, and by broadening their search radius in order to find the best-fitting motion vectors available, Real-time videocamera encoders don't have any time to pursue such complex encoding strategies - they must continuously encode the data as it is being scanned, using only motion vectors that lie close at hand.
Using a short GOP with a real-time encoder dramatically simplifies its motion tracking demands by keeping it constantly supplied with fresh motion vectors from nearby keyframes. This enables it to use its available bitrate very efficiently, since it is not forced to waste bits on either redundantly encoded I-frames nor on poorly approximated P and B-frame pixel details.
Thanks lpowell, fascinating as always
A very interesting read, thanks @LPowell.
@LPowell exposition and amazing example of inverse engineering. What I do not understand is this: "the keyframes per second that really matters in terms of motion rendering and not the GOP length". To me this is a contradiction. I fully agree with that the key-frames is what matters for good motion compression, but the number of key frames depends just of the GOPs length. The only way of getting more K-frames per second is shortening the GOPs, or there is other? Or are "I" frames different than "key-frames"?.
@Rafa In 24p and 720p modes the keyframes are all I-frames. (1080i is a little different.) The keyframe rate is determined by the frame rate divided by the GOP-length. If GOP-length were all that mattered, the 3-frame GOP used in Flow Motion 24p modes would produce better results than the 5-frame GOP used in 720p modes. But in fact, the 720p modes produce smoother results with 12 keyframes per second, while 24p modes have just 8 keyframes per sec. If you inspect the macroblocks in the 720p GOP, the second pair of P-frames in each GOP make use of the keyframe's motion vectors just as efficiently as the first pair of P=frames. That confirms that the GOP-length is short enough to eliminate stale motion vectors.
Just ran some tests of FloMotion vs. Quantum 100 for rendering of basically static scene with some audio in background. I tried to match things by manually white balancing on a card, but there was slight difference in white balance. Also, I accidently bumped the camera before doing the second patch, so the positions slightly changed. It's not perfect, but conditions are basically equal: Same Shutter (40), ISO (1600), and F-stop (4). Film Mode: Smooth: (-2, -2, 0, -2.) Used Mac Screenshot to capture from PNGs from playback of non-transcoded MTS files via VLC.
Interesting findings:
@24H: Focus was on the "Illy" silver coffee canister. It's close, but Quantum 100 shows slightly better rendition of some fine detail. I'm talking about pixel peeping at 500% or more. Zoom in on the "Illy" sign to see.
@24H w/ ETC: Focus was on the "Kriptonite" orange Bicycle lock. FloMotion actually looks a hair better to my eyes, but this seems more subjective than anything.
@720p: Focus was on the "Kriptonite" orange Bicycle lock I believe. FloMotion: same as #2, although it's seems that Sage's NINE patch would, if tested, significantly improve the Quantum settings (at a loss of using any Panny Lenses).
@LPowell has explicitly said that FloMotion isn't aimed at static image quality, so this is not really testing the patch for it's strong point, which is (nearly? ETC @720p being an exception?) full functionality. But I thought it was worth comparing it to Quantum 100 in this regard anyway.
Also interesting that Q100 and FloMo @24H give the same reading of card space on my Sandisk 30 mb/s 16 gb card, BUT they eat up the SD card space differently. For example, a 4 min file on Flo Mo takes up 977mb vs 2.96GB on Q100. HOWEVER, when transcoded to ProRes... they take up about the same amount of space! FloMo gives 3.42gb and Q100 gives 3.63gb. Interesting... seems that you're ultimately not paying a harddrive space price for Q100's slightly better 24H quality, although you are paying for it in terms of SD card space.
Reshot with all same settings on each patch. Yes, this scene is quite underexposed. Anyway, this confirms/ is the same as my test above: Q100 slightly better on static scenes (underexposed) at high ISO and 24H (the motion is perhaps subjectively nicer to me as well but I can't tell if this is just a placebo effect or something). Anyways...
EDIT: Since things seem to be heating up here(!?!?), I might as well explicitly say: I completely recognize that this is bordering on (in fact is) peeping up the whazoo. They are both darn good from image quality perspective so PICK A PATCH THAT WORKS FOR YOU AND SHOOT. Thanks for all your hard work and dedication @LPowell and @driftwood! non 95 mb/s Class 10 card shooters now have two fabulous options! Much respect! Time to shoot!
@lpowell, I-frames do not "produce" or contain motion vectors. Motion vectors are not re-used between frames. A block in a P-frame or B-frame may contain motion vectors that reference previously decoded frames, not the other way around. Motion vectors are not any more "stale" or less accurate or useful as the GOPs get longer or as you get further into a GOP.
Listen up, motherfuckers, if you want shit, you'll settle for shit. period.
@balazer Let's not be pendantic, I offered this as an inituitive analysis rather than a textbook explanation. What I'm loosely referring to as "motion vectors" are the references to macroblocks in the I-frame that are reused as starting approximations of macroblocks in P and B-frames. Over time, they grow "stale" in the sense that changes in the details of subsequent frames degrade their usefulness as approximations, and require the encoder to spend more bits on encoding the residual discrepancies.
If you'd prefer a more technical discussion, I'd be very interested to evaluate examples of the test footage on which you're basing your modest boast that "Cake beats Flow Motion L50 under all other conditions [except for for scenes with low motion, low noise, and high detail]."
@driftwood Would you mind pursuing your philosophical discussion with balazer elsewhere?
Here's a GOP9 example with P and B frames.
1 2 3 4 5 6 7 8 9 10
I B B P B B P B B I
Frame 4 references frame 1. Frame 7 references frame 4. Frames 2 and 3 reference frames 1 and 4. Frames 5 and 6 reference frames 4 and 7. Frames 8 and 9 reference frames 7 and 10.
Note that each P-frame references a frame 3 frames earlier, and the B-frames are referencing frames 1 and 2 frames away. If you increase the length of the GOP while maintaining this same pattern of B-frames (2 adjacent B-frames), nothing changes about how far away the references are. Of course every predicted frame depends on an I-frame, but it doesn't matter how many levels of reference indirection there are between a predicted frame and the I-frame that it depends on. It doesn't matter that you have several levels of reference indirection or a large frame distance between frame 9 and frame 1: the extra levels of indirection don't make frame 9's reference to frame 7 any less relevant or useful than frame 3's reference to frame 1, for example, and it doesn't mean that frame 9 will need to be any bigger than frame 3.
That's because the references are relative to decoded pictures. Frame 4 can contain all of the quantized coefficients necessary to properly represent frame 4 with the same quality as frame 1, even though the frame 4 may be very different from frame 1 and the motion vectors may not predict frame 4 very accurately. Same for frame 7. Same for every predicted frame. Errors do not accumulate as the levels of reference indirection or the frame distances increase, because each frame contains the necessary information to correct for the errors that reference frames may contain, and for the inaccuracy that prediction using motion vectors may produce. The number of bits required in frame 9 to correct for the errors in frames 7 and 10 and for the inaccuracy of prediction from frames 7 and 10 depends only on how much error frames 7 and 10 contain and on how different frames 7 and 10 are from frame 9. It doesn't matter at all how different frame 9 is from frame 1. You can use GOP99 and achieve the same quality as GOP6 or GOP9, and benefit from motion estimation in exactly the same way, with the same efficiency over the length of the GOP.
Confucius say, two men in pissing match find that GOP-ing in opposite directions prevents wet feet.
@querty123 You wrote: "HOWEVER, when transcoded to ProRes... they take up about the same amount of space!"
That's to be expected. ProRes is a VBR codec, but with a very narrow range of "V", other than H.264 aka AVCHD.
I did a comparison between Flow motion and Quantum 100, to test motion rendition and low light.
Shot with Voigtlander 25/,95 at 1.8, 1600 asa, shutter 1/50, 24H
You can see the test on Vimeo:
vimeo
or you can download the two Prores 422 files for better comparison here: www.sicilialibera.eu/test/one.mov.zip www.sicilialibera.eu/test/two.mov.zip
Both are wonderful patches, a big thank you to VK, Lee, Nick and everyone who made this to happen!
But... Can you guess which is which?
@Nino_Ilacqua The second part is flowmotion? I'm currently using Driftwood 9B and steadicam shots is so choppy due to motion not so smooth. Looking forward to trying flowmotion.
Here's a vid someone put up in 720p50. Looks great, but this is graded, compressed. I am going to try it out. much appreciated Lpowell.
@tmcat @LPowell Yeah, I was going to show it here, but wasn't fast enough! :D We applied to it a little bit of curves here and there, because it was sunset and light was changing from one minute to another but it's pretty much the same. Experienced some problems with macroblocking in the sky (wasn't noticeable until applying curves), but besides that it was great. We got there, asked that guy and shoot like that, it was the third time trying our GH2 and I must say it's amazing. Thanks to all of you, LPowell for the patch and specially @Vitaliy_Kiselev for all the effort you put into this! A huge thanks goes to our friend @atticusd as well, who brought us into personal-view and the awesome gh2 world!
Sorry for beating you to it, as it is your vid and all. I was looking around for videos to see how it performs and found yours, and was won over by the motion rendering. @LPowell is on to something here and as this is v. 1, I'm really looking forward to seeing were it heads. Having a thread dedicated to it with as much detail and work on the explanation as LPowell put into it is absolutely fantastic and again, very very much appreciated. I'm a tenth as impressed by this cam as I am by the work that all you guys are putting into these patches.
@tmcat Absolutely, there's no need to apologize! What I like the most of this forum is the speed of information, and I usually browse the latest gh2 hack videos on vimeo as well, so I'm glad you found this video. I too think this patch is going to be huge, we tried 24H and thought it was better than Quantum100 for portraits, but then again this is all so subjective...
@LPowell "If GOP-length were all that mattered, the 3-frame GOP used in Flow Motion 24p modes would produce better results than the 5-frame GOP used in 720p modes. But in fact, the 720p modes produce smoother results with 12 keyframes per second, while 24p modes have just 8 keyframes per sec".
I understand what you mean, but you are comparing two very different thing. If you shoot the same action in p24 and p60, in p24 there is more inter-frame difference than in p60 (displacement and motion blur). So at the same GOPs length, compression will always be more efficient in p60. To achieve the same quality, you will always need more key-frames (shorter GOPs) in p24 than in p60.
@balazer "The number of bits required in frame 9 to correct for the errors in frames 7 and 10 and for the inaccuracy of prediction from frames 7 and 10 depends only on how much error frames 7 and 10 contain and on how different frames 7 and 10 are from frame 9".
I do not understand this when frame 10 is an "I" frame.
I think this is in contradiction with your previous post: "I-frames do not "produce" or contain motion vectors. Motion vectors are not re-used between frames. A block in a P-frame or B-frame may contain motion vectors that reference previously decoded frames, not the other way around".
I understand that the GH2's GOPs are "Closed GOPs", so they must start with an "I"frame and that frame have not any relation with frames on the previous GOP.
I may be wrong. I have a certain knowledge on MPEG-2, but haven't got in deep with H264.
@balazer -"Of course every predicted frame (P-frame) depends on an I-frame, but it doesn't matter how many levels of reference indirection there are between a predicted frame and the I-frame that it depends on... Errors do not accumulate as the levels of reference indirection or the frame distances increase"
This is indeed how an AVCHD encoder is designed to work in theory, and professional Blu-ray encoders demonstrate how remarkably well it can be done in practice. If you download my 3-way Patch Test MP4 file from Vimeo and examine it in Elecard Streameye, you'll see a good example in action:
I rendered this H.264 video at 50Mbps after cropping the 1080p images down to 720p. The MP4 uses a 33-frame GOP and achieves QP levels of around 6-12. As this is finer quantization than any of the three patches I tested, it does a very good job of rendering the three clips' original image quality without adding perceptible artifacts of its own.
With the GH2's AVCHD encoder, however, there are two significant ways in which it falls seriously short of the ideal predicted by theory. When a P-frame is built out of motion vectors derived from a previous I or P-frame, the encoder is making a copy of a copy. If the P-frame quantizer tables were as fine as those used in I-frames, multiple generations of copies would suffer little degradation. Unfortunately, the GH2's P-frames have used significantly coarser quantizer tables and the errors are in fact larger in P-frame sequences. While these errors are corrected with encoded residual data, it uses up more bitrate to do so as the copies are more degraded. This is an an example of what I mean by motion vectors going "stale".
The other shortfall of the GH2 encoder is that it must work in real-time and cannot indulge in extensive motion vector searches or anticipate the bitrate requirements of frames that have not yet been recorded. This restricts its choice of motion vectors to those that lie close at hand. That is why I believe short-GOPs are inherently better suited to real-time motion capture than long-GOP formats. Short-GOPs dramatically simplify the encoder's motion tracking tasks, eliminate the long-GOP sequence of degraded P-frame copies, and automatically keep the motion vectors fresh. In practice, it appears to work with remarkably high quality at moderate bitrates in the Flow Motion Patch.
Screenshot from one of the original mts. FSH 720p Flow Motion. You can see some birds in the distance on the left and the awful pollution in Barcelona. The guy was frickin' fast, so I think it's not bad for a single frame! Thanks @LPowell!
It looks like you're new here. If you want to get involved, click one of these buttons!