开发者

jw player size is not appropriate to video resolution

开发者 https://www.devze.com 2023-01-17 07:31 出处:网络
i have a problem in jw player. i set my player height = 225 width = 400. It is exact 16:9 ratio. If i play a开发者_开发技巧ny 400x225 resolution video or exact 16:9 ratio video. i get vertical bars at

i have a problem in jw player. i set my player height = 225 width = 400. It is exact 16:9 ratio. If i play a开发者_开发技巧ny 400x225 resolution video or exact 16:9 ratio video. i get vertical bars at both sides of the player about 5mm each. For ref image is given below. how to overcome this problem. Thanks in advance.

jw player size is not appropriate to video resolution


please add this stretching:"exactfit" in your java script code ,

I had the same issue and after add above line now it is fine.

<script type='text/javascript'>
jwplayer('mediaspace').setup({
'flashplayer': '/path to player.swf',
'file': '/path to video.mp4',
'controlbar': 'bottom',
 stretching:"exactfit",
'width': '600',
'height': '370',
'skin': '.../path to modieus.zip',
'image': '../path to image screenshot'
 });
</script>


you should add around "20px" to the player height , because the player controller (play , pause , timer, ...) will be included with the 225px height ,

so increase the height of the player to 245px


player height and width is unfortunately not equal to video resolution. The video resolution is determined by jw player by reading the video metadata. If the size is not specified there, it defaults to 4:3 aspect ratio, and adds the black bars your seeing. I don't believe adjusting the video player size, as suggested above, will not work to display the video correctly - it just adjusts the frame size. I wish I had an answer for this outside of embedding the size data into the video, but unfortunately do not.


I recently came across this problem. Go to the advanced settings of the JW Player and set the smooth value to true. It should do the trick.


I had the same problem. My solution was this... Keep in mind I am using the JW Embedder. My video player skin is modieus and my videos are 16:9 aspect ratio. My width is 600px. The 16:9 ratio applied here means my height is 338px so this is the dimension you set for your image if wanting a screenshot to fill the player before playing like me. Depending on your player, you need to set a different height to accommodate the controlbar. In my case, the controlbar needed 32px so the height I set in my jwplayer is now 370px.

    <script type='text/javascript'>
    jwplayer('mediaspace').setup({
    'flashplayer': '/path to player.swf',
    'file': '/path to video.mp4',
    'controlbar': 'bottom',
    'width': '600',
    'height': '370',
    'skin': '.../path to modieus.zip',
    'image': '../path to image screenshot'
     });
    </script>


  1. Standard                           Resolution          Aspect Ratio
  2. 480p                                  640×480            4:3 (unscaled)
  3. Rec. 601                            720×480            4:3/16:9
  4. Rec. 601 plus a quarter     800×480            4:3/16:9
  5. Wide 480p                         852×480            16:9 (unscaled)

<script type="text/javascript">
    $(document).ready(function () {
        jwplayer("PlayMP4Video").setup({
            file: "video/kuru_fasulye_reklami.MP4",
            flashplayer: "jwplayer/player.swf",
            width:"800",
            height:"480",
            image: "image/background.jpg"
        });
    });
</script>
0

精彩评论

暂无评论...
验证码 换一张
取 消