MPEG2 aspect scaling is much simpler - instead of arbitrary x/y fraction uses one predefined aspect ratios (implemented 4:3, 16:9 and 2.21:1).
If H264 original has one of these ratios, transcoding to high rate MPEG2 may help - but considering computing power needed and video degradation it is really ugly solution. HDMI connected external player do the job much better.
I just discovered something interesting. I have MP4 H264 files (1280x536) 720p files that display just fine on the TV. I think that MP4 H264 are always displayed using 1:1 ar.
I'm using serviio as dlna server and I defined this : for mkv files serviio please remux h264 and ac3 into a mpegts container and it works very well so far. Problem is most of the time mkv picture is streched (for instance 2:21 picture is displayed full screen) but today I was able to watch a mkv movie with the correct aspect ratio. It took me a while to understand what did change. I found that if you play a MP4 file first, then the player keeps in memory the MP4 aspect ratio and then you can then play MPEGTS files using the same aspect ratio.
What do you think about this ? Did you try the MPEGTS H264 combo ?
I'm aware of the strange behavior of WiseLink player for long time. And I also tried to use this 'feature' before I ended up making arfix-sh patch.
AFAIK the player resizing routine works with MPEG2/TS (compression/container) content until MPEG4/MPEG4 video is played. MPEG4 (probably container) leaves something in player variables, what prevents correct resizing of following MPEG2/TS. Correct behavior of scaling can be restored by playing a MPEG/PS file (VOB from DVD).
There is debug output available on service serial line:
Code: Select all
---> info.BitmapParams.Width : 720 ---> info.BitmapParams.Height : 576 ---> info.VideoParams.ScanType : 1 ---> info.VideoParams.FrameRate : 25000 STVID_GetInputWindowMode Error STVID_GetOutputWindowMode Error STVID_SetInputWindowMode Error STVID_SetOutputWindowMode Error Patched SetSize MPEG AR 23, In 720x576, Out 1440x1080-240-0 STVID_SetSize Error [MovieCore_STi] Play Out
Playing H264/TS outputs the same error to debug. Fortunately my records from FullHD DVB-T programs are all in 16:9, so rendering fullscreen is ok. And H264/TS does not break scaling of following MPEG2/TS like the MPEG4/MPEG4 does.
BTW I reported this as a firmware error to local representative of Samsung in January 2009. They replied they resend the report to headquarters. Two newer firmwares was released since then and none of them fixed the issue.
I wasn't clear enough. First I have to say that the movies I play are not anamorphic. I had issues first when I tried to rip my own dvds to h264 and I ended rescalling the pictures to 1024x576 (PAL DVD are 720x576) to get correct aspect ratio. MKVs are built the same. So basically remuxing a MKV to MP4 container displays fine on the TV.
What I see is I can change aspect ratio of my MP4 H264 files using your fix.
This week I discovered the great serviio DLNA server. serviio is able to transcode or remux movies into mpeg or mpegts container. With serviio I remux MKV to MPEGTS/H264/AC3 in real time but unfortunately the movie is displayed full screen (streched, people looks so slim). But If I play first an MP4/H264 file, then I can play remuxed MPEGTS with correct aspect ratio and I can even change the aspect ratio parameters from the menu. So I guess that the H264 decoder isn't initialized fine when playing a MPEGTS/H264. Not surprising as MPEGTS/H264 isn't supported on this TV. So there are variables left when switching from a video format to another. In some situation it breaks the aspect ratio as you said, but in other case (mine) it helps.
Samy should provide us source code of exedsp. This way we could easily enhance the player and even include MKV support. Aren't there GPL license issues with the firmware ? Maybe there is a way to force them to publish the firmware source ? If exeDSP is using a GPL software should be released as GPL also.
Really interesting. I just tried that playing MPEG4/MPEG4 before H264/TS does not help. Can you save my time and upload somewhere your H264/MPEG4 enabler?marcjero wrote:But If I play first an MP4/H264 file, then I can play remuxed MPEGTS with correct aspect ratio and I can even change the aspect ratio parameters from the menu.
It also breaks scaling of MPEG2/TS. This part of firmware is real crap.
Anyway the new finding is promising. I'll try to analyze the problem and let you know.