PMP Mod v2.02 & PMP Mod AVC v1.02

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

Moderators: cheriff, TyRaNiD

Post Reply
scyrax
Posts: 18
Joined: Tue Feb 07, 2006 11:25 am

Post by scyrax »

jonny wrote:ok, welcome to the stuttering club :)
it's a normal behavior of the app. happen when the psp is not able to decode audio/video in realtime.
(the current resolution limit, to have smooth playback, is something slightly more than 480x272, so you must reencode the clip using a lower resolution)
i'll get more speed in the future (i hope :)
Actually we can now already get "UMD quality" 30fps pmp without stuttering.

1.resize filter using AVS` BicubicResize(480,272,-0.8,0) -0.8 was good balance between aliasing and softness(It really looks like UMD`s ...)larger video size resized by PSP could not present sharper image than pre-bicubic-resized 480x272 video.
(if we want more precise result,the third parameter is depending on the resolution&sharpness of the source video)

2.use Xvid in vdm and uncheck B-VOPs, use DXN HT PAL profile,and motion search precision sets to 4.high。

So now it`s rather safe to set bitrate between 0 and 3200kbps.
(main drawback was obviously larger filesize for equal quality)

In fact,pmp mod 2.01 was better than UMD in special case(pure red object in black background).although UMD has a larger chroma infomation,but it just uses point sampling to upsample chroma,so it looks slightly a bit aliasing on red edge though downsized from 720x480 to 480x272(still better than pmp without interpolating chroma)

ps:little off topic.Using vrc_maxrate parameter in mencoder libavocodec mpeg4 leads to direct exit while vrc_minrate is OK.... Anybody know what`s wrong with it???It`s really a pity that libavocodec mpeg4 could not limit maximum bitrate that very high bitrates compel psp to stutter...
fAi_
Posts: 11
Joined: Thu Jan 05, 2006 10:45 am

Post by fAi_ »

for my best result 517x272 resolution on high bitrates without stutter, (23.976 fps, video bitrate 1500kbps, audio CBR 128kbps)
576x304 resolution on 1000kpbs bitrates without stutters.

my video clip result

Silent Hill Trailer
Original Source : 1080i
Resolution: 517x272
Profile @ Level : DXN HT PAL
Encoding type : single pass
Target bitrate : 1500kbps
Lame 44100 Hz. 192kbps CBR,Stereo
http://www.savefile.com/files.php?fid=2147289

Image

Original Source : 1080i
Resolution: 576x304
Profile @ Level : DXN HT PAL
Encoding type : single pass
Target bitrate : 1000kbps
Lame 44100 Hz. 192kbps CBR,Stereo
http://www.savefile.com/files/8679594

Image
FettesBumsen2
Posts: 3
Joined: Mon May 29, 2006 8:13 am

Post by FettesBumsen2 »

fAi_ : what resolution do i need so i dont get that widescreen look on your videos? i want it to cover the whole screen, and id like as good quality as you have, do you know that?
toker#
Posts: 27
Joined: Sat Jan 21, 2006 1:48 am

Post by toker# »

I get stutters from @ 512 x 384 source. The source is the standard 350MB TV EP xvid
avg bitrate 900kbps/s and vbr 128 kbp/s mp3. Heavy scenes cause endless stutters, should i recode and drop the bit rate?

Source
Video: vbr 900 kbp/s @ 512 x 384 Xvid 23.976 fps
Sound: mp3 @ vbr 128 kbp/s

@fAi_
U are using 517 x 272, is that Xvid or DivX?
psp
Posts: 43
Joined: Thu Jun 01, 2006 3:15 am

Post by psp »

just a question

jonny in 2. and 2.01 you imporved the prefomce for playback
In 1.0 we could watch 480/272 movie without lag in 333mhz speed.
in the newst version can we watch a 480/272 video without lags in 222 speed?

can we chance cpu speed in 2.01?
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

in the newst version can we watch a 480/272 video without lags in 222 speed?
no, there is still not enough speed for this
can we chance cpu speed in 2.01?
maybe i'll add this option anyway in the next release
7oby
Posts: 25
Joined: Fri Jun 09, 2006 2:18 am

Post by 7oby »

jonny wrote: the ME will probably always remain for the 1.5 firmware version (i doubt a vfpu path for the idct will be faster)
I'm stuck with FW 2.01+ and as far as I understood the ME part is the only remaining reason, why PMP MOD currently won't run on FW 2.01+.

My questions:

. I assume ME refers to VME (Virtual Mobile Engine). I further assume the VME does the iDCT on 8x8 or 16x16 matrices. Why does the VME code not run or is not accessible on FW 2.01+ [I'm not a PSP coder - therefore don't know].

. My guess would be that using the VFPU for iDCT may be slower than having the CPU do the job. Though VFPU is vectorized, I assume it operates on floating numbers and is therefore still slow. There are some highly optimized iDCT integer algorithms (I quickly checked the XviD source code, which uses those of the JPEG Group), which could be compiled for the time being for the PSP and be used if FW >1.5 detected. Certainly this costs some fps, but at least it would run. And reprogramming the VME also costs cpu cycles as far as I understand.

thanx for proving such a great application jonny!
7oby
therock003
Posts: 96
Joined: Fri Sep 23, 2005 11:09 pm

Post by therock003 »

Hey jonny,most of the xvids i have are with vbr mp3 audio.If i make pmps with the vbr mp3,will the resulted files have synch issues?
kaveman
Posts: 30
Joined: Sun Jan 15, 2006 10:11 pm

Post by kaveman »

I've been making encodes with VBR MP3 (in fact VBR Joint-Stereo which is the optimal format for quality vs size if encoded with LAME) with no sync issues at all - as long as audio length is correct there shouldn't be a problem.
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

I assume ME refers to VME (Virtual Mobile Engine).
the ME is a second cpu (afaik should be near identical to the main cpu)
the VME is only driven by the ME (more infos here: http://forums.ps2dev.org/viewtopic.php?t=3290 )
actually the idct is done with the ME (with normal mips code)
My guess would be that using the VFPU for iDCT may be slower than having the CPU do the job.
Though VFPU is vectorized, I assume it operates on floating numbers and is therefore still slow.
There are some highly optimized iDCT integer algorithms (I quickly checked the XviD source code, which uses those of the JPEG Group), which could be compiled for the time being for the PSP and be used if FW >1.5 detected.
Certainly this costs some fps, but at least it would run.
in the actual code, the idct should have the cost of 0 (it's fully done in background by the ME).
the only penality is the need to prepare/store coefficients for the ME (the original libavcodec code use a fixed memory zone, so it's more cache friendly).
anyway this penality is quite low considering the speed boost this method gives.
this is the reason that make me say a VFPU path will be always slower, compared to the ME.
(anyway this is a dynamic situation, for example optimizing motion compensation routines will change the current equilibrium)
the current code use "simple idct" (it's already an integer idct).
atm i have no big motivations to run on making it fully work on 2.00+ (maybe one of those days i'll strip out the ME code to see if at least it runs on the 2.00+ fw family)


@therock003:
i've already answered to you about this (so, please, take care of what i write next time):

http://forums.ps2dev.org/viewtopic.php?p=39959#39959
given those conditions:

- Fps in the avi header are correct
- Avi and mp3 passed to the muxer are synched

it's impossible to obtain a sync issue with any pmp player/muxer version.
from the player point of view there are no differences between cbr and vbr
therock003
Posts: 96
Joined: Fri Sep 23, 2005 11:09 pm

Post by therock003 »

sorry jonny,you're right i didn't pay attention on that last part.

Kaveman,does autogk support joint stereo vbr encodes?What software do you use for your encodes?
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Post by Raphael »

Is there someone with a 2.0+ firmware who could do some testing for me? I'd like to try out a 2.0+ build, which is atm hell slower (most likely its no fun to watch any video there now) since it doesn't even use the vfpu yet. But I'd like to know if it actually runs on 2.0+ FW.

If you're interested, please PM me.
Ced2911
Posts: 4
Joined: Tue Dec 13, 2005 9:38 pm
Location: France

Post by Ced2911 »

hi
maybe u can use the latest devhook it can emulate firmware like 2.0 and use the fanjita loader
kaveman
Posts: 30
Joined: Sun Jan 15, 2006 10:11 pm

Post by kaveman »

therock003 wrote:sorry jonny,you're right i didn't pay attention on that last part.

Kaveman,does autogk support joint stereo vbr encodes?What software do you use for your encodes?
Not sure about autoGK - I use a mencoder with custom parameters for 2-pass xvid/mp3 encoding - I found the other simpler solutions produced less quality than tweaking the settings on Xvid codec manually.

I can post the settings/options I use if you wish.
User avatar
Raphael
Posts: 646
Joined: Tue Jan 17, 2006 4:54 pm
Location: Germany
Contact:

Post by Raphael »

Ced2911 wrote:hi
maybe u can use the latest devhook it can emulate firmware like 2.0 and use the fanjita loader
Yes that would be possible maybe, but I don't know which other constraints this additional layer puts on the execution, so it may not be the same result as on a real 2.0+.

Any requests for this testing job are still appreciated.
therock003
Posts: 96
Joined: Fri Sep 23, 2005 11:09 pm

Post by therock003 »

kaveman wrote:
therock003 wrote:sorry jonny,you're right i didn't pay attention on that last part.

Kaveman,does autogk support joint stereo vbr encodes?What software do you use for your encodes?
Not sure about autoGK - I use a mencoder with custom parameters for 2-pass xvid/mp3 encoding - I found the other simpler solutions produced less quality than tweaking the settings on Xvid codec manually.

I can post the settings/options I use if you wish.
yes that would be helpful,thank you.
therock003
Posts: 96
Joined: Fri Sep 23, 2005 11:09 pm

Post by therock003 »

jonny wrote: - Avi and mp3 passed to the muxer are synched
What do you mean by this second condition?

Cause i did another conversion.Used autogk for video,then lame for audio and then muxed them and i have synch isues.Thing is that the video doesn't match,cause i used the subtitle mode,and subtitles matched the audio,so that means that the problems is in the video.Here is the muxer log

Code: Select all

D:/pmp/house.s02e21.hdtv.xvid-lol.avi:
Processing video ...


D:/pmp/house.s02e21.hdtv.xvid-lol.mp3:
Processing audio ...
resync_count = 0
unused_bytes = 0 / 27567612
first frame at 0


Interleaving ...


Writing ...


Video / audio1 difference: 0.052 seconds


Status: [ok]
The difference is significant as i can see mouths moving and then the audio comes.

EDIT:I now understand what you mean.You say they have to be synched before muxed,but for some reason they aren't.

IS it possible,that by encoding video and audio seperately causes synch issues,and how can this be fixed so they are synched before i mux them?
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

EDIT:I now understand what you mean.You say they have to be synched before muxed,but for some reason they aren't.
exactly
IS it possible,that by encoding video and audio seperately causes synch issues,and how can this be fixed so they are synched before i mux them?
my advice is to learn a 100% manual method (for example virtualdub+belight).
this don't gives you a guarantee of sync, but at least you'll be able to slightly change av encoding steps until you spot the problem.
sync problems can be generated by a big amount of factors:
- bad source
- buggy audio conversion
- buggy 44100 sample rate conversion
- buggy video conversion (for example recently i've experienced problems using avisynth+ffdshow+xvid source)
- ...
fixing this before muxing can be more difficult (you should cut or add silence at the start, and eventually stretch the audio - if the audio skips at some fixed points can be also more complicated)

btw, have you tryed to search/ask in the gk forum? ( http://forum.doom9.org/forumdisplay.php?f=28 )
(remember that this thread shoudn't be used for general av encoding problems)
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

PMP Mod AVC

This is a special version of PMP Mod. AVC video can be finally used.

A huge thanks goes to magiK (PMF Player author).

magiK have:

- unlocked the avc decoding api
- modified x264 to make the stream fully psp compatible
- followed/helped me with the decoding api

GREAT, GREAT, GREAT WORK magiK!


Some important operative notes:

Compatible streams can be created with x264, here are some commandline examples:
x264 --crf 25 -A all --level 3 --pictiming --aud --no-psnr --thread-input --progress --output out.264 in.avs
x264 --bitrate 512 -A all --level 3 --pictiming --aud --no-psnr --thread-input --progress --output out.264 in.avs

In the muxer you need to specify width, height and fps of the video.
I've patched x264 to write a file with this informations.
If the muxer find this file, informations here will be used instead of the one specified manually (so, in a normal situation, you don't need to specify those infos manually).

Atm max resolution is 480x272 (and width/height divisible by 16).
There is also a reduced set of options, compared to the original PMP Mod (the full set of options will be implemented in succesive releases).

It runs at 222mhz, av decoding is around 67fps! (mp3 decoding is responsible for this "slow" performance :)


http://jonny.leffe.dnsalias.com
TestType
Posts: 23
Joined: Tue Dec 13, 2005 4:04 am
Location: Iceland

Post by TestType »

Awesome, awesome work Jonny and magiK!!
Can't thank you two geniuses enough :)

I'm gonna try this out right now.
PSP: Japanese Firmware 1.0 :: 1gb SanDisk Memory Stick
jockyw2001
Posts: 339
Joined: Thu Sep 29, 2005 4:19 pm

Post by jockyw2001 »

Fantastic work Jonny & MagiK. Congratulations and many thanks.

Have you tested if the psp compatible x264 streams can be played with the dev version of vlc? (see http://developers.videolan.org/x264.html)
If yes, I will integrate it in my upcoming PMP player with vlc client.
scyrax
Posts: 18
Joined: Tue Feb 07, 2006 11:25 am

Post by scyrax »

wow...that`sss definitely a revolution!

ps:does this awesome PMP Mod AVC upsampling chroma info???(offical player does not...)
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

Have you tested if the psp compatible x264 streams can be played with the dev version of vlc?
raw stream plays correctly, seek don't work (but that could be a limitation of vlc with raw streams)

@scyrax:
sadly not (the decoding api also do the color space conversion, so i can't touch chroma)
scyrax
Posts: 18
Joined: Tue Feb 07, 2006 11:25 am

Post by scyrax »

@jonny
Is it possible to decode 720x480 avc in later build??( That would also help to increase chroma info :)
tanweeho
Posts: 20
Joined: Sun Jan 15, 2006 6:40 pm

Now the usability...

Post by tanweeho »

Great work Jonny! Now i am waiting for some kind soul to mod ur AVC Player to bring back the GUI and other usability features that are currently present in ur PMP player....
csuper
Posts: 103
Joined: Tue Jan 03, 2006 6:19 pm

WeeK end atomic news ! new PMPmod AVC !!!

Post by csuper »

Maybe i'm dumb, maybe I'm not...

But I don't quite understand how to encode with x264...
Is there a GUI available somewhere...???
I really want to try you new application jonny ! :))))
222 Mhz sound promising ! have you try with 111 or 166 (i don't know if it is possible...) ???

With a 333 Mhz setting, is higher resolution play properly in your test (I suppose you test it ;) ... ?

A n y w a Y, Alleluia !

csuper.
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

about resolution, everything greater than 480x272 seems to gives trouble (but i've not deeply investigated about this, so more later)

111mhz should be the ideal speed (i've not tested this but should be possible with no problems)

i don't know if one of the existing gui can be adopted for the encoding task
(try to search for "megui")


i can give you a quick, manual tut:

- download/install Avisynth ( http://prdownloads.sourceforge.net/avis ... e?download )
- with notepad, edit a file called "test.avs" with this inside:

# if "avisource" gives you trouble try to use "directshowsource" instead
avisource("c:\yourdir\your_vid.avi")
killaudio
lanczosresize(480, 272)
converttoyv12()

- open "test.avs" with VirtualDub (if there are no mistakes, you should see the video resized)
- create/edit "encode.bat", with this inside:

x264 --bitrate 512 -A all --level 3 --pictiming --aud --no-psnr --thread-input --progress --output test.264 test.avs

- put test.avs, x264 and encode.bat in the same dir
- double clic on encode.bat, encoding should start
- handle audio manually with VDub/BeSweet
- mux
arex
Posts: 23
Joined: Sun Dec 18, 2005 10:58 pm

Post by arex »

jonny, how to use pmp_muxer_avc.exe without the GUI "pmp_muxer_avc_tk"

i tried "pmp_muxer_avc.exe "input.264" "input.mp3" "output.pmp"

but it doesn't work~~ it worked well with the old versions ~
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

try to run it with no parameters, it will gives you some examples
(the normal muxer also support the syntax you'll see)
User avatar
LaMa
Posts: 8
Joined: Mon Oct 31, 2005 3:44 am
Location: Amsterdam

Post by LaMa »

Great work johny/magiK!
I've been following progress and Im very glad x264 is now finally possible :)
I agree on the Mhz, the ideal clock speed would probably be 111 Mhz (=longer battery life, sufficient performence)

Looking forward to updates! :)
Post Reply