Feature Enhancement request - crop video filter controls


Your Nick Toons case is an interesting one, because it’s not even a true letterbox. They’ve added the logo into the letterbox area.

How does your regular cable box or TV deal with this case? I assume it displays the same way as Channels, until you click the zoom button and then part of the logo is cut off?


I’d really like to understand how this works with your regular TV/cable box.

Also if you can send me a 1 minute recording from the nick toons channel to [email protected] that would be helpful.


I did some tests on my SD cable channels, and the results are pretty mixed.

Some channels have simple letterboxing of 16x9 content:

Some letterbox, but put their logo in the letterbox area:

Sometimes a postage stamp is built-in, because they took original 4x3 content and pillarboxed it for the HD channel, then take that and letterbox it again for the SD version:

Some channels put their logo in the letterbox, but overlap it partially with the content:

Worse, they’ll even show other content overlapped along with the logo:

It’s almost impossible to deal with all these cases automatically. Even as a human I’m not sure what the proper crop for each of these situations should be.

The problem is that the cable company is broadcasting video with black bars added. They expect that the video will be displayed with the bars, and that’s why they’ve started putting other stuff in that area.

Interestingly enough, the SCTE (society of cable tech engineers) even came up with a broadcast standard that transmits BAR DATA, specifying exactly which areas of the picture are black bars. Unfortunately, no one actually uses it.


I’ve never understood why this is such an issue in the US. Surely not that many people still have 4:3 TVs or don’t have a STB that converts a 16:9 picture properly. In the UK, 16:9 is the standard on SD channels, with automatic switching to 4:3 for older programmes…’fake’ letterbox or pillarbox bars are never added to the video itself.


Hi @tmm1

Glad to see you looking into. I haven’t used this wrapper in quite a while as it was always a hack solution. Currently I am using plex with their post processor option. I am going to link you my plex post processing script as it may have solutions to many of the technical challenges you are facing.

You are right however it is not easy because many channels do things differently. I approach it based on shows and or incoming formats that I know need cropping by default. This is why I said there would have to be many options and override capabilities per recording.

The ffmpeg filters are very useful because you can do a lot of transformations without using your own mathematics to calculate things. You can see many examples in the code.


Thanks for sharing. I guess post-processing the video file to fix it is the best solution, since then everything else just works as expected. Unfortunately the amount of work required to special case channels and even specific shows is more than I would expect most users are interested in investing.

My plan going forward for Channels is to (1) fix the generated preview thumbnails using an approach like this, and (2) add a Zoom feature to the iOS/tvOS player so you can crop letterbox during playback easily.

This won’t help with web/roku playback, but that’s a whole other project especially since we use hardware transcoding which makes it much more complicated to do both cropdetection and to crop.


zoom would probably satisfy most users, seen that in other competitor apps and works fine. You should remember zoom settings per channel so people dont have to keep pushing that zoom button.

I gave you a fix for screenshot here:


Yea we will definitely remember zoom settings per channel.

Your screenshot fix is based on resolution/sar only which doesn’t work for some of my channels which actually broadcast 4:3 natively without any letterbox included. This we need to use cropdetect, but that currently requires multiple invocations. The patch I wrote for ffmpeg will allow cropdetect+crop in a single go.


it doesn’t do any cropping. It just creates a correctly scaled 640 by X image for any incoming source. Your native 4:3 image will still create a correct screenshot. I never modified my wrapper to look at incoming source and crop the screenshot to correct size. If it was scaled properly I was happy. Skewed/streched images bother me.


Ah you’re right. That’s an easy fix then.


I know this is reviving an older thread, but was this ever implemented? The only options I see with regards to zooming is a stretch to fit feature, which does not help with the situation in regards to SD cable content. I’m in the same boat as others in that not all channels in my lineup contain HD equivalents (BBC in particular).