Anyone tips for VHS (DV-file) to h.264 encodes?

HandBrake for Mac support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Filmriss
Enlightened
Posts: 111
Joined: Sun Jun 21, 2015 8:21 pm

Anyone tips for VHS (DV-file) to h.264 encodes?

Post by Filmriss »

Hello,

I know, the obvious answer would be: "take a 1min. snipet and try several settings and decide, which you like best". But I'd like to know, if there is certain stuff I should avoid, when converting DV files that are captured PAL-VHS tapes.

For example I had done testruns, but can't make a judgement, which of my testfiles is the best.

I learned from the the Handbrake wiki guide, that CRF around 20 is ok for DVD and 22 for BluRay sources. But that it depends on the source and the "personal" eye. I have even used CRF 16 once for a file, because I found 20 and 18 to much quality loss.

Back to VHS. If someone has time and the kindeness to look at my source and tell me what would be OK settings, I'd be very happy.

I tried CRF from 16 to 26 and all look the same (choosing veryslow, High@5.2) and it seems there is even no difference, if I add grainy or film instead of none. Only that with "grainy" and "film" the resulting "Bitrate" gets bigger.
I also tried 1000-2000kbps, 2-pass looks the same for me.

I suspect, it might be paradox, but if I have a crappy source, it doesn't really get crappier, if one tries to intentionally choose a low bitrate (e.g. 1000kbps) or CRF 26.
For the picture settings I kept what Handbrake sugguested.

My source: https://www.dropbox.com/s/ot5p93rx3nly5 ... v.zip?dl=0

I don't know, if a log would help here, but here is the log https://www.dropbox.com/s/jz6jqzbg2vyyw ... g.rtf?dl=0 (it doesn't include all of my multiple tests, though.

I read, here in the forum (type VHS in search field, it only comes up with few threads), that noise increases the bitrate, too. Also interlaced seem to make problems, when only using decomb, right?
mduell
Veteran User
Posts: 8207
Joined: Sat Apr 21, 2007 8:54 pm

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by mduell »

Filmriss wrote:I don't know, if a log would help here, but here is the log https://www.dropbox.com/s/jz6jqzbg2vyyw ... g.rtf?dl=0 (it doesn't include all of my multiple tests, though.
I haven't read your entire post, but I want to say thank you for reading the instructions and not deciding they don't apply to you because you can't imagine how they're useful. [Censored] thank you.
Filmriss
Enlightened
Posts: 111
Joined: Sun Jun 21, 2015 8:21 pm

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by Filmriss »

Sorry for having appeared to be a poophole, before.

Have you noticed I have added the logs for my other two threads, too? (this happened 1 day earlier, the in this thread).


PS: I might be a dishonorable person, but why do you have to use strong language? (I am referring to the word that has been censored).
Filmriss
Enlightened
Posts: 111
Joined: Sun Jun 21, 2015 8:21 pm

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by Filmriss »

I tried decomb "bob" and NLMeans medium grain additionally to what I have tried before and NLMeans seem to result in blocking (artefacts).

I have found specs someone used for a similar file:
cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00

How do I make Handbrake use these.
Check advanced, toggle to advanced window and put text in windows at the bottom?
Woodstock
Veteran User
Posts: 4623
Joined: Tue Aug 27, 2013 6:39 am

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by Woodstock »

The problem with trying to enter all of those "tweaks" is that they may make a mess of your particular video.

What happens when you start with the "normal" preset, and set deinterlace to default? Start with the basics and address noise after you get acceptable (to you) video. Yes, the noise makes the file bigger, but there is little use in taking care of fine details when there may be bigger issues to address.
Filmriss
Enlightened
Posts: 111
Joined: Sun Jun 21, 2015 8:21 pm

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by Filmriss »

Hi,

thank you. For deinterlace there is no default, there is only: off, Fast, Slow, slower, Bob.
Do you mean decomb? This has: off, custom, default, fast, bob

But doesn't Handbrake wiki say, that decomb is enabled by default and should be used? Maybe I remember this wrong.

So, I am testing now "normal" now.

I chose another testsnipet than above, because I saw that there is a lot going on in the opening (I had started the snipet from after the opening 1min). Now I have the opening + what I had above.
In case someone wants to try, here is the new file https://www.dropbox.com/s/j3wpgh1ucmw61 ... t.zip?dl=0


PS: while I am writing it is ready and I compared it too my other trys. I don't really see that there has been something deinterlaced vs my other trys, where I had left the "picture settings" untouched. The overal image quality is the same to comparing RF 26 to 16 and to "Normal" and to "1000kbps, 2pass".
The result as per your recommendation has 3200kbps video now.

Normal has main level 4, shouldn't I take high level 5.2 anyway? I read, that the level is just to ensure, that certain older machines can play it and Handbrake wouldn't go out of the level. So, if I allow Handbrake to go out of main@4 and at least give HAndbrake the chance to be able to use high@5.2, wouldn't that result in same quality, but lesser bits?
Filmriss
Enlightened
Posts: 111
Joined: Sun Jun 21, 2015 8:21 pm

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by Filmriss »

Short version. Using "normal" setting and "deinterlace" didn't change anything.
mduell
Veteran User
Posts: 8207
Joined: Sat Apr 21, 2007 8:54 pm

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by mduell »

Filmriss wrote:Normal has main level 4, shouldn't I take high level 5.2 anyway? I read, that the level is just to ensure, that certain older machines can play it and Handbrake wouldn't go out of the level. So, if I allow Handbrake to go out of main@4 and at least give HAndbrake the chance to be able to use high@5.2, wouldn't that result in same quality, but lesser bits?
No and no.
Filmriss wrote:Short version. Using "normal" setting and "deinterlace" didn't change anything.
Cool story.
Filmriss
Enlightened
Posts: 111
Joined: Sun Jun 21, 2015 8:21 pm

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by Filmriss »

You hate me and that is all because of the fact, that I didn't provide logs?

To your answer
"no and no"

Here https://trac.handbrake.fr/wiki/x264VideoSettings jump to profiles and levels.
It says, that it gets more complex the higher teh profiles go. I assume, that more complexity will result in less space for the same quality result. SO, if my playback device will be able to play high@5.2, why shouldn't I use this profile/level? So even though the source might not need that profile/level and Handbrake will not fully exploit the profile/level. This way I take care I don't restrict Handbrake and if I had chosen lower profile (e.g. when my blackback device could only play High@3) I would make shure it doesn't go out of the profile my blackback device can handle.
So where is the no and no directed to?


To your answer:
"cool story"

Let me explain: I answered to Woodstocks sugguestion. He said I should try Normal and deinterlacing. After having tried this I told him, that "short story: there is no difference to my trys before".

I will avoid the forums, since I now get that I am behaving too badly and am getting on everybodys nerves. Message received. Sorry, I wasted the time of helpful people. THank you woodstock for trying to help me allthough I didn't behave the right way.
Woodstock
Veteran User
Posts: 4623
Joined: Tue Aug 27, 2013 6:39 am

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by Woodstock »

The "behaving badly", in my opinion, is limited to your not wanting to provide the logs when asked. Logs help verify what settings are actually being used, how Handbrake viewed the file being read, and how it responded to it. For example, your subject says "VHS" and "DV" in it. They aren't the same thing, so seeing what handbrake reported when it scanned the file is important.

"Cool story" is about the only response we can make when we lack information to give a better answer. Without logs, there are many questions that need answers, many of which you may not know.
mduell
Veteran User
Posts: 8207
Joined: Sat Apr 21, 2007 8:54 pm

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by mduell »

Filmriss wrote:You hate me and that is all because of the fact, that I didn't provide logs?
I don't hate you, I just think you're a moron for failing to provide the info we need to help you despite clear statements of what you need to provide.
Filmriss wrote:To your answer
"no and no"

Here https://trac.handbrake.fr/wiki/x264VideoSettings jump to profiles and levels.
It says, that it gets more complex the higher teh profiles go. I assume, that more complexity will result in less space for the same quality result. SO, if my playback device will be able to play high@5.2, why shouldn't I use this profile/level? So even though the source might not need that profile/level and Handbrake will not fully exploit the profile/level. This way I take care I don't restrict Handbrake and if I had chosen lower profile (e.g. when my blackback device could only play High@3) I would make shure it doesn't go out of the profile my blackback device can handle.
So where is the no and no directed to?
You asked two questions:
"shouldn't I take high level 5.2 anyway?"
"wouldn't that result in same quality, but lesser bits?"
The answer to both of these questions is no.

There is no* advantage to using a higher level than is necessary for your frame size and framerate. The profile can (and typically does) have an impact on compression efficiency, but the level does not.

* Not strictly true, since the higher levels allow higher peak bitrates, but hardly worth mentioning and has none of the benefits you're looking for.
Filmriss wrote:To your answer:
"cool story"

Let me explain: I answered to Woodstocks sugguestion. He said I should try Normal and deinterlacing. After having tried this I told him, that "short story: there is no difference to my trys before".
Every single time you claim to try something you should provide the log from the attempt. No one likes to spend time trying to help users when the problem was PEBCAK and misleading or lying about configuration. "Cool story" or "cool story, bro" is my standard dismissive response to unsubstantiated claims.
Woodstock
Veteran User
Posts: 4623
Joined: Tue Aug 27, 2013 6:39 am

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by Woodstock »

Maybe part of the problem is expectations that encoding can improve bad sources... If you're unhappy with the results of a BD source with a CRF of 18, a VHS source starts out with a poorer quality than you appear to want. And it isn't going to get any better.
Filmriss
Enlightened
Posts: 111
Joined: Sun Jun 21, 2015 8:21 pm

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by Filmriss »

Regarding log files. I did upload them after you told me to do so., see other threads, too. I admit I didn't add a second log file, after I tried "normal and deinterlace", because I meant to see it with the eyes, at least, if the file was different now, I didn't see the difference. I understand now, that it isn't enough trying it, because everytime one trys another thing you have to look at the log to check, if teh person really used the settings you recommended.

Regarding language:
I find it quite harsh to say "claim" and "lie", insinuating/implying I hadn't done the test runs and just came back saying "it didn't work", because I was to lazy or something.

Unfortunately I deleted a lot of my tests in the meantime to have more disk space (there were more than just for this thread) and because I didn't expect an answer anymore. As an evidence of the many test I could post the files I still have (screenshot of the list in the foler) and some few logs of e.g. the audio tests I am talking about in the other thread.

If you tell me how to find older Handbrake-activity logs than the recent ones, I will upload them, so you believe me that I actually really tried "normal" and "deinterlace" and didn't lie. When I close Handbrake the logs are usually gone. (PS: I will have a look in the console log and try to cut out the Handbrake stuff.)

Regarding VHS and DV is different:
I should have been more specific. The source was a VHS tape, I captured and saved as a DV file.
I see that I actually did in post #1
"But I'd like to know, if there is certain stuff I should avoid, when converting DV files that are captured PAL-VHS tapes."
Is it even possible, that a VHS tape is lying digitally on a computer, without being captured to a certain file format?
Filmriss
Enlightened
Posts: 111
Joined: Sun Jun 21, 2015 8:21 pm

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by Filmriss »

Woodstock wrote:Maybe part of the problem is expectations that encoding can improve bad sources... If you're unhappy with the results of a BD source with a CRF of 18, a VHS source starts out with a poorer quality than you appear to want. And it isn't going to get any better.
No, I didn't want to improve the source, I did want to keep the source quality as it is (even though it is bad), because I didn't want to make it even worse quality. I didn't find the point were it breaks. I assume there are no general recommendations for (DV)-captures of VHS tapes, right? (like the Handbrake wiki has them for BD and DVD, where it say people usually like RF20 for DVD and RF22 for BD).
Well, I realize now, that my question was stupid, since there are no general tips for DVD and BD, too, despite the RF20/22 recommendation, which to can differ it seems. I read someone used RF15 for one BD, because it couldn't handle certain scenes with lower RF settings. (The example with RF 15 was "Gran tourino").
Filmriss
Enlightened
Posts: 111
Joined: Sun Jun 21, 2015 8:21 pm

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by Filmriss »

I will upload a log and two files tomorrow to explain my problem.

It might sound a bit confusing, but look, there is this bad DV file (captured from VHS tape), I want to find the point were I still preserve the bad and where I am making it even worse. The artefacts are not the only problem. There is combing from the interlacing I guess, but I am not sure, if there can really be a solution to this. I will create new test samples with another scene than I have posted above. In case I am welcome.
Filmriss
Enlightened
Posts: 111
Joined: Sun Jun 21, 2015 8:21 pm

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by Filmriss »

PS: I just made the samples and then forgot to take the log, before closing Handbrake. My system log does not have the Handbrake log either, other than saying something about "Handbrake color scheme not matching".

I will do it all again tomorrow, encoding the same files again... sigh.
Filmriss
Enlightened
Posts: 111
Joined: Sun Jun 21, 2015 8:21 pm

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by Filmriss »

Here is a part of the movie where one can see artefacts in the face (left cheek from viewer) in the foreground. It is already slightly present in the source file (*DV captured from VHS). The area seems darker, too.

In the beginning of the same part, there is a finger moving, where one can see interlacing lines.

I tried the normal preset and the high preset only altering the speed to "very slow" and adding none, decomb or deinterlacing, but you will see that from the log.

I also tried one file with a crazy RF10, just to have a look, if the artefacts from the source are viewable the same way or worse even at RF10. (nd: so you don't misunderstand me, I know, the file can't get better than the source, but I assume: source=bad, RF10=worse, RF20=much worse. I wanted to see, if RF10 is already much worse, since people usually say there should be no visible difference between source and a value as low as RF10).

https://www.dropbox.com/s/siahx6e3owk5p ... s.zip?dl=0
Filmriss
Enlightened
Posts: 111
Joined: Sun Jun 21, 2015 8:21 pm

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by Filmriss »

PS: it seems when I add deinterlace "slower" to RF20, I get more artefacts than without deinterlacing. (OF course without deinterlacing I have the lines).
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by BradleyS »

This is a fairly difficult source to work with, as VHS often can be. Some artifacts cannot be dealt with easily, like extremely blotchy chroma, wavy distortions throughout the picture, and the fact that VHS is extremely low resolution and most of what we perceive to be fine detail is actually just noise.

All of that said, here are some custom settings I made from you tailored for this source:

Normal preset
RF 18
Decomb Custom 393:2:1:1:2
Denoise NLMeans Custom 2:0.9:3:5:2:0:6:0.9:5:5:2:0

The custom Decomb setting is more sensitive to and uses a different interpolation method to more thoroughly identify and remove all the little jaggies the default may leave behind in difficult sources like this. This is slower than the default.

The Denoise setting uses finer patch sizes with wider search radii to attempt to preserve medium-fine details while repairing the color blotches and tape noise. The result is slightly smooth but preserves more detail than the presets while repairing the most annoying artifacts. This is probably as good as it gets with VHS. NLMeans is of course, slow to process.

The output is about 2.5 Mbit/s compared to ~30 Mbit/s for DV. This equates to a little over one gigabyte per hour of source footage.

These settings should not be harmful on other VHS sources, but of course are tailored for the one provided. Hopefully this helps you out.
Filmriss
Enlightened
Posts: 111
Joined: Sun Jun 21, 2015 8:21 pm

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by Filmriss »

@BradleyS
Thank you very, very much! That looks good. Also Thanks for the explanations, appreciated.

Also Thanks to the others and sorry for annoying.

One last question:
mduell wrote:You asked two questions:
"shouldn't I take high level 5.2 anyway?"
"wouldn't that result in same quality, but lesser bits?"
The answer to both of these questions is no.

There is no* advantage to using a higher level than is necessary for your frame size and framerate. The profile can (and typically does) have an impact on compression efficiency, but the level does not.

* Not strictly true, since the higher levels allow higher peak bitrates, but hardly worth mentioning and has none of the benefits you're looking for.
So compression efficiency does not mean less bits, right?
Filmriss
Enlightened
Posts: 111
Joined: Sun Jun 21, 2015 8:21 pm

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by Filmriss »

PS:

I forgot another question. As one can see on the *ts source, the a 16:9 movie was recorded as 4:3 (with bars) to VHS. Handbrake eliminates these, of course, but I would like to keep the bars, so that it stays a "4:3"-movie and when I watch it on a 16:9 TV I will have a black bar all around. I know it sounds weird, but my aim is to artificially force the picture to a smaller resolution as a result. Why? to keep the resolution smaller and thus not "zoom" the picture that is low quality. In other words it will be as if I would sit a bit farther away from the TV resulting in the eyes being less sensitive to the bad image quality. I know this is wasting bits for dead information.

I made a png picture to show what I mean https://www.dropbox.com/s/hy0lb9xux2o4g ... V.png?dl=0

What values would I have to use in Handbrake in order to create the 4:3 movie (keeping the black bars from the VHS)?
When I use 0,0,0,0 for cropping I get a resolution of 720x540 (is that due to Computer's having square pixels vs rectangle on CRT TV)?)
Anamorphous: none?
modulus: ?

Ah, wait! "Anamorphic loose" and using 576 as height results in a 768x576 video (source 720x576, output 720x576, anamorphic 768x576), I know that 768 is DV, but I don't understand how that goes with a TV and what it means for the picture settings. So, what would be the right picture setting, if I want to get a 4:3 picture without zooming (discarding colour informations on the left and the right) rather than making the 4:3 a 16:9 by cutting the black bars at the bottom and top.
User avatar
BradleyS
Moderator
Posts: 1860
Joined: Thu Aug 09, 2007 12:16 pm

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by BradleyS »

0 crop, leave anamorphic on.
mduell
Veteran User
Posts: 8207
Joined: Sat Apr 21, 2007 8:54 pm

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by mduell »

Filmriss wrote:So compression efficiency does not mean less bits, right?
Less bits or higher quality, depending on your other choices.

But the compression efficiency only comes from the profile, not the level. You were mistakenly claiming the profile and the level impact less bits (compression efficiency).
Filmriss
Enlightened
Posts: 111
Joined: Sun Jun 21, 2015 8:21 pm

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by Filmriss »

BradleyS wrote:0 crop, leave anamorphic on.
loose or strict? Thanks.
Filmriss
Enlightened
Posts: 111
Joined: Sun Jun 21, 2015 8:21 pm

Re: Anyone tips for VHS (DV-file) to h.264 encodes?

Post by Filmriss »

mduell wrote:
Filmriss wrote:So compression efficiency does not mean less bits, right?
Less bits or higher quality, depending on your other choices.

But the compression efficiency only comes from the profile, not the level. You were mistakenly claiming the profile and the level impact less bits (compression efficiency).
Thanks!
Post Reply