PMP Mod 1.02 + Network Support
PMP Mod 1.02 + Network Support
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/
http://www.optixx.org/
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?
-
- Posts: 8
- Joined: Thu Jan 05, 2006 2:09 pm
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
http://www.optixx.org
-
- Posts: 8
- Joined: Thu Jan 05, 2006 2:09 pm
-
- Posts: 8
- Joined: Sun Feb 12, 2006 12:20 pm
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?
[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 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?
-
- Posts: 8
- Joined: Sun Feb 12, 2006 12:20 pm
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.
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.
-
- Posts: 8
- Joined: Thu Jan 05, 2006 2:09 pm
-
- Posts: 8
- Joined: Sun Feb 12, 2006 12:20 pm
-
- Posts: 8
- Joined: Thu Jan 05, 2006 2:09 pm
-
- Posts: 8
- Joined: Sun Feb 12, 2006 12:20 pm
-
- Posts: 8
- Joined: Thu Jan 05, 2006 2:09 pm
Strange Error ?!
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
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
-
- Posts: 8
- Joined: Sun Feb 12, 2006 12:20 pm
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.
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.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.
Damn, I need a decent signature!
-
- Posts: 8
- Joined: Sun Feb 12, 2006 12:20 pm
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 =/
Update: Turning off WEP doesn't really change anything. The stuttering still remains =/
-
- Posts: 8
- Joined: Sun Feb 12, 2006 12:20 pm
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..
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..
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)
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)
FILE IO, the main reason of stuttering/skipping frame
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.
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.