Page 2 of 3

Re: expand 4:3 to 16:9

Posted: Mon Feb 04, 2013 7:34 pm
by OlliL
Wow - never saw this Screen-Mode Button on my remote but I'm not using the original remote anyway (using a Logitech). Will try this out this evening and report back what effect this button has :)

Re: expand 4:3 to 16:9

Posted: Mon Feb 04, 2013 8:42 pm
by squadjot
OlliL wrote:Wow - never saw this Screen-Mode Button on my remote but I'm not using the original remote anyway (using a Logitech). Will try this out this evening and report back what effect this button has :)
I bet that's it

Re: expand 4:3 to 16:9

Posted: Mon Feb 04, 2013 9:24 pm
by ExSport
OlliL wrote:I have Matroska files in 1280x720. For those I need "-aspect 4:3" to get them displayed correctly - otherwise I get black bars on top and bottom. I really would like to know why I'm always getting this black bars on the top and bottom when I don't add flags to mencoder :evil:
Something wrong on your side.
1280x720 is exactly in 16:9 format so if MKV is encoded without black bars as usual, you can't see black bars because picture should be full screen.
MEncoder parameters "-vf expand=::::1:16/9:4" in this case does nothing with AR, no vlack bars are added because picture is already 16/9.
If someone has problems with AR and "expand" params, to troubleshoot it better is encode files with mencoder outside UMS (but with UMS params) and then directly stream them via UMS to TV.
I encoded many files when tested MEncoder params and on PC params above created correct 16:9 file. Also on my PS3 and PanTV files played OK including realtime transcoding from UMS.
Maybe there is another parameter which is used and squeeze your picture so it can be avoided by transcoding outside UMS (ums detects non 16:9 AR so it uses "something" but later "expand" adds black bars so AR is 16:9 at output...who knows 8-) ).

Re: expand 4:3 to 16:9

Posted: Tue Feb 05, 2013 9:14 am
by OlliL
The Screen Mode Button does not help. It is set to "WIDE" when I set it to "ZOOM" or "SMART" things from the video are croppted away (SMART crops left and right, ZOOM crops top, bottom, left and right). only WIDE shows me the complete width of the video.

It seems like this finally works now:

Code: Select all

mencoder_decode = -vf expand=::::1:16/9,scale=1283:720 -lavcopts aspect=16/9
a 1280:720 video is now resized to 1283:720 and now my TV displays it fullscreen as 16:9 (nothing is cut away, checked with parallel play on my Laptop)
a 4:3 video gets now black bars left+right and is displayed in full height on my TV with correct aspect (measured with a foot rule)

when I use scale=1282:720 orany lower height down to 1280 I get again black bars on top and bottom - I guess 1283:720 stops the TV from doing some automatic detection of the aspect and it falls back to... whatever.

PS: I tried to use cached folders to speed up listing the contents, but then UMS always choses ffmpeg to display mkv but of course then I get my aspect problems again because they are streamed again as 1280:720 to my TV which breakes the display. My "fix" only works for mencoder.... why should I use ffmpeg instead of mencoder? Better quality? Lower CPU consumption? Is there a setting I can tune for ffmpeg usage regarding to expand + scale? I now disabled caching again and removed database/ to fall-back to mencoder.

Edit: other working scales are: 1276:720 and 1280:721

1276:720 seems to be the best option because 1280:721 and 1283:720 causes a small green bar on top of the black expanding-bars of a 720x304 [SAR 1:1 DAR 45:19] movie

Edit2: Ok, I think I have to use 1282:720 - otherwise to much stuff is cropped on the TV. So I have to live with a green bar on to of my TV for the one 720x304 video I have I guess - or is there something I can do with this green bar?

Re: expand 4:3 to 16:9

Posted: Tue Feb 05, 2013 10:16 am
by OlliL
Hm.... there is one 4:3 movie left which is not displayed correctly... no idea what is special with this movie. It is one out of 2 other movies which are displayed correctly with my final setting (1283:720 scaling).

I'll produce a perfect 16:9 MPEG tomorrow which can be streamed to my Sony without any transcoding. I'll stream it via UMS and via Windows Media Player and then I'll see what the TV displays. If it is not displayed correctly via UMS but via Media Player I'll check for tcpdump on Windows and check if there is any meta data transfered to the TV regarding aspect or whatever.

Re: expand 4:3 to 16:9

Posted: Tue Feb 05, 2013 11:08 am
by squadjot
Hmm. It's still weird i think, i give up =P

Yeah your TV should be in "Wide" mode (16/9), i would naturally say that you would not need to mess with scale or lavcopts

Have you tested with some of the clips here
With the clips i made some "borders" to indicate the very edges of the movie.
On my bRavia, with a 1280x544 movie (pretty common, cinemascope format), with -vf expand, it puts bars top/bottom as expected, but it also crops a bit in the sides. about 2/3 % each side, dunno why. (the red border from my test clips are completely gone)

I would like to know what happens when you test odd formats 720x1280, or 1280x1280.
with just -vf expand like i mentioned earlier, the aspect is correct.. it might crop a few pixels at the edges but not more than i never noticed it before.. until i made the test clips

Re: expand 4:3 to 16:9

Posted: Tue Feb 05, 2013 11:16 am
by squadjot
Yeah, what about putting some vids on USB stick.. see how it likes those?

Re: expand 4:3 to 16:9

Posted: Tue Feb 05, 2013 8:14 pm
by OlliL
Ok,

I made multiple MPEG files of this sizes:

a) 624x352 expanded+scaled to 640x360
b) 1280x720
c) 720x540 expanded to 960x540
d) 720x304 expanded+scaled to 720x405
e) 480x360 expanded to 640x360

So my output format MPEGs are all perfect 16:9 formats. I'll test them this evening via UMS, WMP 12 and from an USB harddisk directly attached to the TV. I'll report back how it works out....

Edit: googling around... this realy seems to be some sort of Sony issue:
- http://forum.serviio.org/viewtopic.php?f=11&t=2956
- http://www.wildmediaserver.com/forum/vi ... ?f=7&t=233
- http://www.ps3mediaserver.org/forum/vie ... 15&t=10044
- http://www.ps3mediaserver.org/forum/vie ... &start=100

Re: expand 4:3 to 16:9

Posted: Wed Feb 06, 2013 5:20 am
by OlliL
Ok,

Windows Media Player plays valid 16:9 perfectly via DLNA. The resolution is of course horrible. But the aspect is perfect!
The same video via UMS is displayed with wrong aspect (but better resolution of course).

The file is a MPEG2 file with a clean 16:9 resolution. So... something must WMP do what UMS does not do - I read that there are DLNA profiles and a DLNA server indicates to the Renderer what profile the file is - maybe this is the difference? I didn't compared TCP/UDP packages what metadata is transfered between UMS and WMP to my Sony.

I can't play the MPEG files from a usb stick for whatever reason but as I heard, USB playback is a different horse and can't be compared to DLNA.

Re: expand 4:3 to 16:9

Posted: Wed Feb 06, 2013 8:14 am
by OlliL
It looks like I found a permanent solution to fix the aspect problem of my Sony Bravia TV without any croping of pixels.

conf:

Code: Select all

#false for not falling back to tsMuxer
mencoder_mux_compatible = false
# :2 is needed for some extrem "short" videos like aspect 2.35:1 which otherwise would create a green bar on the very top of the
# screen the strange scale is needed to avoid some "auto" screen adjustments on the TV which makes all wrong. 1276:720 also
# works but cuts parts of the screen away on the left and right. tested with 4:3, 16:9, 16:10 and 2.35:1 videos
mencoder_decode =  -vf softskip,expand=::::1:16/9:2,scale=1283:720 -lavcopts aspect=16/9
TV Setup:
HOME -> Settings -> Display -> Screen:
- Screen Format: Wide
- Auto Format : Off
- Display Area : +1