View Full Version : Does someone know Handbrake and can have a look (picture quality)?
Moppelkotze
25th March 2016, 16:19
Hello,
I am not good enough at encoding to use real software like Avidemux, so I use Handbrake, but allthough Handbrake is pretty much straight forward, I have a hard time telling, if I reached the optimum balance of compression/file-size vs picture quality.
crf21 at "Normal" (main@4) seems clean, while crf22 seems slightly showing artefacts with main@4. Is there anything else I should do?
It is about HDready-cartoon that uses a certain drawing technique that looks like aquarel. I picked a snipet for you, where you can see a blending from the foreground to the background, while the title is being inserted.
Here is a zip with the source (*ts) and two trys (so you don't have to encode them) https://www.dropbox.com/s/m9pg5fddtl9h3yb/Tests%20Handbrake.zip?dl=0
Thanks.
CarlEdman
27th March 2016, 02:26
This is not a question which can be answered in general. What is universally true is that lower crf will result in larger file-sizes and better image quality and the converse for higher crf. Where the "best" tradeoff occurs will vary depending on source material, display technology, the cost of storage and transmission, and--most importantly--the subjective perception of the viewer.
It appears to be the case that for most people and most materials, the optimum crf is somewhere between 17 and 23. Personally, I default to 19 for high-definition material and 17 for standard definition. But by no means are those universally truths.
Your encode looked ok to me at 21 and 22, but others may have sharper eyes or more time to look for artifacts. The only one that struck me was a certain degree of moirée shimmering in the roof of the house as it blended in. But that was already present in the original clip. This is not, I hope, some sort of interlaced source? If so, that will be the biggest problem in dealing with it.
Apart from that, you are doing well. Handbrake is a good choice for those who cannot spend the many hours necessary to master the intricacies of video encoding. (Perhaps, if it had been better or more easily automated when I started doing this more than a decade ago, I would never have bothered to learn the grubby details.) Do use single-pass crf (multi-pass encoding is an artificate of a bygone time and a mistake for almost all of its users). Be sure to enable to x264 animation tune for material like the above.
Moppelkotze
29th March 2016, 00:30
Thanks for your answer!
May I ask, what was the screen size of your playback device? I have a smaller screen and don't know, if it only looks good, because my screen is smaller than usual.
Yes, I read that it is generally recommended to use the RF values and with RF there is no need for 2-pass anymore (in Handbrake 10 there is no option to use it with crf anymore, anyway.). I didn't know, though that it actually has some sort of "historic" reason, why it is available and that there is actually no use for it anymore.
Regarding "tune: animation", I didn't know and see a real difference (at least in a small snipet that was 30 sec.) and I think I read that it is ok, if one just leaves it to "none". I wasn't sure, if "animation" would do anything for this kind of cartoon (I mean, I guess there are different kinds of cartoons, that it would all have to fit to). Or do you know what it does exactly?
I can see, that the file size differs, anime is the biggest, film a bit smaller and none the smallest. It is not much difference though.
Yes, I have the shimmering, too. MediaInfo says "scanning mode: Progressive". I have to say it is even more visible in other parts of the movie, everytime there is a roof, a fence or something like a pedestrian crossing. Strange, because it doesn't seem to be interlaced.
However, the satelite receiver box is showing 720p via hdmi and PAL 50Hz, but I have it connected to an old Tube TV via SCART and I think, if I remember the manual properly it says the setting is for hdmi.
But I think the PVR inside the sat-box should have nothing to do with the Tube, right? So it will record, what is send by the TV station, which should be progressive in Europe, right?
Hm. I also noticed, that when I cut off comercials with Avidemux (source: *mts, v: copy, a: copy, container: mpeg-ts), the audio is off sync in the resulting file from Avidemux, but the uncut file (from TV) is ok. I will try, if I can change that by delaying the audio in Avidemux first, prior to handing it over to Handbrake.
hello_hello
29th March 2016, 13:51
I'm not sure I can see the artefacts you're seeing in your samples, but I can see the shimmering CarlEdman mentioned. I don't know how it got that way, but if your sample is anything to go by you can probably reduce it. I don't think the video is really 50fps, it's probably at best 25fps with every frame repeated, except for the shimmer effect which changes from frame to frame, even when the picture is static. If you delete every second frame you shouldn't lose anything picture-wise, except for some shimmer. That seems to pretty much eliminate it when the picture's static, but it might make the "wobble" of straight lines stand out a bit more.
And because after deleting every second frame I thought the "wobble" was more prominent, it made me wonder if bob+shimmer was cancelling it out a bit, so I tested the idea (the frames seem to bob up and down very slightly). You won't be able to do this with Handbrake. It'd require a crash course in Avisynth. I used a script that effectively created two new videos from the source, one using the even numbered frames and another using the odd frames, then the first frame from the first new clip is deleted so the two new clips line up, and Avisynth blends them together. It seems to work reasonably well for the sample, but if there's any change in the frame pattern it could end in tears (ghosting effect), and there'll possibly be a blended frame on scene changes. See the very last frame in the sample.
Oh..... and I had to convert the TS file to a lossless AVI and use that as the source (a decoding issue causing blended frames now and then that went away when I used the lossless AVI as the source).
To delete every second frame using Handbrake it's probably just a matter of setting the output to a constant 25fps. You could try enabling the Decomb filter too. It works in variable frame rate mode and I think it should delete frames it considers to be duplicates, but setting the output to a constant 25fps will get Handbrake to replace them again as required. ie I think without decomb Handbrake should just delete every second frame, with decomb the frame deletion "might" discriminate a little better.
There's two samples below. The first one simply has every second frame deleted for 25fps. The second is the frame blended version (via the following script). Hopefully someone can improve on the idea, or come up with a better one.
LoadPlugin("C:\Program Files\MeGUI\tools\lsmash\LSMASHSource.dll")
A=LWLibavVideoSource("D:\test.avi.lwi")
B=A.SelectEven().Trim(1,0)
C=A.SelectOdd()
Overlay(B,C,opacity=0.5)
test1 25fps.mkv (http://s000.tinyupload.com/?file_id=08247780760370801787), test2 25fps blend.mkv (http://s000.tinyupload.com/?file_id=00045420616758741601)
Handbrake must still have a CRF/RF mode. Is it labelled quality these days, or something similar?
Moppelkotze
17th April 2016, 23:01
Thanks for your tips @hello_hello
I am afraid I don't have enough time to study avisynth.
RE: artefacts
You said, you don't see them, I was referring to small blocks that appear, when the trees are faded into the background and the series title is faded into the foreground. Like, if you watch a very low bitrate video on a HD TV. (In the meantime I now find it is actually not really a problem). They are better visible at crf24.
RE: shimmering mentioned by CarlEdman
The content was broadcasted on the channels HD-version and I have also recorded the series on their SD channel, later to that. But for now lets have a look at your sugguestions and the content itself. When I move through the HD-movie (original and encoded version) I see every picture twice: lets look at the i/p/b frames.
I (q) B (q) B (w) B (w) P (x) B (x) B (y) B (y) I (z) - B (z) B (u) B (u) P (a) B (a) B (o) B (o) I (g)
the small letters represent pictures. You see it doesn't matter if i/b/p every picture is apearing twice.
When I encode the 50fps movie "same as source" the result will be a file that will have 48.96 frames. When I encode it "25fps" (i.e. half the actual bitrate as you sugguest), the shimmering is away!. Funny though is, that lines that are vertical or horizontal stop shimmering, an are straight, diagonal lines stop shimmering, but look cut (dotted). See picture, look at the curbstones.
A new problem (picture two):
I said I have this series from their SD channel as well. Now the shock, I didn't know that it had this much combing artefacts. Sometimes it is really terrible! it is 25fps (the is no interlaced label and the Satelite-Receiver was set to progressive).
So I applied decomb, tried deinterlacing and both did away with the combing. But now, when people move through the scene, I get a very sight feeling of, as if I was almost before vomiting.
The combing is already present in the original SD material and there is no frame/picture that is shown twice, in fact two or more stills of a following move are lying over one another. So imagine, you are making a trick-stop movie. You have 10 shots and move the person with every new shot. In the film afterwards you see 5 shots lying over another.
I looked into cartoon-SD material from another channel (the above was sending in 4-5mbps, this one is 1-3mbps), the channel has 1 shot for one still of a moving person. When you go through the movie frame by frame, you see the 2 shots/stills are not very near each other, but when running at real speed it looks like a smooth move. This also has much less shimmering in fences etc., hardly visible.
PS: I mean, I would of course always record in HD, but it is not always possible.
Moppelkotze
18th April 2016, 02:21
I found the tags in mediaInfo now.
for the original files it is:
HD, 50fps, scan type progressive
SD, 25fps, scan type interlaced
This is for every file that comes from the TV as *mts
When I cut off stuff and choose copy and save as *ts or *ps Avidemux will create a interlaced or progressive same as source.
BUT! Everything that is put into Handbrake, no matter, if you check deinterlace or not, it will come out as progressive! I am curious why the combing doesn't disappear after having run through Handbrake and converted to a x.264 file inside a mp4 container (the TV streams come as: a) HD as x.264 in *mts, b) SD mpeg2 in *mts).
Moppelkotze
19th April 2016, 01:52
another observation: when I half the HD version's fps from 50 to 25fps, the shimmering goes away for lines in the movie, but I still have wobbly lines in the intro, where the "camera" zooms in. Also during the whole zoom there are no i-frames, which I think makes sense, I have this PBBB-I-BBBP-BBBP-BBBP-BBBP-BBBP-BBB-I-BBBP-BBB-I.
There are frames where the lines are drawn thicker and some where they are lighter, this makes the whobbling, I guess. If only I could select which frames should be omitted.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.