Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th January 2017, 21:44   #1  |  Link
rkk
Registered User
 
Join Date: Jan 2017
Posts: 3
Best codec or HEVC settings for lossless or near lossless grainy recordings.

Hi,

I'm trying to digitalize all my Video 8 videos. As I don't know how long those tapes will last, I'm trying to archive them digitally with the best quality possible.

Right now I recorded a 30 seconds sample encoded with HuffYUV taking 602 MB of HD space. The problem is that the videos tend to be quite grainy (Especially during low light conditions). This doesn't seem to be very friendly with any lossy codecs.

While H264 results frequent bloky artifacts, my best bet was to try with HEVC. The only decent solution was to use --lossless option which generated a 730 MB file (Using QTGMC) which is even bigger than in HuffYUV. Encoding it interlaced as is in lossless HEVC completely brakes the interlacing, and the results are far from lossless.

Using near lossless encoding (With QTGMC + -cu-lossless) generates a 217 MB file which is much better in size, but the results are very weird, the colors seems to be different greyish surfaces look white and the faces of people look like plastic.

DeNoising has very blurred results, but I still haven't tested the compression when in lossless HEVC. But I would prefer to stay away from denoising as the noisy video seems to have much better detail.

Does anybody know how to get best quality (lossless or near lossless) for archiving the videos without requiring to eat up all my hard drives?
rkk is offline   Reply With Quote
Old 21st January 2017, 03:25   #2  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,784
Don't use HEVC for this. From a compute standpoint it's a waste of effort, and HEVC's advantages over AVC are really achieved with large frame sizes (1080p - 4k). For the use case of archiving legacy SD interlaced video digitized from a low resolution analog source you should just keep it simple

To that end, people often use DV or DVCPro 50. ProRes is another option if you're on a system that can capture into ProRes.

DV is 25 Mbps, and DVCPro50 is 50 Mbps. ProRes is typically ~42 Mbps for NTSC. Even at 50 Mbps your file size will be under 200 MB and all of these formats are very NLE friendly.

Quality should be transparent, though not mathematically lossless. True lossless is quite large, but likely not necessary.

Last edited by Blue_MiSfit; 21st January 2017 at 03:29.
Blue_MiSfit is offline   Reply With Quote
Old 21st January 2017, 14:22   #3  |  Link
rkk
Registered User
 
Join Date: Jan 2017
Posts: 3
Quote:
Originally Posted by Blue_MiSfit View Post
Don't use HEVC for this. From a compute standpoint it's a waste of effort, and HEVC's advantages over AVC are really achieved with large frame sizes (1080p - 4k). For the use case of archiving legacy SD interlaced video digitized from a low resolution analog source you should just keep it simple

To that end, people often use DV or DVCPro 50. ProRes is another option if you're on a system that can capture into ProRes.

DV is 25 Mbps, and DVCPro50 is 50 Mbps. ProRes is typically ~42 Mbps for NTSC. Even at 50 Mbps your file size will be under 200 MB and all of these formats are very NLE friendly.

Quality should be transparent, though not mathematically lossless. True lossless is quite large, but likely not necessary.
Wow!! I just quickly tried ProRes in StaxRip. The transcoding was done in less than 1 second (I thought it crashed), but the resulting file size is of 121 MB and the quality is near identical to the lossless file.

Thanks a lot Blue_MiSfit!

Is it possible to set some metatag in the video container (I'm using MKV) while using ProRes or DVCPro50 to let the player know that the content is interlaced? I've seen this happening in MP4 files if I'm not wrong and the player was deinterlacing the video automatically. Anybody knows how to do that? Thanks.
rkk is offline   Reply With Quote
Old 22nd January 2017, 05:01   #4  |  Link
sephirotic
Registered User
 
Join Date: Apr 2008
Posts: 19
HEVC is useless for grainy source. Grain is also a terror for lossless encode. Why not try AVC with Grain tune, very slow setting at CRF 15? While not lossless, At that setting you will likely have a significant saving in filesize with virtually no perceivable difference from the source unless you pixel peep.
sephirotic is offline   Reply With Quote
Old 22nd January 2017, 05:31   #5  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,234
The issue with Prores is that it isn't a codec standard. It's really only meant as an intermediate codec (apparently). It's not designed for end user, its primary purpose is video editing. BTW, what was your source if the encoding was supposedly that quick? The big issue you have using this is that it isn't a standard, meaning in a few years you may not be able to play the files if it is replaced or deprecated. Additionally, you may want to play it back on other devices that don't support the format.

The issue is the grain, the encoder sees this as detail. This 'detail' is over the whole picture and changes frame to frame, drastically increasing encoding complexity and file size. File size isn't representative of picture quality for this reason, as with a lower quality picture the encoder still has to encode all the detail present. Running it through a few filters first would be good, like KNLmeansCL etc, don't use a purely spatial denoiser. You can even remove the grain and some grain of some description back in. It might sound counter-inuitive, but this can be beneficial without using much more space, particularly if you use the right static noise in the right amount. If you use the right filters and settings you can greatly improve the perceptive quality of the picture whilst at the same time using drastically less space. The advantage then would be you can use standardised formats like h.264 or h.265 so it will safe for future viewing.

It's all about the perceptive quality when you are viewing it, not whether when you look at the screen two inches away with the right contrast and brightness settings you can see a difference in detail on the top hair of the left eyebrow. Basically you want to replace dirty noise with clean noise, make the picture subjectively 'clearer', adjust the colour, levels, hue, invidual channel brightness, gain, contrast etc, until you find a set that is good for the videos you want to encode. You will be surprised about how much better you can make it look whilst taking up considerably less disk space and greatly reduce any future compatibility issues.

In effect, I am suggesting you merely don't just record the videos but you restore them as well. If you have the space, sure, encode to prores as a backup but do the main storage in say, h.265 (with the right settings). You can then view them when you want, on any supported device, and still have the ability to go back and tweak settings or make changes to a particular encode at a later date (although this depends on the support for the original format in the future). At least then you have all bases covered.
burfadel is offline   Reply With Quote
Old 22nd January 2017, 05:56   #6  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,384
The key to noise reduction for SD analog video is to do just a little of it. "Less is more."

I usually use MDegrain2, with fairly small block sizes, lots of block overlap, and fairly small (non-aggressive settings). If you use settings that are too much, the remaining grain tends to correlate so it no longer appears random. This actually is more annoying than the noise, although it is much easier to compress.

BTW, if you actually look at the ability to resolve details, you may find that temporal denoising actually doesn't reduce detail at all. There is a psychological phenomenon where random noise can make it look like there is more detail and sharpness than is actually in the picture.

In my experience, spatial and frequency denoising do tend to soften the image, so I'm not a big fan of those tools.
johnmeyer is offline   Reply With Quote
Old 1st February 2017, 13:31   #7  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 3,463
Quote:
Originally Posted by johnmeyer View Post
The key to noise reduction for SD analog video is to do just a little of it. "Less is more."

I usually use MDegrain2, with fairly small block sizes, lots of block overlap, and fairly small (non-aggressive settings). If you use settings that are too much, the remaining grain tends to correlate so it no longer appears random. This actually is more annoying than the noise, although it is much easier to compress.

BTW, if you actually look at the ability to resolve details, you may find that temporal denoising actually doesn't reduce detail at all. There is a psychological phenomenon where random noise can make it look like there is more detail and sharpness than is actually in the picture.

In my experience, spatial and frequency denoising do tend to soften the image, so I'm not a big fan of those tools.
--nr in x264 and --nr-inter in x265 apply a very fast frequency domain temporal noise reduction that can help reduce bitrate with minimal quality hit.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 6th February 2017, 02:19   #8  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,784
Quote:
The issue with Prores is that it isn't a codec standard. It's really only meant as an intermediate codec (apparently). It's not designed for end user, its primary purpose is video editing.
Every single Hollywood studio masters their entire library into ProRes for distribution to third party streaming services like iTunes, VUDU, Netflix, Amazon etc... You will not have any trouble playing it in the foreseeable future.

ProRes is basically always totally transparent. It's a great format for this use case.

If you want hardware support on mobile devices, use AVC. Or HEVC if you're masochistic
Blue_MiSfit is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 20:18.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.