Is the "maxref formula" always correct ?

Discuss issues related to PS3 Media Server development (only for programmers)

Is the "maxref formula" always correct ?

Postby thoren » Fri Sep 30, 2011 5:05 pm

Hello all and many thanks for Ps3mediaserver !

We can read there http://manuals.playstation.net/document/en/ps3/current/video/filetypes.html and on others websites that the PS3 can playback at the maximum for H.264 : AVC High@L4.1

To find if a video is "PS3Compatible" and find maximum ReFrames, you use this formula :
int maxref = (int) Math.floor(8388608 / (width * height))
(find there http://ps3mediaserver.googlecode.com/svn-history/trunk/ps3mediaserver/net/pms/dlna/DLNAMediaInfo.java)

But since 2009, the standard tells to use this formula for "L4.1 Profile 1920×1080" :
Floor(32768/(120*68)) = 4 frames
(find there http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC#Decoded_picture_buffering)

Maybe it's a source for "black screen" symptoms with somes .mkv ?
PMS : 1.40 with only TsMuxer engine enabled
OS/Hardware : Linux Ubuntu 10.04 on a "weak" but very useful "MSI Wind U100" netbook !
thoren
 
Posts: 38
Joined: Fri Sep 30, 2011 4:18 pm

Re: Is the "maxref formula" always correct ?

Postby meskibob » Fri Sep 30, 2011 5:40 pm

(8388608) / (1920 * 1080) is the same as
(32768*16^2) / (120*16 * 68*16)
There's nothing wrong with the math, just a different way of doing it (difference between height/width and height/width in Mbs). The "black screen" is due to TSmuxer trying to re-header H.264 MKVs with higher profiles (eg 5.1) into 4.1, but it can't change the reference frames so the PS3 can't process the video if the ref frames is too high. This should be better handled (ie force transcode) now in current versions due to the detection capabilities of MediaInfo.
I provide NO application support via PM or email, so please post your question to the forum per the Forum Rules.
meskibob
Moderator
 
Posts: 4768
Joined: Mon Jan 19, 2009 4:11 pm

Re: Is the "maxref formula" always correct ?

Postby thoren » Fri Sep 30, 2011 6:59 pm

Ok cool !
Thanks for all these precious precisions ! :)
Last edited by thoren on Fri Sep 30, 2011 9:17 pm, edited 1 time in total.
PMS : 1.40 with only TsMuxer engine enabled
OS/Hardware : Linux Ubuntu 10.04 on a "weak" but very useful "MSI Wind U100" netbook !
thoren
 
Posts: 38
Joined: Fri Sep 30, 2011 4:18 pm

Re: Is the "maxref formula" always correct ?

Postby thoren » Fri Sep 30, 2011 9:16 pm

So another thing : I think that these things are missing in your FAQ :
- the previous explanation about the "black screen of death" ;)
- which AVC Profiles AND reframes are "PS3 compatibles".
PMS : 1.40 with only TsMuxer engine enabled
OS/Hardware : Linux Ubuntu 10.04 on a "weak" but very useful "MSI Wind U100" netbook !
thoren
 
Posts: 38
Joined: Fri Sep 30, 2011 4:18 pm

Re: Is the "maxref formula" always correct ?

Postby meskibob » Sun Oct 02, 2011 3:53 pm

Neither of those are applicable to current versions of PMS since it will auto-force a transcode if the # of reference frames is too high. Since that is the default program behavior, I don't think a FAQ post is necessary. If people want to figure out why their video is being transcoded or why they get a black screen if they force TSmuxer, it's easy enough to figure out with some Googling. But that's my $0.02, so if you feel like adding that to the FAQ, go right ahead (please keep the content concise and the formatting inline with the rest of the FAQ).
I provide NO application support via PM or email, so please post your question to the forum per the Forum Rules.
meskibob
Moderator
 
Posts: 4768
Joined: Mon Jan 19, 2009 4:11 pm


Return to Developers

Who is online

Users browsing this forum: No registered users and 0 guests