Sony Bravia KDL-W5500

Discuss media renderers like Xbox 360, TVs, smartphones, etc.
m2840
Posts: 5
Joined: Tue Nov 01, 2016 3:36 am

Re: Sony Bravia KDL-W5500

Post by m2840 »

squadjot wrote:
m2840 wrote:For those who have a Sony Bravia KDL 40w5500 this is the setting I use in Sony-Bravia5500.conf to pad with ffmpeg:

OverrideFFmpegVideoFilter = scale=iw*sar:ih, pad=max(iw*1.09\\,ih*1.09*(16/9)):ow/(16/9):(ow-iw)/2:(oh-ih)/2

This command does the padding (horizontal or vertical bars) and also compensate the Bravia's overscan.
The factor 1.09 is to compensate overscan by 9% (in width and height).
I am currently using UMS 6.5.1
Funny, as long i keep KeepAspectRatio = true in the config i never have any problems
KeepAspectRatioTranscoding = true and KeepAspectRatio = true are OK for padding correctly.
My suggestion is to compensate Overscan in the particular TV set.
See Sony-Bravia5500.conf file attached
Attachments
Sony-Bravia5500.conf
(1.48 KiB) Downloaded 635 times
User avatar
squadjot
Moderator
Posts: 652
Joined: Fri Jun 01, 2012 4:24 am

Re: Sony Bravia KDL-W5500

Post by squadjot »

Ah, yes you are right about the overscan!

But whèn i try with those settings, some files won't play.

Can you play this file?
https://drive.google.com/file/d/0B1x0rM ... sp=sharing
m2840
Posts: 5
Joined: Tue Nov 01, 2016 3:36 am

Re: Sony Bravia KDL-W5500

Post by m2840 »

Ups! You are right. I have tested only with low definitions.
Fortunately, after some hard work :-) I have a solution:

OverrideFFmpegVideoFilter = scale=(iw*0.91)*sar:(ih*0.91), pad='if(gt(iw,1760)+gt(ih,990), max(iw\\,ih*(16/9)), max(iw*1.09\\,ih*1.09*(16/9)))':ow/(16/9):(ow-iw)/2:(oh-ih)/2

If video width is greater than 1760 OR height greater than 990 no Overscan compensation is done. Otherwise the resolution output would be greater than HD (this was my fault is the previous post). Note that 1760*1.09 = 1918.4 (i.e. aprox. less than 1920) and 990*1.09 = 1079.1 (i.e. aprox. less than 1080). In all other cases Overscan is compensated by 9%.

The initial downscaling by 91% (100-9 %) is necessary for cases where the pad instruction do not compensate for overscan. Without this downscaling the video you submitted works, but the TV overcompensates. With the downscaling we can see the full picture.

I have done several successful tests, using different resolutions and aspect ratios. It remains to be seen if there is any noticeable quality degradation.

**************************************
PS - Eventually the code can be simplified. It appears to me now that the IF structure always executes the second action. If this guess is true, then the following will do the trick.

OverrideFFmpegVideoFilter = scale=(iw*0.91)*sar:(ih*0.91), pad=max(iw*1.09\\,ih*1.09*(16/9)):ow/(16/9):(ow-iw)/2:(oh-ih)/2"

I will test this last code and then post the results.
Last edited by m2840 on Fri Nov 04, 2016 10:48 am, edited 1 time in total.
User avatar
squadjot
Moderator
Posts: 652
Joined: Fri Jun 01, 2012 4:24 am

Re: Sony Bravia KDL-W5500

Post by squadjot »

Hi, i tried, and it's better now, but still.. the file i linked to, and a couple of other files i have, does not play.
If i remove the filter they play fine.

Code: Select all

DEBUG 2016-11-03 23:33:20.803 [New I/O worker #6] Connection error: java.io.IOException: An existing connection was forcibly closed by the remote host
DEBUG 2016-11-03 23:33:20.803 [New I/O worker #6] Premature end, stopping...
DEBUG 2016-11-03 23:33:23.300 [ffmpeg64.exe-3-Cleanup] Stopping process: ffmpeg64.exe-3
DEBUG 2016-11-03 23:33:24.417 [cling-10] TransportState: STOPPED
DEBUG 2016-11-03 23:33:24.417 [cling-10] TransportStatus: ERROR_OCCURRED
Am i right if this is more CPU intensive?, i'm running a low spec CPU server (Atom), and it feels kinda heavier than usual.

Thanks
m2840
Posts: 5
Joined: Tue Nov 01, 2016 3:36 am

Re: Sony Bravia KDL-W5500

Post by m2840 »

Hi squadjot,
I have no problems with the code. But I guess the downscaling must use some CPU.

Are you using KeepAspectRatioTranscoding = true and KeepAspectRatio = true in addition to the filter, or are you testing only with the filter?
It's curious. If I use KeepAspectRatioTranscoding = true and KeepAspectRatio = true (and no filter) I do not get the correct aspect ratio. That was the reason for me to investigate the filter.
m2840
Posts: 5
Joined: Tue Nov 01, 2016 3:36 am

Re: Sony Bravia KDL-W5500

Post by m2840 »

This is my final (let´s hope :-)) post about displaying video on Sony Bravia KDL-40W5500.
Here is the filter:

OverrideFFmpegVideoFilter = scale='if(gt(iw,1760)+gt(ih,990), (iw*0.91)*sar, iw*sar)':'if(gt(iw,1760)+gt(ih,990), (ih*0.91), ih)', pad=max(iw*1.09\\,ih*1.09*(16/9)):ow/(16/9):(ow-iw)/2:(oh-ih)/2

# Correct Aspect Ratio, Pad, and Compensate the Overscan of Bravia 5500 (i.e. show the full image)
# SCALE: this option, with SAR, allows to strech the picture to DAR (important for anamorphic videos)
# If video width is greater than 1760 OR height greater than 990, the video is downscaled by 91%. This is to avoid sizes greater than HD after PAD. Note that 1760*1.09 = 1918.4 (i.e. aprox. less than 1920) and 990*1.09 = 1079.1 (i.e. aprox. less than 1080).
# PAD: Specifies the size of the output with the paddings added. This size is incremented by 9% to compensated Bravia's Overscan
# Output after PAD is 16/9
# Finally, Bravia automatically upscales to 1920x1080
# Works for definitions of 1920x1080 or less. Allows vertical and horizontal black bars. Shows the full image (all the pixels)

Note: the downscale is done only if it is necessary.
Works with movies and also with internet video streaming.
The downscale operation is not CPU intensive. Using the 1920x1080 video supplied by squadjot I get 3% CPU and 4-5% CPU, respectively without and with downscaling (on a Intel i7 4790k CPU with no graphic card).
Tested resolutions: 702x428 (sar = 64:45), 1280x960, 1920x1040, 1920x1080.

See Sony-Bravia5500.conf file attached
Attachments
Sony-Bravia5500.conf
(2.29 KiB) Downloaded 611 times
User avatar
squadjot
Moderator
Posts: 652
Joined: Fri Jun 01, 2012 4:24 am

Re: Sony Bravia KDL-W5500

Post by squadjot »

Hm, the file still does not play, don't know why. I'm using your confing, and it plays if i remove the filter.

I'll try and test some more.
Gilles
Posts: 23
Joined: Fri Aug 05, 2016 6:08 pm

Re: Sony Bravia KDL-W5500

Post by Gilles »

hello,
with UMS V6.5.2 the renderer file "Sony.Bravia.5500.conf" has changed. Before, I was using the one sent with the package updated with the followng lines added at the bottom:

Code: Select all

KeepAspectRatio = true
MaxVideoBitrateMbps = 30
I have attached the conf file that I used. It was working fine.
Sony-Bravia5500.conf
(1.52 KiB) Downloaded 679 times
Would you advise me to add these 2 lines at the bottom of the new renderer fle ?

thanks
Gilles
Gilles
Posts: 23
Joined: Fri Aug 05, 2016 6:08 pm

Re: Sony Bravia KDL-W5500

Post by Gilles »

I have added the 2 lines at the bottom of the profile. I still don"t see the embedded MKV subtitles and the image is stretched. It was working fine before the upgrade.
I will try to downgrade UMS.
Gilles
User avatar
squadjot
Moderator
Posts: 652
Joined: Fri Jun 01, 2012 4:24 am

Re: Sony Bravia KDL-W5500

Post by squadjot »

Have you tried addding both

Code: Select all

KeepAspectRatioTranscoding = true
KeepAspectRatio = true
Regarding embedded susbtitles not showing. Hm, how are your language and subtitles priorities set up?
Post Reply