Bit rate investigation

Started by Audionut, July 19, 2012, 04:54:03 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy600

I set the deblocking filter settings to -2 & -1 after reading an article about best quality but can't remember where I read it. It looks better than off for sure and the noise is similar to the grain I've seen on the C300. It's not ugly.

I can't notice any serious dip in quality when q drops but it only dropped when I panned so as you say, some moving car shots should highlight any issues.

If this is the best we can hope for I think it's not too bad at all. I need to get another card and load up the default ML so I can A/B the same shots but I'm sure there is an improvement :) (there must be if I can notice it LOL)
Colorist working with Davinci Resolve, Baselight, Nuke, After Effects & Premier Pro. Occasional Sunday afternoon DOP. Developer of Cinelog-C Colorspace Management and LUTs - www.cinelogdcp.com

FilmMan

Andy600 and 1%,

I'd be willing to test.  I have a 5D2 and some top prime lenses.  I have the current ML installed.  Upping the bitrate (with current build), there is a slight quality difference especially with aiding in color grading.  I usually only attain 48 and peak out maybe if I'm lucky at 70 or so.

I'm not sure if your current testing files will work the the 5D2.  Achieving 100 mbps and with more stability has definitely caught my interest.  Let me know.  I'd like to help if possible.   I appreciate your efforts.  Cheers.

Andy600

Quote from: FilmMan on September 10, 2012, 08:32:43 PM
Andy600 and 1%,

I'd be willing to test.  I have a 5D2 and some top prime lenses.  I have the current ML installed.  Upping the bitrate (with current build), there is a slight quality difference especially with aiding in color grading.  I usually only attain 48 and peak out maybe if I'm lucky at 70 or so.

I'm not sure if your current testing files will work the the 5D2.  Achieving 100 mbps and with more stability has definitely caught my interest.  Let me know.  I'd like to help if possible.   I appreciate your efforts.  Cheers.

I think this is only for the 600d at the moment  :-\
Colorist working with Davinci Resolve, Baselight, Nuke, After Effects & Premier Pro. Occasional Sunday afternoon DOP. Developer of Cinelog-C Colorspace Management and LUTs - www.cinelogdcp.com

nanomad

Well it should work on almost every camera as long as the correct stubs are identified
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

JasonATL

Quote from: Andy600 on September 10, 2012, 07:24:36 PM
This is looking promising 1% :)

I shot some trees, grass and parked cars for a few mins using ALL-I. Bit rate was around 75-130mbps (q was mainly around 10 but hit 22 according to AVInaptic) with buffer warning set on 50% (that came on a few times but kept recording fine).

I can't quite put my finger on it but I think there is an improvement in over all detail. There is a very slight increase in noise at low ISO's using ALL-I but it's very fine grain and actually looks quite nice to my eyes. I'm testing it with a new LOG PS that I'm developing and it's looking great.

I need to shoot some fast moving stuff but it's getting dark here. Might try some night shots.

I agree. This looks very promising. I could definitely see an improvement in just the plain 'ol 2.3x CBR, so I'm anxious to see what these new improvements can do. I loaded up on my 600D last night. Since I was shooting only indoor shots of nothing interesting, I couldn't say much about the improvement in quality, but the bitrate was clearly higher than what I've been able to achieve with plain 'ol CBR. It did look better than anything I've seen from my 600D, in my limited shooting.

Some observations (I'll post more as I continue testing):
1. I have a 5D Mark III and the "grain" that Andy600 describes is reminiscent of what ALL-I looks like compared with IPB on the 5D Mark III. It appears that there is more "noise" with ALL-I, but this "noise" is different than the ISO noise.
2. It isn't clear to me that ALL-I is better theoretically. My understanding is that the benefit is in ALL-I being easier to decode (and encode?) because there is no interframe dependence. At the same bitrate, it is my understanding that IPB could be better since it is having only to account for the changes from the I-frame, whereas ALL-I uses the bits available to recompress all the information in each frame. Thus, it seems to me that a there is possibly an optimum for resulting picture quality (perhaps scene-dependent) in which we can maximize the bitrate and I-frame tradeoff by setting the GOP low enough to not overrun the buffer, but high enough to make use of the relatively more effective compression from IPB. This will be the focus of my tests. I could be wrong, so it is worth testing.

Thank you 1% and others for your skills and insights in doing this. I haven't coded anything in nearly a decade, so I'm trying to contribute where possible here.

3pointedit

Talk of grain change and bit depth seem contrary to the real issue, that of diminshed resolution and moire. A decent white balance should get the images close to what is needed in post, removing color correction and need for more bit depth (chroma keying excluded). and temporal compression often eliminates some gain noise anyway (free noise reduction) but at the expense of resolution?
I always thought that genuine improvement (to older cameras) would be sought by increasing/improving line structure (overcoming line skipping), is that a likely hood?

Great work BTW!
550D on ML-roids

1%

Quotebecause there is no interframe dependence

Yep, I frame dropped from buffer almost immediately. P frame sticks around for a while while its doing more passes, etc.

The P frames are only a little bit more compressed and really the main reason to use them is file size/buffer. 1GB a minute is hardcore no matter how you do it. Also, no B frames yet... Gop3 is where its closer to old file sizes and doesn't write almost all the time. I think the I frame has to be like 10-15% bigger for the same quality so instead of a decent 130mbps you end up at 160-170mbps and you actually do crash if the encoder slows down or the card does. Should test gop of 2,3-6... any more than that and too much is held in the buffer.

Qscale drops like a stone when the buffer warning comes on but it ramps up right away with the faster polling. You can turn on debugging and watch it. Qscale with canon functions only moved by one. With slice you can go from 128 to 87 instantly. I think canon was really going for consumers and smaller files rather than quality. They want you to buy a more expensive camera rather than using a 600D, etc. The weird thing is that they don't like offering swappable lenses on their camcorder offerings. Heavy grading will really show if the bit rate dips matter or not. If a few frames get all funky out of a whole sequence then we'll know.


Other cameras:

50D = Did not change gop.
550D = no breaking 4gb limit so you'll have all of 4 minutes of footage.
60D = untested for both limit and gop.
T3 = can probably pull it off
5d3 = different encoder, different hacks
5d2 = don't have one and nobody has really looked in on it. Encoder also slightly different. CF cards should in theory do more than 20MB/s write. A1ex has one so he'd be the guy to try it. But still have to hack the 4gb limit and 5d2 is the same generation as 550D so maybe only 32bit value for file size :(

What's left?

MJPEG might end up giving better results and actual full frame video, none of this 1600x960 crap. Although maybe native recording and resizing later might give better results for regular H.264 than in camera resized 1920x1080.  I can continually take shots at S1 which is like 2592x1728 so 2k video seems possible. Max file size per frame would be like .83MB to get 24p out of that.  .67 for 30P... not a whole lot of room. SD interface max speed at 48mhz is 25MB but no card seems to want to keep up.  How good can you get at that data rate?

Line skip is likely so it can fit the entire frame into reduced resolution without resizing the whole image and taking up CPU time, etc. It IS controllable since 600D has 1:1 crop and even zooming. But the issue will be that the frames are bigger and more complex to encode.. hence static and trees are very evil.

Right now, encoder in the hand is worth 2 in the theoretical stage.

FilmMan

1%,

What you have accomplished so far is absolutely AMAZING!!!  If you could convince Alex trying his expertise on the 5D2, many, including myself would be very appreciative.  Like I mentioned prior, I'd be willing to do test video shots for you.  So if you get Alex on board for the 5D2 and he needs a "tester", I'd be willing to give it a go on my camera. 

If you would achieve 2K video, that would be unbelieveable - it would ignite the video community in such a positive way. 

By the way, I have been posting your thoughts on another board.  It has generated a very positive fan base towards you.  As things develop, this could lead to more donations potentially for the Magic Lantern community.

Cheers 

1%

Thanks! Wow. I think a1ex was working on actually getting mjpeg out which would beat the H.264. There are strings with AVI in the factory functions so maybe camera supports a few containers too.

FilmMan

Hopefully either the H.264 tweaking or the mjpeg method works.  Maybe both will work.  People are very supportive and so excited about your progress.   The possibility of 4:2:2 color space with 2K video (or better 1080p than what Canon is providing) is making me lose sleep.  Cheers again.

Kabuto1138

I think I just crapped my pants, 2k??!!!!  BTW, I am here thanks to FilmMan.  Like he said, he put all this in another board.

For the record, all of this is Greek to me.  I use the 2.3 and love it.... but that's about where all my technical knowledge, all this Gop etc. is language from another planet.

But I can gather that we are ALL here for the main reason, that CANON has given us the short change so we have to buy at least a $13,000 dollar camera, to get a good quality file.  At that price the c300 is just 1080p Apple Pro Res 444

The 5d mark II and Mark III has the biggest sensor around(bigger than RED etc.) But we have to live with that crappy h264 BS.

I have a 5d Mark II and a Lexar professional 1000x(I heard is the fastest card around?), let me know when and how can I help, once Alex is on this.... just explain how to do it.... like you would a 5 year old  :P

1%  This is incredible.  Cheers.

Andy600

The noise/grain is definitely caused by the deblocking filter. I looked more closely at what I shot yesterday and there is slight blockiness in certain parts of the shots using ALL-I (deblocking filter set -2/-1). It's actually given me a much better understanding of what it does and how it affects appearance.

I shot a little test today between ALL-I and GOP 3 with the deblock filter at 0/0. There's not much in it quality-wise but GOP3 does help slightly with detail, especially grass.

I've upload a couple of seconds of ALL-I and GOP 3 here http://wtrns.fr/GwDyNV-M4di4gHQ Can you see any difference? The grass (lower left of the frame) looks a bit better to me on the GOP3 shot. Both shots were using the 600d 1080p/24p on a Nikon 50mm 1.8d at 3x sensor crop using my own LOG PS with LUT and a little luma sharpening applied. More news on the PS soon ;)

I'm shooting at an airfield this afternoon which should be a much better test with subjects actually moving. Only got a 16gb card though  :-\

Colorist working with Davinci Resolve, Baselight, Nuke, After Effects & Premier Pro. Occasional Sunday afternoon DOP. Developer of Cinelog-C Colorspace Management and LUTs - www.cinelogdcp.com

deleted.account

Not directly related with regard to encoding but post deblocking h264 with a 'decent' deblocker + a little temporal denoising an give a 'better' grain appearance subjectively but a little loss in detail. Fine line between keeping the detail and losing sharp edges to blocks.

jgharding

Thanks for the GOP3 and I-frame example. IMHO I-frame always has a more film-like cadence to movement, it just feels nicer. It should do though, since frames of celluloid don't predict one another ;) Even if it's a little blockier, I feel it's better to have no prediction smear between frames.

Is there anything I can test with 550D? I'd like to push it with some low light and human subjects... i mean victims! 
mwooohahahaha!
Zeiss primes, 600D, a lot of shadow. http://www.jgharding.com

jgharding

Also, noise that is harder edged is easier to remove in the denoising part of post-production. If you smear codec and ISO noise noise into the image at encoding, the result is actually a less-pleasing image once the production is complete, since denoising is a mandatory part of most post -production workflows, whether it be Neat Video, DaVinci Resolve, Denoiser II etc...

In other words, if all-I has slightly sharper noise, it will have two benefits for film workflow: the film-like motion cadence, and sharp noise that can more easily be detected and removed than noise which is blurred into an image at the encoder stage.
Zeiss primes, 600D, a lot of shadow. http://www.jgharding.com

nanomad

You guys are having too much fun so the 1100d is joining the party later today. :P
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

jgharding

Dunno if this article on deblocking is useful to any of the smart lads here, but I found it interesting: http://x264dev.multimedia.cx/archives/443
Zeiss primes, 600D, a lot of shadow. http://www.jgharding.com

JasonATL

I wasn't happy with any of my tests from yesterday. The wind wasn't blowing, so I had nothing moving to give me much of an idea of image quality. Light was also bad when I finally got outside. I've ordered a faster card to see what the card limitations are. Will try out more tomorrow, but probably won't have time to do serious tests until the weekend.

Once again, thanks for the incredibe progress.

nanomad

Man, porting this stuff to the 1100D was easy, altough I had to make your code a little better :P

Dunno if I missed any hardcoded constats though, so I didn't dare testing it yet  :-X

Pull request: https://bitbucket.org/OtherOnePercent/tragic-lantern/pull-request/1/hack-improvements-1100d-support
(review it and tell me if it's safe to test)
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

JasonATL

If anyone ports these features to the 550D/T2i, I have one of those in addition to my 600D and am willing to test on that, too.

1%

Looks safe to test. I think -6, -6 is de-blocking filter off. 0, 0 is just default.

The gop had only 2 locations. One would give an assert after your movie was done. The other is for the player so you can try to play these back in camera.

For 2k and the like, we have to see what we're actually getting. for 500D LV stream was 928x616, for 550D its 1056x704. If thats uprezzed to 1920x1080 you can do 2k easily but it won't be very real.

nanomad

If you accept my pull request you'll make thing easier for everyone 1% :P

Oh, and exFAT works beautifully on the 1100D ::)
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

1%


Andy600

Just back from shooting my girlfriend (haha) doing a spot of microlight flying. Shot with GOP3 and ALL-I and I can tell even looking at the ungraded footage that it's really good :) I also shot as a test for my new PS. I'll try to grade and edit it tonight and I'll point out what shots were GOP or ALL-I when I upload it. I didn't have any issues with buffer overloads. The only issue was the first shot of her actual take-off because I wasn't set up properly so the WB and exposure isn't correct but I'll try to fix that or she'll kill me  ::)

TBH I'm more and more excited by the possibilities. 1% has done a great job! This isn't the first time I've shot at the airfield but it's certainly the best looking footage I've captured.
Colorist working with Davinci Resolve, Baselight, Nuke, After Effects & Premier Pro. Occasional Sunday afternoon DOP. Developer of Cinelog-C Colorspace Management and LUTs - www.cinelogdcp.com

FilmMan

Andy600,

I did a quick grade of your 3 second gop3 clip.  I posted here.  https://vimeo.com/49267057
If possible could you upload and put up a link to the uncompressed version for the gop3?  I want to test and see how far the colors can be pushed. :) 

Cheers