Crop video in player to known size or ratio

This thread may refer to an older version of JW Player! Check our articles for the most up-to-date information.
This Q&A thread was imported from our previous system and could apply to an older product.
  • Hi, I have a bunch ...Hi, I have a bunch of FLV files stored on a subtitling site, which only provides 4:3 aspect ratio. Therefore, all of my 16:9 videos have a black bar on the bottom of the video.

    I would like a way to display only the top 16:9 part of the video. I know that there would be wasted bandwidth with the unseen dark region, but this would help me display our video without ruining the site layout (which is designed for 16:9), until we find another way to host the video.

    Is there already a way to do this?

  • You can set the player so that the display is 16:9 and then set the flashvar “stretching=fill”. Now the black borders will be masked off.

    Up Down -1 rated
  • Thank you for your reply! That *almost* works. When using "stretching=fill" I still get a small black border at the bottom of the video and the top of the video is cropped by the same amount. I believe that is because the the stretching occurs from the geometric center of the video, assuming the black borders are equal on the top and bottom. My videos have a black border only on the bottom.

    Is there a way to vertically offset the video in addition to stretching?

    Up Down 0 rated
  • Ouch – vertical offsetting is not possible.

    The only thing you could do there is download the source of the player and move the player > display > media MovieClip a little to the bottom in Flash, so the video is offset. You could create this into a custom skin…

    Up Down 0 rated
  • I tried modifying the source. The video shifts down if I move the player > display MovieClip down, but not if I move player > display > media (it's a 10x10 red square in the upper left, right?). Am I doing something wrong?

    From this experiment I determined that I want to shift down by 22px. The trouble now is that if I move the player > display or the whole player down in the source, then I end up with a 22px white border at the top of the embedded player. I then tried adding -22px margin to the top of that div, which sort of works, but the player insists on overlapping the containing div's border (probably because it was the last item rendered by the browser).

    I'm scratching my head, because I'm no Flash guru. Thanks so much for your help thus far. I really appreciate it.

    Up Down 0 rated
  • Indeed, the video automatically aligns again at the center. And when moving the entire display down, a gap appears at the top.

    The only solution here is to change the code. You could jump into the com/jeroenwijering/player/ file and add a single line. Line 123 and 124 should look like this:
    bc.. obj.addChild(chd);

    You can add one line of code after this which shifts the video down:
    bc.. obj.y +=21;

    Up Down 0 rated
  • That does the trick. The play button is even in the center. Thank you!

    Up Down 0 rated
  • Hello JeroenW,

    What a cool script but i have the same problem. I do not want the controlbar showing but i have also a gab of 2 pixels. Is there a way to make de player.swf compatible so i don't have de 2 pixels?

    Up Down 0 rated
  • how to crop and convert a cinimasope movie video to 4:3 ratio video by croping the width(sides) of the video and to save it

    Up Down 0 rated
  • @nagumotu – We do not have cropping tools.

    Up Down 0 rated
  • Can the picture rotator or the video player be adapted to any width...say up to 8oo pixels wide and 250 pixels tall?

    Up Down 0 rated
  • Nevermind, it's amazing what a little digging and reading will find...duh!!!

    Thanks anyway!

    Up Down 0 rated
  • Yes it can, and glad you got it working.

    Up Down 0 rated
  • Is there a way to display 16:9 video, in 4:3 player. The problem I"m having is the loss of quality if I crop it by rendering it. Is there a way to crop it with the player?


    Up Down 0 rated
  • Set the stretching flashvar to exactfit.

    Up Down 0 rated

This QA is closed.

Still don't have JW Player? Get It Here