Posts: 6,767
Joined: Oct 2008
Reputation:
324
noggin
Posting Freak
Posts: 6,767
2015-12-30, 14:24
(This post was last modified: 2015-12-30, 14:26 by noggin.)
For info - the black bars aren't necessarily there to compensate for overscan per se. They are just there.
Technically lots of SD video can have black bars on the left and right if they have been mastered strictly in accordance to video standards. This is because 720x576 and 720x480 are technically wider than 4:3 or 16:9 aspect ratio video (a result of the 13.5MHz sampling rate that they, and ITU/Rec/CCIR 601 sampled SD video is based on).
Technically SD 576/50i video has an active picture width of 702x576 (not 720x576). The standard allows for video content in the extra 9 samples each side - but they are definitely not required to contain video, and if you are fully compliant, when you down convert 1280x720 or 1920x1080 video to 576i you should scale the 1280x720/1920x1080 to 702x576 (NOT 720x576). Incidentally this is why many DVB SD services encode in 704x576 not 720x576 (704 is the nearest MPEG multiple to 702)
Lots of PC media replay solutions ignore this of course, and when DVD and other SD content is upscaled the 720x576 content is scaled to 1920x1080/1280x720 rather than the 16:9 active area of 702x576 which is what should happen with a compliant solution.
Suspect that black bars top and bottom are there because of a telecine scanning choice to cope with an aspect ratio that isn't quite 16:9. You may also have what are known as 'blanking' errors - which is where there has been a slight timing issue somewhere in the chain - but it's less likely to be around in a digital set-up than an analogue one.
None of this helps with the MKV crop parameters being respected - but AIUI it isn't overscan compensation taking place.
Posts: 8,988
Joined: Feb 2011
Reputation:
428
If cropping information is encoded in the bitstream (e.g. SPS for h.264) then I believe the HW decoder on Pi will discard pixels outside of the crop rectangle and a smaller resolution video will be reported. In theory you can alter the SPS without reencoding the video but I'm not sure which tools support this.
As far as crop regions from the container, then I'm not sure if ffmpeg/kodi parses these. Does this work on any kodi platform?
However if this were parsed and passed through then Pi would support it (we already handle arbitrary source and dest rectangles in the renderer).
Posts: 8,988
Joined: Feb 2011
Reputation:
428
Include a link to a sample file with cropping information and describe what the desired behaviour should be (e.g. should behave like VLC, or whatever player does support this).