PMP Mod 1.02 + Network Support

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

optixx00
Posts: 11
Joined: Mon Jul 18, 2005 1:40 am

PMP Mod 1.02 + Network Support

Post by optixx00 »

Added Network Support to PMP Mod so that you can use your PSP as a streaming client. Basically all lowlevel IO calls are mapped to my network enabled io functions. I use a simple python based HTTP Server as backend. This version is in ‘Proof of concept’ state, so don’t expect eye-candy or a userfriendly interface.

http://www.optixx.org/
liquid8d
Posts: 66
Joined: Thu Jun 30, 2005 6:29 am

Post by liquid8d »

nice! like to see this integrated with the M4g3 version... it's a shame we have a whole new version now!! :)

liquid8d
jo2k
Posts: 17
Joined: Sat Jan 21, 2006 4:23 am

Post by jo2k »

this is subzero COOL!

I posted a while ago asking if a ORB client for PSP is possible and no one answered. I know this is far from the idea of a ORB client since PMP itself doesn't play AVI directly but man this is surely exciting news! Thanks for the good work!
optixx00
Posts: 11
Joined: Mon Jul 18, 2005 1:40 am

Post by optixx00 »

hmm, i think it's good idea to add the network code to the M4g3 fork. Just got the sources, will try to integrate the network code this weekend.
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

i don't have wifi hardware to check atm, i'm really curious :)
(i guess i'll buy something in the weekend :)
jvpsp
Posts: 6
Joined: Fri Jan 13, 2006 12:10 am

Post by jvpsp »

VLC (http://www.videolan.org) is an excellent open source media player and streaming server. Has anyone thought of creating a psp client for this?
optixx00
Posts: 11
Joined: Mon Jul 18, 2005 1:40 am

Post by optixx00 »

Related to the ffplay and libavcodec port VLC is really fat c++ project. Don't think it's too easy to do this.
flamingwolf
Posts: 8
Joined: Thu Jan 05, 2006 2:09 pm

Post by flamingwolf »

could ne1 maybe make a compiled version, cuz i=noob when it comes to making stuff in C and C++
optixx00
Posts: 11
Joined: Mon Jul 18, 2005 1:40 am

Post by optixx00 »

A binary makes no sense at the moment because you have to edit some header files to suit to your enviroment. As i said before it's a 'proof of concept' version not dedicated for end users...
optixx00
Posts: 11
Joined: Mon Jul 18, 2005 1:40 am

Post by optixx00 »

Moved my network code to the M4g3 version. Also added configfile support so that you are able to make your WIFI settings via the configfile pmp.ini.

http://www.optixx.org
flamingwolf
Posts: 8
Joined: Thu Jan 05, 2006 2:09 pm

Post by flamingwolf »

koo, was waiting for this. neways, how do i set up wifi for my network that has WPE and how do i up files to stream them?
looptrooper
Posts: 8
Joined: Sun Feb 12, 2006 12:20 pm

Post by looptrooper »

my wifi was already properly configured, i could use pspradio for example. edit pmp.ini and enter the ip of the machine where pmp_server should run to serve the videos. python was already installed on my debian server and i could easily start the server by typing "python pmp_server.py". if i start pmp_mod i can see that there is a connection:

[199.198.197.10] "GET /listdir?path=&size=8191 HTTP/1.1" 200 -

199.198.197.10 is my psp. the ip of the debian machine is 199.198.197.3.

i copied a video to /movies but it doesn´t appear in pmp_mod...any hint for me optixx? do i need to configure something in pmp_server.py?
Gary13579
Posts: 93
Joined: Mon Aug 15, 2005 7:43 am

Post by Gary13579 »

looptrooper wrote:my wifi was already properly configured, i could use pspradio for example. edit pmp.ini and enter the ip of the machine where pmp_server should run to serve the videos. python was already installed on my debian server and i could easily start the server by typing "python pmp_server.py". if i start pmp_mod i can see that there is a connection:

[199.198.197.10] "GET /listdir?path=&size=8191 HTTP/1.1" 200 -

199.198.197.10 is my psp. the ip of the debian machine is 199.198.197.3.

i copied a video to /movies but it doesn´t appear in pmp_mod...any hint for me optixx? do i need to configure something in pmp_server.py?
I've got the same problem as you. I start up the server in the root dir, and I have one .pmp file in there, but it isn't listed on my PSP.
looptrooper
Posts: 8
Joined: Sun Feb 12, 2006 12:20 pm

Post by looptrooper »

i looked at the source code and found a few hardwired paths:

net_io.h:
/* Server URI */
#define NET_IO_URI "http://192.168.1.100:3333"
/* Remote Dir */
#define NET_IO_DIR "/home/david/media/movies/psp/"
...
#define NET_IO_TEST_FILE "net://home/david/media/movies/psp/simpsons.avi"

pmpmod.c:

#define video_directory "ms0:/PSP/VIDEO/"
#define net_directory ""

i don´t know if these paths are in the included binaries, didn´t try them all. i´m setting up cygwin and the toolchain at the moment to compile myself and change these paths. i have to improve my c skills anyway and this is a good start, being able to compile stuff will be great.
flamingwolf
Posts: 8
Joined: Thu Jan 05, 2006 2:09 pm

Post by flamingwolf »

wow, i hope that that is not where it looks, cuz it would be a pain to have to compile that every time. optixx shud make all of those paths in the text file.
looptrooper
Posts: 8
Joined: Sun Feb 12, 2006 12:20 pm

Post by looptrooper »

AMAZING! thank you optixx for this great feature. i dreamed of a network support because my memorystick is only 256mb. THANK YOU!!

for those of you who didn´t get it to work until now: download the latest update from optixx.org and follow the readme - worked for me :)
flamingwolf
Posts: 8
Joined: Thu Jan 05, 2006 2:09 pm

Post by flamingwolf »

NEWS! there is a new version with a readme, but you must compile it to your settings. it also has the server included. i cant wait to learn how to compile so i can use this!
looptrooper
Posts: 8
Joined: Sun Feb 12, 2006 12:20 pm

Post by looptrooper »

if you are stuck compiling the sources you can use the latest binaries from optixx, just use the new pmp_server.py and change the included path to your needs.
flamingwolf
Posts: 8
Joined: Thu Jan 05, 2006 2:09 pm

Post by flamingwolf »

ok, i got it working, somewhat. i got it, it gets to loading, and then theres an error, i need to find a way to get past this. it might work if somone compiles the new version
nabelo
Posts: 1
Joined: Mon Feb 13, 2006 6:56 am

Strange Error ?!

Post by nabelo »

Hi,

i installed pyton for windows and configured everything like it should. The scrips runs well. I can see the .pmp’s on my PC too. (so i guess i configured everything well)
But if i try to play a .pmp the following error occurs : “pmplibopen: can’t read video index”.
In the server window (pc side) the text is as follows : [192.168.0.30] “GET /close?fd=3 HTTP/1.1″ 200 -
Create E:\Movies\domino.pmp net:4 fd:3
[192.168.0.30] “GET /open?filename=domino.pmp&flags=O_RDONLY HTTP/1.1″ 200 -
Read from E:\Movies\domino.pmp 32 bytes net:4 fd:3
[192.168.0.30] “GET /read?fd=4&size=32 HTTP/1.1″ 200 -
Read from E:\Movies\domino.pmp 41 bytes net:4 fd:3
[192.168.0.30] “GET /read?fd=4&size=6108 HTTP/1.1″ 200 -
Close E:\Movies\domino.pmp net:4 fd:3
[192.168.0.30] “GET /close?fd=4 HTTP/1.1″ 200 -

maybe someone have any idea ??

greetz
nabelo
looptrooper
Posts: 8
Joined: Sun Feb 12, 2006 12:20 pm

Post by looptrooper »

users reported problems with python-on-windows, try a linux machine for serving if available.
Fiki
Posts: 2
Joined: Mon Feb 13, 2006 10:21 am

Post by Fiki »

Well after I ran the server in Linux, I was finally able to watch the video on my PSP. I was wondering if anyone encountered a problem with stuttery sound though. When I was looking at the server text, I noticed that the pauses in the sound seemed like they corresponded to GET events, although I could be wrong.

Also, does anyone know how to shutdown the server from the console? I tried CTRL+Z but when I tried to restart the server later, it told me that the port was in use.
cheriff
Regular
Posts: 258
Joined: Wed Jun 23, 2004 5:35 pm
Location: Sydney.au

Post by cheriff »

Fiki wrote:Also, does anyone know how to shutdown the server from the console? I tried CTRL+Z but when I tried to restart the server later, it told me that the port was in use.
CTRL-Z will only suspend the process and return you to the prompt, so the server isnt shutdown, only paused. CTRL-C will shut it down.
Damn, I need a decent signature!
looptrooper
Posts: 8
Joined: Sun Feb 12, 2006 12:20 pm

Post by looptrooper »

i couldn´t get pmps playing without stuttering which are over 400-500kbit. don´t know if its the connection speed which causes this or the psp which is busy decoding the wep encryption. did anyone make a test without wep encryption?
Fiki
Posts: 2
Joined: Mon Feb 13, 2006 10:21 am

Post by Fiki »

Thanks for the info, Cheriff. Well I'll be trying out the player without WEP encyption later and I'll see if it helps with the stuttering. I just wish there was a way to run the server in Windows as dual booting is a pain when I have work to do in Windows. From what I've seen...it's just a HTTP server so perhaps that could be a starting point?

Update: Turning off WEP doesn't really change anything. The stuttering still remains =/
jianyou
Posts: 1
Joined: Tue Feb 07, 2006 5:13 pm

Post by jianyou »

optixx00 wrote:Related to the ffplay and libavcodec port VLC is really fat c++ project. Don't think it's too easy to do this.
I think we could made a special video server to streaming video to PSP. And PSP decoding it realtime.
This we can finishi PSP VOD or PSP TV function.

Do you think so?
optixx00
Posts: 11
Joined: Mon Jul 18, 2005 1:40 am

Post by optixx00 »

I always used WEP , but iam really sitting near to the AP. Around 2 meters. Maybe you should try to get closer to your AP.
looptrooper
Posts: 8
Joined: Sun Feb 12, 2006 12:20 pm

Post by looptrooper »

is there a possibility to test the throughoutput to my psp? my ap is one meter away from my psp and i still can´t get 768kbit .pmp´s to play smoothly.

edit: i used PSP FTPDv0_21 to measure the network throughoutput, i can download from the psp to my pc with stable 567kb/s, but a upload doesn´t exceed 30kb/s. is that normal behaviour? perhaps an incorrect configured network is my problem..
User avatar
LaMa
Posts: 8
Joined: Mon Oct 31, 2005 3:44 am
Location: Amsterdam

Post by LaMa »

This is absolutely a great addition to PMP..

For those who hadn't noticed, Optixx released compiled binaries, a Windows server (fixed python script) which runs perfectly fine on Windows and proper documentation.

Have a look at his blog..
http://www.optixx.org/

Anyone should manage to get it working now.

If your movies are stuttering/skipping frames, your WiFi connection can't handle it, so lower the bitrate.

I tried a… 23fps 480x272 @768kbps Xvid encoded movie with 128kbps MP3 audio… which resulted in constant stutter each few seconds..

Re-encoded to a… 23fps 480x272 @480kbps Xvid encoded movie with 96kbps MP3.. stuttering completely gone and it runs very smooth!

I guess it depends for everyone… people with a very strong WiFi connection who are very close to their AP could increase the bitrate.
Just do it adaptively, step by step, until you find your ceiling.
Mine appears to be 500kbps Xvid video/96kbps MP3 audio.

I'm looking forward to seeing Johny and malloc pick up on this, integrate it into a new build and who knows, maybe improve it even further.

Thanks again for this network code Opixx!
And ofcourse thanks to all other devs involved with PMP (johny, malloc, etc)
ArthurXu
Posts: 1
Joined: Tue Feb 21, 2006 4:34 pm

FILE IO, the main reason of stuttering/skipping frame

Post by ArthurXu »

I just test with two different brand AP. The main problem of PMP is shuttering/skipping frame even I connect my PC with wire cable and PSP work just aside the AP.

I just realize that the main problem should be the FILE IO buffer problem, both server side and PSP side. As we can see that SERVER code are contiunious seek and read. If data that PMP requested is not in the buffer of file IO, that will cause OS to block the read function and try to load the data and usually they will try to read adead.

Also it is easy to test my guess, just put the *.pmp file on RAMDISK, the Server Side FILE IO delay will be smaller that on disk. PMP will work smoothly than before.

also if you look at the log of python output, you can see PMP always try to read more than used, it try to read 128K and actually only need 96K.

It seem like what we need it to modify PMP code to reduct seek and read just as same as it used.
Another need to be modify is server side code, it should buffer data before PSP request it.
Post Reply