Log in

View Full Version : Restoration from low-bitrate x.264


jmac698
12th February 2014, 23:03
Hi,
I have some clips of various quality, created by OBS (live streaming software), which looks quite blocky in motion scenes. Ideally I'd like to upscale to 1080p and make it clearer. I was wondering if anything could be done to it. Part of the reason for doing this, is that I need to add a logo to the original clips, and then post to a streaming video site, so the footage is encoded 3 times.

Here's the clips with logo:
https://www.mediafire.com/folder/mnz6wrhpgulwp/Nikki
I'd get Ahri Plays 4, it's the shortest one. It's basically the same as the original, because I encoded it with -crf 12.

The clips are in 3 resolutions, 1536x864, 1600x900, and 1920x1080. I'm upscaling to 1080p to force youtube to present in 1080p.

By the time it gets to youtube, it looks horrible:
http://www.youtube.com/watch?v=dc2fDZpmNCk&list=PLmxbRCOytn0VmZJqs-4tPtqSvxCsWo5GV&index=5

Btw, I've written a program to automate cutting, upscaling, logo-insertion, uploading, and metadata (title, description, keywords, playlists from a spreadsheet), if anyone is interested in processing a large set of videos (~50 in my case).

raffriff42
13th February 2014, 05:10
jmac698, a lot of detail has been lost. You simply need to capture at a higher bitrate.

Youtube recompression needs detail to work with - oversmoothing does not give a good result. I think what's needed here is sharpening, or more specifically adding back some low level detail. You need...NonlinUSM (http://forum.doom9.org/showthread.php?p=1555234#post1555234). Try NonlinUSM(pow=4) as a starting point.

https://www.dropbox.com/s/yk8bgd51clab8zy/Restoration%20from%20low-bitrate%20x.264%2002%20before.jpg?raw=1

https://www.dropbox.com/s/4w3jyrnml14e0mt/Restoration%20from%20low-bitrate%20x.264%2002%20pow%3D4.jpg?raw=1

aldix
13th February 2014, 16:06
What I'd like to know is who's that hot chick?

jmac698
13th February 2014, 23:44
@raff
Thanks, that really looks better!

@aldix
She's lonely, go talk to her https://twitter.com/Nikkimousie

jmac698
14th February 2014, 05:19
Ok, I noticed something. The originals are 40fps and youtube converts to 30fps, so if I had a sharp 3x motion-compensated frame interpolator, I could convert 40fps->120fps->30fps (decimate).

The pattern would be:
orig, inter1,inter2,inter3.

I'm assuming youtube is using frame blending, so that's why it's so blurry.

So what are my options for interpolation?

StainlessS
14th February 2014, 06:04
She's lonely, go talk to her https://twitter.com/Nikkimousie

Arh, so that's where you've been.


Could try this (dont know where I got it)


num=120 den=1 # convert to 120, suck it and see
super=MSuper(pel=1, hpad=0, vpad=0)
backward_1=MAnalyse(super, chroma=false, isb=true, blksize=16, blksizev=16, searchparam=3, plevel=0, search=3, badrange=(-24))
forward_1 =MAnalyse(super, chroma=false, isb=false, blksize=16, blksizev=16, searchparam=3, plevel=0, search=3, badrange=(-24))
backward_2 = MRecalculate(super, chroma=false, backward_1, blksize=8, blksizev=8, searchparam=0, search=3)
forward_2 = MRecalculate(super, chroma=false, forward_1, blksize=8, blksizev=8, searchparam=0, search=3)
MBlockFps(super, backward_2, forward_2, num=num, den=den, mode=0)

raffriff42
14th February 2014, 06:29
Good idea. I like Interframe (http://forum.doom9.org/showthread.php?t=160226) because it looks great, has nice features like scene detection, and it's easy to use, eg: Interframe(NewNum=120, NewDen=1).