Log in

View Full Version : Double the quality of your caps


jmac698
21st August 2011, 01:35
I had an idea to improve the quality of digital caps. First, realize that mpeg2 has different quality frames depending on it's position. Frames can be I,B, or P. If a station transmits 720p at 60hz, a movie will have up to 3 repeated frames. If those frames all on an I,B,P sequence, I think the 2nd repeat will be much higher quality than the others, because the I frame is a static frame and the B frame has corrected any errors in it. It's the same film frame encoded 3 times so the quality must be different in each frame.
If you record the show twice, you can probably piece together the best frames from each and hopefully get mostly higher quality frames. The result should be noticably less blocky. You can re-encode to h264 and probably still look better.

This can be done with an option in ffmpegsource which can return the frame type.

I've noticed some frames look better in 720p recordings before. What do you think?

ChiDragon
21st August 2011, 03:13
I thought about the 720p thing before, but my TV provider uses frame repeat flags where possible, so differences are rare and usually small when I've checked.

More interesting to me and something I've wanted for 5 years is similar to your second suggestion, a general or input filter that could compare multiple captures and find which has the least compression, whether that be by frame-type, quantizer, less blockiness (I'm imagining it looking for the presence of 8x8 grids) or some general measure.

In some cases I literally have 7 copies of the same TV episode recorded so it would be nice if such a thing existed.

jmac698
21st August 2011, 03:30
That's a good idea, I thought of the same thing to automate my idea. I looked and I think there's plugins which can produce a blockiiness measure. The ffms2 source can provide the frame type and lots of information. There's utilities to show you bitrate. Newer recordings may be better if newer equipment is installed at the source, nowadays we can jointly encode several channels on one frequency at once and give better bitrate to the channel that needs it. It may be that a certain channel always looks better. I would say the 720p recording you have would be less blocky, if lower rez. I can really notice the blockiness in HD channels and it's still annoying :(

The cable companies are slowly changing to h.264 now so hopefully thiings will look better, but they will end up compressing it to hell again :(

For 7 recordings you can probably average them all. Btw, I would be interested in getting short clips from each of them, I can probably start work on my idea in a script! A lossless cut of just 1s of each is fine. The scene should have motion and look "bad".

ChiDragon
16th October 2011, 22:37
Never saw your edit (I think I only read the post via email subscription).

I tried averaging two recordings a year or two back and while it made the blocky parts of one slightly better, it of course added a certain amount of blockiness to other frames of source A that were fine, because Source B looked bad there...

I saw another post where you said you now have a method to pick the best recording? If you still need some samples I can PM you. The ones that I have many recordings of are 704x480, not HD sources.