Page 1 of 3
aspect ratio

Posted:
Wed Mar 23, 2011 8:29 pm
by dave
I've noticed that some videos aren't played with the correct aspect ratio, but are stretched to fill the screen.
Seems to be remuxed h264 files that are affected.
e.g. :
one film (avi/mpeg4 1280x536) plays correctly with a gap at the top & bottom.
Another (mkv/h264 1280x544) is stretched vertically to fill the screen.
The mpeg4 is played natively, the h264 is remuxed to mpegts.
Also, the TV correctly reports the resolution of the mpeg4, but doesn't show the resolution of the h264.
Both films and the remuxed mpegts all play correctly on my computer using mplayer.
I'm using the standard Viera video profile on my G20.
Any ideas?
Re: aspect ratio

Posted:
Thu Mar 24, 2011 7:49 am
by Illico
I still have same problem with Sony Bravia profile, no idea for the moment.
Re: aspect ratio

Posted:
Wed Mar 30, 2011 2:49 pm
by funk
I can confirm that I have the same problem with my Panasonic Veira THP50VT20A Plasma. anything with a wide resolution other than a 16:9 will stretch it to 16:9. eg, 1920x812 mkv with h264 is stretched, and doesn't add black bars on top and bottom, same with 1920x820, 1280x544 etc.. The only files that show correctly with black bars are the ones already encoded with black bars with a 16:9 resolution od 1280x720 and 1920x1080. I wish there was some way to tell Servio to encode these files with black bars.
Re: aspect ratio

Posted:
Wed Mar 30, 2011 2:51 pm
by zip
If you can come up with the proper FFmpeg commands for different files then it can be implemented. I'd be keen to get this right, but don't have any of the affected devices.
Re: aspect ratio

Posted:
Wed Mar 30, 2011 5:06 pm
by funk
Hmm, I don't know how to use ffmpeg.exe, but I researched it & apparently there are these pad commands that you add in.
-vf pad=width:height:x:y:color
For example, to add black bars to a 1920x820 mkv file:
ffmpeg.exe in.mkv -vf pad=1920:1080:0:130:black -aspect 16:9 out.ts
I don't know of the other commands to create an actual m2ts file ready for serviio though. The other problem is how to calculate the top y padding value, which isn't done automatically with ffmpeg, although easily done in my head, If x res = 1920 then (1080- {y res of video})/2, or if x res = 1280 then (720 -{y res of video})/2.
Re: aspect ratio

Posted:
Wed Mar 30, 2011 5:12 pm
by zip
that would work for transcoded files, but it looks ppl are having issues even with remuxed files.
Re: aspect ratio

Posted:
Wed Mar 30, 2011 5:40 pm
by funk
I'm not even sure the remuxing is the issue, it must be the Panasonic television that insists on stretching anything other than 4:3,16:9 content to fullscreen, and the only way round that is to transcode videos that aren't in 16:9 or 4:3 format to preserve aspect ratio.
Re: aspect ratio

Posted:
Wed Mar 30, 2011 6:14 pm
by Berny
Hello,
Well, the problem is that when watching on the TV, the Panasonic info is 4/3 (strechted to fill the screen) though the film is 21/9
No problem with the other media server i'm using.
I definitely prefer Serviio, but the ratio aspect on mp4 has to be solved

Berny
Re: aspect ratio

Posted:
Wed Mar 30, 2011 11:24 pm
by DownUnder
I'm not even sure the remuxing is the issue, it must be the Panasonic television that insists on stretching anything other than 4:3,16:9 content to fullscreen, and the only way round that is to transcode videos that aren't in 16:9 or 4:3 format to preserve aspect ratio.
Avi's play at the correct aspect ratio.
Re: aspect ratio

Posted:
Thu Mar 31, 2011 12:35 am
by joeydfish
same problem here, if video encoding is XVID aspect ratio is always correct be it mkv ,mp4 or avi containers, otherwise panasonic will fill the screen stretch unless aspect ratio is 1280x1080 for my case.
Re: aspect ratio

Posted:
Thu Mar 31, 2011 12:08 pm
by funk
joeydfish wrote:same problem here, if video encoding is XVID aspect ratio is always correct be it mkv ,mp4 or avi containers, otherwise panasonic will fill the screen stretch unless aspect ratio is 1280x1080 for my case.
Hmm, You'd think that then it would play with the correct aspect ratio since both h264/x264 & XVID/DIVX are mpeg 4, just that XVID/DIVX is mpeg4 - part 2, and h264/x264 is mpeg4 - part 10

Re: aspect ratio

Posted:
Thu Mar 31, 2011 2:34 pm
by Berny
Well, it is because xvid/Divx are natives on Viera.
It is a trancoding problem which occurs with h264, mwv and surely some more but i didn't test the others.
I suppose it is a serviio problem as the aspect ratio is OK with some other media servers.
With Servioo:
h264 aspect ratio is 16/9 in any cases
wmv aspect ratio is 4/3 in any cases
Berny
Re: aspect ratio

Posted:
Thu Mar 31, 2011 2:39 pm
by Cerberus
Berny wrote:Well, it is because xvid/Divx are natives on Viera.
It is a trancoding problem which occurs with h264, mwv and surely some more but i didn't test the others.
I suppose it is a serviio problem as the aspect ratio is OK with some other media servers.
With Servioo:
h264 aspect ratio is 16/9 in any cases
wmv aspect ratio is 4/3 in any cases
Berny
That not entirely true, its actualy a renderer problem that the serviio team havent found a work around for yet as i doesnt effect every renderer, just a few renderers have problems.
Re: aspect ratio

Posted:
Thu Mar 31, 2011 3:10 pm
by zip
Just checked the profile. It's not transcoding, only remuxing... so the actual H264 stream is not touched. I don't know it mpegts container has some property saying what is the aspect ratio of the video stream inside it (I doubt that). The only solution I can see is not remux h264 videos but transcode it (with the addition of top/bottom black bars) - but CPU usage will be huge.
Could you run this test?:
1) Open Intel tools AV Media Controller
2) Find the affected video in the tree of the Media Server that gives you correct result
3) Check properties of the file and find a Resource that points to the video (there will be more, at least 1 for thumbnail etc)
4) The resource will include URL, try opening that URL in a browser or VLC player (stream the file from the server)
5) check if the file has black bars in the stream and whether it's mpegts/mpegps or another format
Re: aspect ratio

Posted:
Thu Mar 31, 2011 6:06 pm
by Berny
Well, the file has no bars, ratio is 21/9 .
It is indicated: AVC-MP4-MP-HD-720p-AACS0
Berny.
Re: aspect ratio

Posted:
Thu Mar 31, 2011 6:34 pm
by zip
it looks like mp4 container, not TS. Does VLC say what container it is?
Re: aspect ratio

Posted:
Thu Mar 31, 2011 7:57 pm
by Berny
No, i am sorry.
Re: aspect ratio

Posted:
Thu Mar 31, 2011 11:35 pm
by zip
What DLNA profile does Serviio use for the same file?
Re: aspect ratio

Posted:
Fri Apr 01, 2011 12:13 am
by dave
Thanks for all the input on this problem

Zip, do you want the results of that test on serviio, or on a different server (one that displays correct aspect ratio)?
I wonder if there is some property in the video stream - I wonder if it's relevant that the TV correctly shows the resolution of the mpeg4, but not the h264.
Re: aspect ratio

Posted:
Fri Apr 01, 2011 8:30 am
by zip
the test above on the other server, obviously you can compare with Serviio's output. Basically try to find a difference.