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 17th April 2020, 18:58   #1  |  Link
tugatomsk9
tugatomsk9
 
Join Date: Mar 2020
Posts: 24
50fps HEVC with VHS video

I have a ton of home recorded and edited motorsports videos on VHS that I'd like to capture. It will have to be done with composite cables and a MAGIX pen because at the moment I can't afford either a better PC or a better video capture device... (all PCI and PCIe slots are in use).

My goal is to produce QTGMC deinterlaced 50fps at approximately 576p (probably less due to some slight cropping needed) with an average video bitrate of 800-1000 kbps.

I've heard that HEVC is extremely useful at low bitrates, so I was thinking of using the "very slow" preset given the high framerate. Is it overkill? Should I also use 10bit for the banding?

Or is HEVC not all that's cracked up to be and I should just go with 8bit x264 at a higher bitrate?

Last edited by tugatomsk9; 17th April 2020 at 19:01. Reason: grammar
tugatomsk9 is offline   Reply With Quote
Old 17th April 2020, 19:25   #2  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 4,015
I don't know what a MAGIX pen is an what it does. Is it a capture HW/SW package with an on-the-fly encoder?
First of all you should capture your VHS tapes lossless using HUFFYUV, Lagarith or UTVideo codec. Composite video is not the best choice as it is prone to producing dotcrawl and rainbows, but I understand you have no other choice.
Once you have succeeded with the lossless capture (no dropped frames, etc) you can view the captured video and only then decide on next steps like cropping, denoising, deinterlacing/bobbing. You have to do some test encodes using x264 (AVC) or x265 (HEVC) and see what CRF or bitrate gives the desired quality level. Finally, one needs to mux video and audio in a container format of your choice.
The first step is very crucial though. If the VHS capture is flawed it is nearly impossible to recover any losses at a later stage.

Last edited by Sharc; 17th April 2020 at 19:29. Reason: Typo
Sharc is offline   Reply With Quote
Old 17th April 2020, 19:52   #3  |  Link
tugatomsk9
tugatomsk9
 
Join Date: Mar 2020
Posts: 24
Quote:
Originally Posted by Sharc View Post
I don't know what a MAGIX pen is an what it does. Is it a capture HW/SW package with an on-the-fly encoder?
https://www.magix.com/int/video-editor/vhs/

It is bundled with a below-average capture software and a proprietary video codec that did not please me at all.

Yes, I did plan to capture using Huffyuv of Lagarith from the start.

My doubts about which encoder to use arised from my PC being very old and low-spec: intel i3-2100, intel HD graphics card...

Is S-Video a better option even though it's still VHS? I do own a Sony RDR-HX710 DVD video recorder, but I wanted to avoid recording using mpeg2 before reencoding to x264/x265. The Sony does have S-Video line in and line out, though. Is there any benefit from using the Sony as a pass-through between the VHS VCR and the USB capture drive using S-Video?

EDIT: BTW, the VCR in question is a Panasonic NV-FJ623 Hifi Stereo with 6 heads bought in 2003 and operating in good conditions.

Last edited by tugatomsk9; 17th April 2020 at 20:00. Reason: more details
tugatomsk9 is offline   Reply With Quote
Old 17th April 2020, 20:13   #4  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,993
Regarding s-video vs composite, it depends heavily on the quality of the comb filter.

VHS is a composite format, period. Splitting it into separate luma + chroma requires a comb filter, and it either happens on the player when you're making S-Video, or on your capture card.

Old laserdisc players for example had shitty comb filters by today's standards, so with a pro capture card you'll get much better results with composite. Not sure if that's the case with your basic capture device Try it both ways and see which method produces less dot crawl.

Regarding compression, HEVC is a good fit for this if you don't mind spending the compute. Use 10 bit. With an i3 doing the encoding I'd say it's overkill though

Why do you want the bit budget to be so low? You're using QTGMC so presumably you do care about the quality! I'd have transparent quality be a top priority. Just use low CRF encoding with x265 or x264.
Blue_MiSfit is offline   Reply With Quote
Old 17th April 2020, 21:51   #5  |  Link
tugatomsk9
tugatomsk9
 
Join Date: Mar 2020
Posts: 24
Quote:
Originally Posted by Blue_MiSfit View Post
Regarding s-video vs composite, it depends heavily on the quality of the comb filter.

VHS is a composite format, period. Splitting it into separate luma + chroma requires a comb filter, and it either happens on the player when you're making S-Video, or on your capture card.

Old laserdisc players for example had shitty comb filters by today's standards, so with a pro capture card you'll get much better results with composite. Not sure if that's the case with your basic capture device Try it both ways and see which method produces less dot crawl.
Both produce dot crawl. :\ At least now I know the cause of it.

I know there are avisynth filters for dot crawl, it's just that I've never been a big fan of the usage of avisynth; some of its filters are rather complicated to set up. But I guess I'll have to give it a try.


Quote:
Originally Posted by Blue_MiSfit View Post
Why do you want the bit budget to be so low? You're using QTGMC so presumably you do care about the quality! I'd have transparent quality be a top priority. Just use low CRF encoding with x265 or x264.
Oh, the values were more of an example. I was aiming for 230MB for a 25min 50fps video, for example. The main reason is hard drive constraits. Hard drives are not that cheap in my country - the coronavirus ins't helping at all - and I've been unemployed for quite some time, so I was trying to be as filesize efficient as possible. Being unemployed also prevents me from bying a modern, up to date PC with a proper video capture card that I've been wanting for years...


There's something I forgot to mention: the recordings are mostly second or even third generation recording using two VCRs at the time for the editing. There are some which are first generation, but they're not the norm, sadly. Also sad is that my father never owned a S-VHS video, which would have been ideal for such edits. But what is done is done. :/ I know there isn't much to retain, but I do want to retain the original smoothness of high speed sports such as motorsports, which is why I wanted to double the framerate and not let the video bitrate go through the roof.

Last edited by tugatomsk9; 17th April 2020 at 21:54.
tugatomsk9 is offline   Reply With Quote
Old 17th April 2020, 20:37   #6  |  Link
RanmaCanada
Registered User
 
Join Date: May 2009
Posts: 336
x265 is really not advisable for SD content. You will get far better results with x264. As Sharc says, try to use Huffy lossless for your capture. VHS is a noisy medium, and you will need to keep as much of the original footage as possible.
RanmaCanada is offline   Reply With Quote
Old 17th April 2020, 21:39   #7  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,869
Quote:
Originally Posted by RanmaCanada View Post
x265 is really not advisable for SD content. You will get far better results with x264. As Sharc says, try to use Huffy lossless for your capture. VHS is a noisy medium, and you will need to keep as much of the original footage as possible.
Yeah, on a low spec machine, the quality @ perf of x265 might not be that much better than x264, since you might be able to run x264 in slower and x265 at medium for the same total encode time.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 17th April 2020, 21:59   #8  |  Link
tugatomsk9
tugatomsk9
 
Join Date: Mar 2020
Posts: 24
Quote:
Originally Posted by benwaggoner View Post
Yeah, on a low spec machine, the quality @ perf of x265 might not be that much better than x264, since you might be able to run x264 in slower and x265 at medium for the same total encode time.
I did ponder to use x265 at the "very slow" preset despite the looooooong encoding time due to my old i3... But it's not set on stone.

What I was going for is that how much am I gaining with HEVC versus x264 with SD footage using the same preset and settings, like "very slow": is it worth it or is it just peanuts?
tugatomsk9 is offline   Reply With Quote
Old 17th April 2020, 22:11   #9  |  Link
Sharc
Registered User
 
Join Date: May 2006
Posts: 4,015
Quote:
Originally Posted by tugatomsk9 View Post
What I was going for is that how much am I gaining with HEVC versus x264 with SD footage using the same preset and settings, like "very slow": is it worth it or is it just peanuts?
I would suggest to stick to x264 in your case. But why don't you just try and judge yourself?
As I said, start with the critical lossless capturing process with your setup. The subsequent encoding (apart from filtering) is almost peanuts IMHO.
If you have problems with the lossless capturing use your DVD recorder and set it for the best mpeg-2 quality (highest bitrate) and leave as is. Only if file size really matters reencode to AVC (x264).

Last edited by Sharc; 17th April 2020 at 22:22.
Sharc is offline   Reply With Quote
Old 17th April 2020, 22:26   #10  |  Link
tugatomsk9
tugatomsk9
 
Join Date: Mar 2020
Posts: 24
Quote:
Originally Posted by Sharc View Post
I would suggest to stick to x264 in your case. But why don't you just try and judge yourself?
As I said, start with the critical lossless capturing process with your setup. The subsequent encoding is almost peanuts IMHO.
Oh, absolutely, I'll capture lossless.

I had the feeling x264 would be the more sensible option given my hardware, but I wanted to sort things out once and for all about this. Thanks, guys. If I had a proper computer, though, I'd go all out with HEVC.

BTW, would it be of any help if I uploaded an excerpt to youtube and show you what it's going to be like 70% of the time? It'd be from the only DVD I burned with my Sony recorder, the portion of the original VHS recording that no longer exists.
tugatomsk9 is offline   Reply With Quote
Old 17th April 2020, 22:33   #11  |  Link
tugatomsk9
tugatomsk9
 
Join Date: Mar 2020
Posts: 24
Quote:
Originally Posted by Sharc View Post
If you have problems with the lossless capturing use your DVD recorder and set it for the best mpeg-2 quality (highest bitrate) and leave as is. Only if file size really matters reencode to AVC (x264).
Filesize is always an issue to me - I have many, many hours of tape to transfer -, so I'd always reenconde it to x264/HEVC.

I also considered using the Sony recorded as a video capture device. There's even a HQ+ option which raises the video bitrate to 15Mbps, outside the original MPEG2 norm. But even if I were to burn it to a DVD+RW and rip it on my computer, the burn itself would have to be an MPEG2 reencode itself due to a limitation imposed by Sony, which is a shame.

But even if I recorded in standar HQ (1h), HSP (1,5h) or even SP (2h) and fill the Sony's 160GB harddrive, I'd still have to burn my DVD+RW a massive number of time. It's a very long and boring process... (Of course, if there was a way to extract the original mpeg2 videos onto my PC, especially if they were HQ+, I'd be all over it.)

Not to mention that I was under the impression that mpeg2 was in itself a poor codec compression-wise?

Last edited by tugatomsk9; 17th April 2020 at 23:48. Reason: clarification
tugatomsk9 is offline   Reply With Quote
Old 20th April 2020, 02:12   #12  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,869
For compute-constrained encodes, using --preset slower --limit-sao 3 will give you most of what HEVC is capable of.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 22nd April 2020, 08:28   #13  |  Link
foxyshadis
Angel of Night
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
If you really do want to scrape the bottom of the bit budget, x265 will always be better than x264, and likewise AV1 will always be better than x265 -- when compute time is no obstacle. But if your electricity is metered, it would probably be a lot cheaper to buy an extra terabyte or two and not go that route. At the fairly reasonable 1 megabit for SD video, the only reason to go with x265 would be if you edited and cleaned it to the point that banding will matter and built-in 10-bit will be meaningful. But if you're trying to keep closer to what a raw VHS capture actually looks like, even with some basic filtering, 8-bit x264 will still do plenty of justice at an extremely fast speed.
foxyshadis is offline   Reply With Quote
Old 22nd April 2020, 19:28   #14  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,869
Quote:
Originally Posted by foxyshadis View Post
If you really do want to scrape the bottom of the bit budget, x265 will always be better than x264, and likewise AV1 will always be better than x265 -- when compute time is no obstacle.
Well, AV1 is a bitstream and x265 is an encoder; comparing x265 would be versus a specfic AV1 encoder. While various assertions have been made about AV1 being "20% more efficient" than HEVC, most of those claims fall apart when subjective comparisons are made between an optimally-tuned x265 and an optimally-tuned libaom or rav1e. The 20% number was comparing mean PSNR at a fixed QP without any rate control, dynamic frame type selection, and a bunch of other constraints typical of reference encoders but far from how anyone actually encodes video for people to watch.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 22nd April 2020, 19:40   #15  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Quote:
Originally Posted by foxyshadis View Post
...At the fairly reasonable 1 megabit for SD video, the only reason to go with x265 would be if you edited and cleaned it to the point that banding will matter and built-in 10-bit will be meaningful. But if you're trying to keep closer to what a raw VHS capture actually looks like, even with some basic filtering, 8-bit x264 will still do plenty of justice at an extremely fast speed.
There's always 10-bit x264 also.
Stereodude is offline   Reply With Quote
Old 23rd April 2020, 23:59   #16  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,869
Quote:
Originally Posted by Stereodude View Post
There's always 10-bit x264 also.
Alas, supported on fewer devices than HEVC 10-bit, particularly mobile.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 24th April 2020, 15:44   #17  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Quote:
Originally Posted by benwaggoner View Post
Alas, supported on fewer devices than HEVC 10-bit, particularly mobile.
For hardware decoding, yes. But it's SD resolution, so software decoding shouldn't be an issue.
Stereodude is offline   Reply With Quote
Old 24th April 2020, 16:29   #18  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,869
Quote:
Originally Posted by Stereodude View Post
For hardware decoding, yes. But it's SD resolution, so software decoding shouldn't be an issue.
Really depends on the playback platform and players being used.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 8th July 2020, 20:21   #19  |  Link
tugatomsk9
tugatomsk9
 
Join Date: Mar 2020
Posts: 24
After some time experimenting with avisynth, I finally conjured a good avs script using QTGMC deinterlacing. The resulting image quality - checked using Virtualdub as a frameserver - turned out really nice, especially taking into account the not-so-good original PAL VOB.

Here's the script:

LoadPlugin("C:\Program Files (x86)\MEGUI\tools\avisynth_plugin\FFMS2.dll")
LoadPlugin("D:\USER\Documentos\IMPORTANT STUFF BACKUP\avisynth plugins\hqdn3d\hqdn3d.dll")
mpeg2source("G:\WORKING\Duarte&co\Duarte e Companhia - 10 RTP memoria.d2v")
AssumeTFF()
QTGMC( Preset="Slower", MatchPreset="Slower", MatchPreset2="Slower", SourceMatch=3, Sharpness=0.9, TR2=3, Lossless=2 )
#(TR2= 0 for clean sources TR2=3 for noisy sources)
SelectEven()
#SelectEven() maintains original framerate
hqdn3d(ls=1.0, cs=1.0, lt=6.0, ct=1.0, restart=7)
LanczosResize(768,576)
Crop(10, 2, -16, -0)

However, I'm still experiencing difficulties trying to maintain the original aspect ratio. I scaled to 768x576 because I read in avisynth's wiki that operation changes the PAR to 1:1, which is what I want: a universal resolution for modern displays (LCD and such), giving up on CRTs.

Yet, when I open the resulting video file, VLC player still changes the aspect ratio when I switch from original to 4:3. This confuses me, because I thought I had created a video file that did not require aspect ratio changes on modern LCDs.

Which one is right: my stipulated resolution or VLC?
tugatomsk9 is offline   Reply With Quote
Old 8th July 2020, 21:30   #20  |  Link
Cary Knoop
Cary Knoop
 
Cary Knoop's Avatar
 
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 398
Quote:
Originally Posted by tugatomsk9 View Post
SelectEven()
Don't do that, especially not for motorsport.
Cary Knoop is offline   Reply With Quote
Reply

Tags
50fps, hevc, vhs, x264, x265

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 22:17.


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