04-01-2023, 05:43 PM
|
|
Free Member
|
|
Join Date: Sep 2010
Location: Behind you
Posts: 473
Thanked 30 Times in 26 Posts
|
|
It took some time to install 64-bit Avisynth+ and change all of the filters, but now everything is working, so thank you for the help!
I am trying to archive a version of the restored video but FFV1 takes up too much space. I have read that mpeg2 is a good codec for analog from experts like Lordsmurf, so I exported clips at 10, 20, and 30 MBs. It is hard to tell when the video is playing but when paused the effect is noticeable, mainly in how the grain is preserved, which I want.
FFV1 Lossless
ffv1lossless.jpg
mpeg2 20 Mbps
You must be logged in to view this content; either login or register for the forum. The attached screen shots, before/after images, photos and graphics are created/posted for the benefit of site members. And you are invited to join our digital media community. |
mpeg2 30 Mbps
mpeg2_20mb.jpg
To me, there is a significant improvement in the grain preserved between the 20mbps and 30mbps mpeg2 video, but it still doesn't match the FFV1. Do you think going to 40Mbps is extreme or is there a better codec that can preserve this grain while not exploding the file size? I have no problem taking time in the encoding stage, since this is for archiving (I will still keep the original .avi).
I should note that, while the grain is artificial, it helps to give the psychological effect of more detail, which is why I add luma noise at the end.
P.S. For some reason the FFV1 lossless inline attachment is not coming out right, so I have attached it as well. I uploaded a .png but for some reason it is being automatically converted to .jpg, so the grain is blurred. The easiest place to see a difference (at least on my PC) is on his left cheek.
P.S. P.S. Imgur was able to preserve the grain detail:
https://i.imgur.com/fa2oS4r.png
Last edited by Winsordawson; 04-01-2023 at 05:57 PM.
|
Someday, 12:01 PM
|
|
Ads / Sponsors
|
|
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
|
|
|
04-02-2023, 10:35 AM
|
|
Free Member
|
|
Join Date: Mar 2013
Location: Italy
Posts: 676
Thanked 193 Times in 165 Posts
|
|
There is not a single reason today to archive in obsolete MPEG2 format. Nowdays is only used for DVD. Broadcasted TV switched to AVC codec since longtime for good reasons, even for SD interlaced material. Same for Blue Ray.
The preferred choice for archival is the original capture, large HD drives are not expensive today.
If you really want to compress your captures use h264 at low crf, slow preset, YUV 4:2:2 and interlaced options if required. Someting like:
Code:
ffmpeg.exe -i <input file> -c:v libx264 -crf 17 -preset slow -aspect 4:3 -x264opts interlaced:tff=1 -c:a aac -b:a 128k <output>.mp4
|
04-02-2023, 12:01 PM
|
|
Free Member
|
|
Join Date: Sep 2010
Location: Behind you
Posts: 473
Thanked 30 Times in 26 Posts
|
|
Thank you. From what I have read on this site, H.264 does not handle interlaced well, so MPEG2 should be used instead because it was designed with analog formats in mind. Is this your view?
For progressive formats, what bitrate would you suggest is archival quality for a typical deinterlaced 1080p video? 15mbps? I know there are calculators out there, but I care more about the quality than determining file size.
|
04-02-2023, 12:51 PM
|
|
Free Member
|
|
Join Date: Mar 2013
Location: Italy
Posts: 676
Thanked 193 Times in 165 Posts
|
|
Quote:
I have read on this site, H.264 does not handle interlaced well, so MPEG2 should be used instead because it was designed with analog formats in mind. Is this your view?
|
What you read is false; there were some (useless) GUIs like Handbrake or similar having problems 10 years ago, but not the codec. And no, it is not my view.
https://forum.videohelp.com/threads/...H-264-encoding
Quote:
For progressive formats, what bitrate would you suggest is archival quality for a typical deinterlaced 1080p video? 15mbps? I know there are calculators out there, but I care more about the quality than determining file size.
|
Use crf, a parameter for determining quality rather than calculate bitrate and then final size.
If you search the forum there should be a comparison I made between a huffyuv capture and its h264 encoding at low crf. Not really distinguishable at normal view, need a 4x magnification to find artifacts. And you can repeat the experiment by yourself on your own material.
|
The following users thank lollo2 for this useful post:
Winsordawson (04-02-2023)
|
04-02-2023, 02:15 PM
|
|
Free Member
|
|
Join Date: Sep 2010
Location: Behind you
Posts: 473
Thanked 30 Times in 26 Posts
|
|
Thanks--it turns out that FFMPEG has an option with libx264 called -tune grain, which can preserve the grain in video. At crf 17, the file size is about 30% that of FFV1.
I don't know much about MPEG-2 vs h.264 debate for analog, but why do you think LordSmurf recommended the former is this post, if you say MPEG-2 is obsolete: https://www.digitalfaq.com/forum/vid...html#post38025
Quote:
I archive my own VHS home movies as 15mbps Blu-ray spec SD 720x480 MPEG-2. They look great. A version can be saved to hard drive, and a disc can be burned for myself and family member. At least one member also has me load them on hard drive, too.
Only when a video needs restoration, do I capture to Huffyuv. It's processed, then converted to 15mpbs MPEG when done.
|
|
04-02-2023, 03:06 PM
|
|
Free Member
|
|
Join Date: Mar 2013
Location: Italy
Posts: 676
Thanked 193 Times in 165 Posts
|
|
No idea. Better ask him directly.
I disagree with him more than I agree on many points, but he's a resource for the community, that's for sure.
I would never capture to MPEG2, even if no restoration is needed.
But all this is not really important, what is important is that you found your way of capturing and restoring your video with good quality, and did significant progress since you started.
Good luck with your captures/restoration!
|
04-02-2023, 03:28 PM
|
|
Free Member
|
|
Join Date: Sep 2010
Location: Behind you
Posts: 473
Thanked 30 Times in 26 Posts
|
|
Yes, in part due to your help. Thank you for all of the tips along the way!
|
04-08-2023, 01:42 PM
|
|
Free Member
|
|
Join Date: Sep 2010
Location: Behind you
Posts: 473
Thanked 30 Times in 26 Posts
|
|
Hi again,
Happy holidays, if you celebrate. I have a clip where the color seems to spill over in some areas, like in this frame off the top of the woman's right arm. (ChromaShiftSP was applied to the extent possible without affecting other parts of the video).
mergeLuma_issue.jpg
Chroma was fixed through
Code:
MergeChroma(aWarpSharp2(thresh=200,depth=20,type=1).aWarpSharp2(thresh=200,depth=20,type=1))
If I apply the same function but replace MergeChroma with MergeLuma, the problem is fixed but of course the rest of the clip is smoothed. In another NLE I would apply an edge mask so that aWarpSharp2 and MergeLuma only work on the edges, but I am not too familiar with how to do this in Avisynth with its syntax. Do you have any suggestions?
This didn't work:
Code:
warped = aWarpSharp2(thresh=250,depth=50,type=1)
edgemask = mt_edge(mode="prewitt",thY2=150).mt_inpand()
Overlay(last, warped, mask=edgemask)
|
04-08-2023, 02:19 PM
|
|
Site Staff | Video
|
|
Join Date: Dec 2002
Posts: 14,013
Thanked 2,544 Times in 2,163 Posts
|
|
Well, that's a disturbing image.
|
04-09-2023, 10:34 AM
|
|
Free Member
|
|
Join Date: Sep 2010
Location: Behind you
Posts: 473
Thanked 30 Times in 26 Posts
|
|
It's a woman lying down during an interpretative dance sequence. She's very much alive and well (except for her shoulder shadow)...Tape is over 40 years old.....
|
04-11-2023, 11:35 AM
|
|
Free Member
|
|
Join Date: Mar 2013
Location: Italy
Posts: 676
Thanked 193 Times in 165 Posts
|
|
Quote:
In another NLE I would apply an edge mask so that aWarpSharp2 and MergeLuma only work on the edges, but I am not too familiar with how to do this in Avisynth with its syntax. Do you have any suggestions?
|
I would work differently on Y and UV planes, but is difficult to asses with an image.
Have a look here https://forum.videohelp.com/threads/...on#post2640813, and ask there; poisondeathray and jagabo are the masters of masking
|
04-11-2023, 12:13 PM
|
|
Free Member
|
|
Join Date: Sep 2010
Location: Behind you
Posts: 473
Thanked 30 Times in 26 Posts
|
|
Thanks again--I'll keep everyone posted on what I find out!
|
04-15-2023, 08:36 AM
|
|
Free Member
|
|
Join Date: Sep 2010
Location: Behind you
Posts: 473
Thanked 30 Times in 26 Posts
|
|
I uploaded a video segment this time. Is this ghosting? It turns out that MergeLuma with aWarpSharp2 only took part of the effect away, so the masking wasn't necessary and something else might be needed. (This was after MergeChroma/aWarpSharp2 was used, plus ChromaShiftSP). Thanks for any suggestions.
mergeLuma_issue2.jpg
|
All times are GMT -5. The time now is 01:03 PM
|