encoding problem - ipod high rez
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.
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.
encoding problem - ipod high rez
Hi, love the new handbrake but i've noticed that on shot changes it sometimes blocks up for a frame or too.
ie.. long shot of guy stood there (fine)
cut to close up and the first frame or two of that shot is blocky.
All i'm doing is hitting the ipod high rez setting and encoding.
Any ideas what's happening?
ie.. long shot of guy stood there (fine)
cut to close up and the first frame or two of that shot is blocky.
All i'm doing is hitting the ipod high rez setting and encoding.
Any ideas what's happening?
I believe this is related to key frame intervals. If yu look on the advanced tab in the text box at the bottom you will see a string like this - keyint=300:keyint-min=30. which tells the encoder how often to put in a key frame. if you reduce the keyint number the blocky scene changes go away. I like to set mine in multiples of the frame rate of the video and a key frame every second. For progressive material I use keyint=24:keyint-min=24 and for ntsc video I use keyint=30:keyint-min=30. These settings work very well for me with 64% constant quality encodes. I am in no way an authority on this stuff so everybody feel free to correct me if I'm way off base.
Hope it helps
Hope it helps
Ya I noticed that it doesn't always work. Changing the keyframe intervals made it go away on a rip of the Davinci code but I've noticed that it doesn't always do the job. I'm beginning to suspect that the encoder is the one at fault here not Handbrake. I did some experimenting with the scenecut parameter and this also seems to have some effect on the blocky scene changes. I read in another forum about a bug in specific build of x264 that was causing scene change detection to not function properly when threading is being used. I'm assuming that the use of threading is what sped up handbrake so much for this release so maybe there's a connection there.
What it boils down to is that I'm not sure how to fix it but I'm 99% sure that keyframes not being inserted at scene changes is the cause of this problem.
By the way, what model of mac are you using? I'm seeing this problem with a 2.66 Mac Pro. Maybe the number of cores used by the encoder has some effect on this? The blockiness that I'm seeing at scene changes is pretty severe. I can't imagine that this forum wouldn't be full of posts like this if everyone is getting the same results that I am.
What it boils down to is that I'm not sure how to fix it but I'm 99% sure that keyframes not being inserted at scene changes is the cause of this problem.
By the way, what model of mac are you using? I'm seeing this problem with a 2.66 Mac Pro. Maybe the number of cores used by the encoder has some effect on this? The blockiness that I'm seeing at scene changes is pretty severe. I can't imagine that this forum wouldn't be full of posts like this if everyone is getting the same results that I am.
Hi there.. yeh it feels like a bug in the encoder but there must be some freaky circumstances to meet for it to show itself cos its just you and me talking about it. I have a 2ghx core2duo macbook (black) so maybe the threading is the issue? allthough i've encoded some dvds and its been fine? im working mostly with pal.
Right now i've gone back to 82b which is probably technically less quality but at least i know things wont block up - its awful when it happens and makes me want to cry
Right now i've gone back to 82b which is probably technically less quality but at least i know things wont block up - its awful when it happens and makes me want to cry
Nope, HandBrake uses a version of x264 from after that bug was fixed.ToxycM wrote:I read in another forum about a bug in specific build of x264 that was causing scene change detection to not function properly when threading is being used. I'm assuming that the use of threading is what sped up handbrake so much for this release so maybe there's a connection there.
I saw that in the x264 changelog. The bug was fixed at r623 or so but I've done some more testing and the problem is related to threading. I compiled from svn with the thread count hard coded to 2 instead of cpu_count * 3/2 and the problem goes away. The original formula would yield a thread count of 6 for my mac pro so I'll keep bumping up from 2 until the problem reappears and post here again with the results.
just add ':threads=2' (be sure to include the colon) to the end of the text in the text box on the advanced tab. If that doesn't fix it then try :threads=1. You'll know when you get it right because the encoding will slow down considerably.
I'm interested to know if it fixes the problem on your machine too. I encoded a 2.5 hour movie last night and couldn't find even one bad scene change. it almost doubles the encode time but it does clear up the problem.
They may have fixed a threading bug in x264 but it seems like there is still something wrong with it
I'm interested to know if it fixes the problem on your machine too. I encoded a 2.5 hour movie last night and couldn't find even one bad scene change. it almost doubles the encode time but it does clear up the problem.
They may have fixed a threading bug in x264 but it seems like there is still something wrong with it
Hi there, you were right. I did three test encodes on a chapter at the end of the 8mile dvd., one on the ipod high preset, one with x2 threads and one with x1 threads.
The preset one was very blocky for 2 frames on a couple of scene changes.
The x2 thread was less block but it was still there.
The x1 thread was perfect
The preset one was very blocky for 2 frames on a couple of scene changes.
The x2 thread was less block but it was still there.
The x1 thread was perfect
Glad I could help. Wouldn't want something silly to mess up such a great piece of software. The fact that cmbmovies had to go down to 1 thread is kind of interesting to me though. On my mac pro 2 threads comes out perfectly. I wonder if it's coincidence that the number of threads needed to be <= the the number of physical CPUs in the machines. Of course, it would take quite a few more test cases to know for sure, but it might be related. In any case it appears to be an x264 problem and not specific to handbrake so I'll see if I can figure out how to let that development crew know about it too.
Hi, i haven't thought about this issue for a long time. I upgraded to the new handbrake round about the time leopard came out and have only recently started to encode movies again.
I was on a train yesterday watching hairspray on my iPhone and i notice this issue is back - or perhaps it never went away and i just assumed the updated handbrake version fixed it? Oddly, it doesnt do it on anything i have to de-interlace, ie music videos and tv sourced stuff. But if i rip a movie from dvd it seems to happen without fail. I presume switching to one thread encoding will fix things again. I'll try it when i get home tonight and let you know.
Did the new handbrake fix things for anyone else?
I was on a train yesterday watching hairspray on my iPhone and i notice this issue is back - or perhaps it never went away and i just assumed the updated handbrake version fixed it? Oddly, it doesnt do it on anything i have to de-interlace, ie music videos and tv sourced stuff. But if i rip a movie from dvd it seems to happen without fail. I presume switching to one thread encoding will fix things again. I'll try it when i get home tonight and let you know.
Did the new handbrake fix things for anyone else?
I did some tests last night and found the amount of 'blockage' on scene changes various depending on the amount of cropping applied. So ripping chapter 1 of 'Hairspray' 3 times I found that:
iPood High Preset, auto cropping:
Blockage on first frame or two after a scene change
iPod High Preset, no cropping:
much better. I thought there was none at all until i compared it too...
iPod High Preset modified to encode with 1xThread with any cropping:
Peferct, with a cleaner and sharper encode on every scene change. I found with the others even when it was good it took a few frames for digital noise to kinda 'sette down'. With this setting there was no settling down period.
So, i don't know why this happens but its 1x Thread encoding for me... and long waits it seems.
iPood High Preset, auto cropping:
Blockage on first frame or two after a scene change
iPod High Preset, no cropping:
much better. I thought there was none at all until i compared it too...
iPod High Preset modified to encode with 1xThread with any cropping:
Peferct, with a cleaner and sharper encode on every scene change. I found with the others even when it was good it took a few frames for digital noise to kinda 'sette down'. With this setting there was no settling down period.
So, i don't know why this happens but its 1x Thread encoding for me... and long waits it seems.