Build problem on Windows, H264 profile and more

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

Build problem on Windows, H264 profile and more

Postby Rickwally » Fri Aug 24, 2012 11:28 am

Here I am again, I open another topic because this one seems a better place for the argument.
I'm still unsuccesful with Windows Phone but I will win!
Yesterday after the thousendth crash with wmv profile I decided that I don't want to see it anymore so I downloaded PMS sources, set up the envirorment and added a new MP4H264AAC profile, luckily it didn't involve many changes and at least my phone doesn't crash anymore (still getting an error though).

I found a problem with the build process on Windows that stops the package phase:
At line 1052 of the pom.xml file <phase>prepare-package</phase> should be <phase>package</phase> otherwise it cannot find the jar file cause it hasn't been created yet.

I was wondering also why in RequestV2.java has been added CLoverride != DLNAMediaInfo.TRANS_SIZE in this condition:

Code: Select all
line 787           // Content-Length override has been set, send or omit as appropriate
            if (CLoverride > -1 && CLoverride != DLNAMediaInfo.TRANS_SIZE) {
               // Since PS3 firmware 2.50, it is wiser not to send an arbitrary Content-Length,
               // as the PS3 will display a network error and request the last seconds of the
               // transcoded video. Better to send no Content-Length at all.
               output.setHeader(HttpHeaders.Names.CONTENT_LENGTH, "" + CLoverride);
            }


Doing this causes the ChunkedTransfer's option in the conf file to be completely useless, if the PS3 doesn't want the header should be added to it's configuration file ChunkedTransfer = true and removed the && CLoverride != DLNAMediaInfo.TRANS_SIZE from the condition.

Apart from this I have some questions about the dlna protocol, I think that's the problem with my phone, when it request a file it sends this headers:

Code: Select all
GET /get/0$2$14/prova.mp4 HTTP/1.1
Accept: */*
User-Agent: NSPlayer/07.00.0000.0000 WMFSDK/07.00.0000.0000
GetContentFeatures.DLNA.ORG: 1
Pragma: getIfoFileURI.dlna.org
Host: 192.168.1.3:5001


It requests the content feautures to the server so the problem might be in that specific header in the response. From what I understood serching on the internet and using wireshark is that it is composed by:

DLNA.ORG_PN for the protocol name,
----> I set it to AVC_MP4_MP_SD_AAC_LC in DLNAResource.java for video/mp4 files
DLNA.ORG_OP for the seek options,
----> This shouldn't cause much problems although maybe for me would be better to set it to 00 to be safe
DLNA.ORG_CI 1 if transcoded, 0 if not,
----> Why is it hardcoded in pms?
DLNA.ORG_FLAGS other feautures (don't know which),
----> Why 017? What does it mean? I saw that WMP uses 015

About the TransferMode.DLNA.ORG: header, apart from streaming and interactive, what other values exist and shouldn't it be specified in the response?

And what is Pragma: getIfoFileURI.dlna.org ?? I couldn't find any information about this.

I know, a lot of questions :p but I really want to understand how this works :)
Rickwally
 
Posts: 14
Joined: Mon Aug 20, 2012 11:27 pm

Re: Build problem on Windows, H264 profile and more

Postby chocolateboy » Fri Aug 24, 2012 4:15 pm

The WMV profile is a hack to work around Microsoft's non-compliance with the DLNA spec. If it doesn't work for your phone, the solution is to find out why and fix it, not to add another hack.
chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

Re: Build problem on Windows, H264 profile and more

Postby Rickwally » Sun Aug 26, 2012 12:09 pm

I AM trying to figure out why. But since I have no control over the phone's media player (I can just pass a uri to it) I have to understand what it doesn't like about PMS's answers to its requests.
Everything works fine with Windows Media Player's Media Server so I am trying to understand what are the differences between WMP's answers and PMS's ones.

Why is wmv a hack? It seems to me that the WMV profile doesn't affect in any way the response of the server to requests, adding an MP4 profile just helps me to understand what's going on without crashing the Phone's os.
By the way could you please answer my questions in the first post? Even if unrelated with my problem I'm curious about them. :-)
Rickwally
 
Posts: 14
Joined: Mon Aug 20, 2012 11:27 pm

Re: Build problem on Windows, H264 profile and more

Postby chocolateboy » Sun Aug 26, 2012 7:21 pm

Rickwally wrote:Why is wmv a hack?


chocolateboy wrote:The WMV profile is a hack to work around Microsoft's non-compliance with the DLNA spec.
chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

Re: Build problem on Windows, H264 profile and more

Postby Rickwally » Sun Aug 26, 2012 7:59 pm

I meant: What's the difference between the WMV profile and the default one, how does pms work around Microsoft's non-compliance?
Rickwally
 
Posts: 14
Joined: Mon Aug 20, 2012 11:27 pm

Re: Build problem on Windows, H264 profile and more

Postby chocolateboy » Sun Aug 26, 2012 8:04 pm

chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

Re: Build problem on Windows, H264 profile and more

Postby Rickwally » Sun Aug 26, 2012 9:01 pm

Ok, sorry for the stupid question but I didn't know WMV2 isn't included in the DLNA spec, I was thinking pms was using different headers like Pragma or something like that to communicate with the XBOX.
Rickwally
 
Posts: 14
Joined: Mon Aug 20, 2012 11:27 pm

Re: Build problem on Windows, H264 profile and more

Postby Rickwally » Mon Aug 27, 2012 2:38 am

I think I found something.
I made my app download a transcoded video and save it instead of trying to reproduce it, then copy-pasting the mencoder command found in PMS's Traces tab I converted the same video on the pc.
Here is the comparision between the two versions of the file, on top there is the one from the phone, on the left is the start of the file and on the right the end.

Image

In red you can see the differencies, in particular at the end of the file it's appended the beginning of it and after that a lot of 0 values.
What can be causing this? It happens just for transcoded files, no matter what profile is selected :-|
Rickwally
 
Posts: 14
Joined: Mon Aug 20, 2012 11:27 pm

Re: Build problem on Windows, H264 profile and more

Postby chocolateboy » Mon Aug 27, 2012 3:30 am

Download this video (via) and create a good (working) and bad (non-working) version of it; upload them to a file sharing site and post the link along with a debug.log showing the MEncoder command when serving the bad video.
chocolateboy
Project Member
 
Posts: 2580
Joined: Wed Sep 16, 2009 10:05 am

Re: Build problem on Windows, H264 profile and more

Postby Rickwally » Mon Aug 27, 2012 1:16 pm

Here is the zip

I put also the .conf file in it, test_phone is the bad version and test_pc the good one encoded with the same command on the pc.
Rickwally
 
Posts: 14
Joined: Mon Aug 20, 2012 11:27 pm

Next

Return to Developers

Who is online

Users browsing this forum: Google [Bot] and 3 guests