[MEncoder-users] about cropping & cropdetect
Janos Szamosfalvi
szamosj at yahoo.com
Thu Mar 22 00:50:59 CET 2012
I have a slightly asymmetrical movie (Aristocats) where the black and transitional lines (counted under 50x magnification on screen snapshots) are are located as follows: (the "+ 1" is the transitional line)
Top: none
Right: 3 + 1
Left 5 + 1
Bottom: 2 + 1
when playing the DVD starting at different chapters I got the following:
mplayer dvd://1 -dvd-device k: -vf cropdetect
[CROP] Crop area: X: 4..715 Y: 0..477 (-vf crop=704:464:8:8).% 8 0
[CROP] Crop area: X: 4..715 Y: 0..477 (-vf crop=704:464:8:8).% 8 0
[CROP] Crop area: X: 4..715 Y: 0..477 (-vf crop=704:464:8:8).% 8 0
mplayer dvd://4 -dvd-device k: -vf cropdetect
[CROP] Crop area: X: 0..719 Y: 0..479 (-vf crop=720:480:0:0).26 0
[CROP] Crop area: X: 0..719 Y: 0..479 (-vf crop=720:480:0:0).26 0
[CROP] Crop area: X: 0..719 Y: 0..479 (-vf crop=720:480:0:0).26 0
As far as I can see both will play the same movie, the difference is that when started from Ch1, mplayer first shows a roughly 15 seconds long Walt Disney clip (the white castle on a blue background, etc.) before continuing with the main movie as seen in Ch4, shown in the exact same way, black bars and everything. So why is that mplayer not detecting the black bars in the second case? I can clearly see that they are there.
In addition to not detecting the black bars at all in the second case, there is some issue with the correctness in the first case, even though the recommended crop will get rid of the black and transitional lines.
Based on "[CROP] Crop area: X: 4..715 Y: 0..477" mplayer detected 4 lines on the right side (3 + 1 = 4 -> correct, but only if transitional line is counted); 4 lines on the left side (5 + 1 = 6 -> incorrect, no matter what); and 2 lines at the bottom (2 + 1 = 3 -> correct if the transitional line is not counted).
Looking at some actual screen shots, even though detecting the transitional lines is reasonably easy for a human, I can see that it may be much more difficult to do that in SW, so not detecting transitional lines is no big deal, but the detection was incorrect on the left side, no matter what.
Lastly, at the end of the crop lines I see stuff like: ".% 8 0" or ".26 0".
What do they mean?
That's all for cropdetect.
On to cropping.
I know that the recommended size is a multiple of 16 because that's the size of the macroblock -- how bad would it be if I were to crop to 704:472 or 704:476 instead of 704:464, before scaling, meaning that I would crop out only 8 or 4 lines at the bottom?
Lastly, because that's only 3 lines at the bottom, would it be possible to replace the content in those 3 lines with whatever is on the 4th line, just above them, instead of cropping? Because it would be the same content as above, methinks it would be practically invisible in virtually all, realistic viewing scenarios.
TIA
PS: I'm not sure how attachments would be handled -- I can attach some pictures to show what I have if that can be useful.
More information about the MEncoder-users
mailing list