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

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

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
Itaintrite
Posts: 54
Joined: Fri Jul 15, 2005 12:32 pm

Post by Itaintrite »

therock003 wrote:
Itaintrite wrote:
DocMAX wrote:how can i convert an xvid movie .avi file into a .264 file? when i try to convert with x264.exe it says unsupported input format (xvid)
Easiest way would be to use XViD4PSP to convert.
So far it's buggy and it doesn't output files,so we're on the wait for something to be released.
Eh, worked for me. You must be doing something wrong if it doesn't for you.
therock003
Posts: 96
Joined: Fri Sep 23, 2005 11:09 pm

Post by therock003 »

Shonen wrote: Therock003, are you sure you used alcahest's video? Because the SceMpegAVCDecode error occurs when I try to run a transcode of the GameTrailers E3 FFXIII trailer (which seems to have some sort of broken frame in the beginning, it also crashed in the PSP's standard AVC player).
Did the video start and then crash or didn't it start altogether?
Yess i'm sure,it starts,and then after like 5 sec,when a character does a backflip on the train pops the error.
therock003
Posts: 96
Joined: Fri Sep 23, 2005 11:09 pm

Post by therock003 »

Itaintrite wrote:
therock003 wrote:
Itaintrite wrote: Easiest way would be to use XViD4PSP to convert.
So far it's buggy and it doesn't output files,so we're on the wait for something to be released.
Eh, worked for me. You must be doing something wrong if it doesn't for you.
what?Everyone on the xvid4psp topic complains of not getting any files on the output!

How can anyone do something wrong on a 2 click program?You set folders,then settings,add files and click start,nothing wrong with that.

Actually you're the first person to say that the programm worked!
Alcahest
Posts: 135
Joined: Fri Mar 25, 2005 2:08 am

Post by Alcahest »

Shonen, i'll see what i can do. ;)

therock003, are you using a PSP fw 1.50 or 2.0?
Dunno if it could make any difference. I'm on 1.50.
Later,

Alcahest
edit: also, try to redownload the PMP, maybe it got corrupted during transfer.
accepttheownage
Posts: 17
Joined: Sun Jun 18, 2006 6:56 am

Post by accepttheownage »

I keep getting this error when I try to encode a file to x264:

Code: Select all

E:\HDTV Movies\Amityville Horror>x264 --bitrate 1600 -A all --level 3 --pictimin
g --aud --no-psnr --thread-input --progress --output test.264 test.avs
avis [error]: unsupported input format (DIB )
could not open input file 'test.avs'
my avs file:

Code: Select all

avisource("E:\HDTV Movies\Amityville Horror\video.avi") 
killaudio 
lanczosresize(480, 272) 
converttoyv12() 
I have tried everything, even saving the video as an .avi using virtualdub without a codec, resulting in 36gb for just 7 minutes of video, and it still keeps giving me the same error. Any ideas?
accepttheownage
Posts: 17
Joined: Sun Jun 18, 2006 6:56 am

Post by accepttheownage »

Nevermind, fixed the problem.
I made my top line look like this:

Code: Select all

avisource("E:\HDTV Movies\Amityville Horror\video.avi", Audio=False) 
Shonen
Posts: 26
Joined: Fri Jun 16, 2006 8:52 pm

Post by Shonen »

Alcahest, thanks in advance ^_^

therock, what Alcahest suggested (bad download) is very likely. Try downloading the file again. The moment you specify where the video crashes ("jump from the train") isn't a moment I encountered problems at.
cooleyes
Posts: 123
Joined: Thu May 18, 2006 3:30 pm

Post by cooleyes »

@jonny:

I have recompiled a Mencoder with a patched x264 lib, and set
mod->param.i_level_idc = 30;
mod->param.b_pictiming = 1;
mod->param.b_aud = 1;

but when I build a avi with this cmd
mencoder -nosound -ovc x264 -x264encopts 8x8mv=1,4x4mv=1,i4x4=1,no8x8dct=1,bitrate=320,bframes=0 -vf scale=480:272 -o test.avi 1.avi

and mux it to pmp-avc, it can not work;
yoshaw
Posts: 30
Joined: Thu Jan 05, 2006 7:15 am

Post by yoshaw »

jonny wrote: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
Hi Jonny,

long time no see :) Great work with the AVC mod.

I have a question regarding the above tutorial. Is there anyway I can specify a framerate number in the avs file? I downloaded this 1GB MGS4 WMVHD trailer recently from IGN and it has an odd framerate of 29.89fps. Whenever I try muxing the video and audio. It plays fine in the beginning but then audio starts getting delayed as the video moves on. Any suggestions on what can I add to the avs file to change fps to 29.89

One more thing, In the new pmp muxer. There is a videorate box where 25000 is written by default. What is it's purpose and what do I need to change in order to keep my A/V in sync as shown in the pic below? With the above file I was writing 29970 instead of the default 25000. Was that causing the delay?

Image

Also what does videoscale mean with the 1000 figure in it?

Please help explain these things. Very much appreciated. Keep up the good work!
Shonen
Posts: 26
Joined: Fri Jun 16, 2006 8:52 pm

Post by Shonen »

Hi yoshaw,

FPS= rate/scale

Thus, for example, 25 fps (PAL) is 25000/1000=25. 25/1 also works.

29.97 (NTSC) is 8000000/333667=29.97

Etc.

You can calculate this with calculator to get the desired framerate within the muxed pmp file. Normally, the muxer detects the .txt file that is created alongside the 264 stream, and correctly enters the rate/scale ratio itself.
Shonen
Posts: 26
Joined: Fri Jun 16, 2006 8:52 pm

Post by Shonen »

xbox360 wrote:hi ,jonny,what highest bitrate through sony official psp avc decoder api can touch?:)
i have tested the 6000kps ,it works perfectly:D
Since the PSP's AVC api is Main Profile Level 3 (check the PSP's manual, it actually says so under the UMD standard) I think it's 10000 kbps.

More information here:

http://en.wikipedia.org/wiki/H.264

I encountered some quality issues when I tried to encode a largely black-and-white music video (Eri Nobuchika - Voice). I had to raise the kbps to 1500 or use --qp 15. Is this because the Main Profile doesn't support 4:0:0 monochrome?
pegasus21
Posts: 8
Joined: Sun Jun 18, 2006 4:24 am

Post by pegasus21 »

BTW Johnny, could you take a look at the problem of red being left when there's movement cos I realise that the ASP ver of pmpmod by you has that problem too.

You can find it around the last few posts in the subtitle mod of pmpmod thread.

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

Post by jonny »

@cooleyes:
i'll try to make it work the next week

@yoshaw:
we are still here :)


btw, a new avc version is out:

http://jonny.leffe.dnsalias.com

- Added zoom, aspect ratio, luminosity boost.
- Now runs at 120mhz, in the worst situation this should still give 37-40fps (if someone experience stuttering, please contact me).

Battery consumption is around 20% for a 2 hours movie.
Key mapping is slightly different from PMP Mod, the next PMP Mod version will use this mapping too (many thanks to DickyDick1969 for testing this combination).

Keys while playing:

triangle = exit
o = toggle osd

square = pause/play
left/right = rw/ff
x + left/right = faster rw/ff

up/down = change volume
select = cycle audio streams

left/right triggers = change luminosity
start = cycle aspect ratios
x + up/down = zoom up/down
csuper
Posts: 103
Joined: Tue Jan 03, 2006 6:19 pm

Post by csuper »

As usual... :
T H A N K Y O U J O N N Y !!!!!!!!!! :)
I will test that IMEEDIATLY :)

Ps : in a previous post I ask a little question about mp3/aac settings... so what do you think about it ?

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

Post by jonny »

afaik the only accellerated audio dec is for atrac3 (i'll probably never support this format)
aac/different sample rates gives a lot of complications in the player and/or in the muxer (anyway i think at this stage there wouldn't be speed problems in both pmpmod/pmpmodavc)
i prefer to focus efforts in other stuffs first
Shonen
Posts: 26
Joined: Fri Jun 16, 2006 8:52 pm

Post by Shonen »

Ran some tests on 1.01.

Lord of The Rings 1 hour 768/128 kbps clip - ok
Eri Nobuchika - Voice - 4 minute 4000/128 kbps b&w music video - occasional, discrete cracks and pops audible -- no problems in 1.0
Utada Hikaru - Keep Tryin' - CRF22/128 kbps (40 mb, 4 minutes)- many stutters -- no problems in 1.0
Black Cat Episode 3 (anime) CRF20/128 kbps - ok
Alcahest's FFXIII trailer (which is 1500/192 I believe)- ok

So kinda a mixed feeling for me. It seems that everything above 1000 kbps may or may not stutter. In most cases, this bitrate is not necessary, but it's a bummer when you'd like high quality on some harder-to-encode source material (darkness, few colours or greyscale, lots of gradients, fast camera movements) 222mhz enables UMD quality and bitrates, so I guess it's kinda a psychological thing as well. Perhaps 166 mhz would be sort of a sweet spot?

On the plus side, I love the luminosity and zoom features. Thanks for those. Since we're talking features, would a replay function be possible? Would be great if you'd want to loop cool trailers and other short clips a few times.
Last edited by Shonen on Mon Jun 19, 2006 9:00 am, edited 1 time in total.
psp
Posts: 43
Joined: Thu Jun 01, 2006 3:15 am

Post by psp »

Thanks!!!!!!!!!!!!!
scyrax
Posts: 18
Joined: Tue Feb 07, 2006 11:25 am

Post by scyrax »

Actually 120mhz was enough for performance for I`ve tested a 480x272 30fps clip with very complex scene at quantizer=10 and peak bitrate reaches to 17000kbps without stuttering.

but there is another problem with audio:It seem that it usually accompanied by some random noise,similar to a very very short stuttering at about 0.2 sec, especially often after forward/backward.and this noise was performance relative,clip at low bitrate occurs much less than very high bitrate.and for the same clip, I`ve also found that pmp avc 1.0 at 222mhz the noise was less frequent than 1.01 at 120mhz.(you may not hear it while using external speaker,but a sensitive headphone)

PS:
In fact this phenomenon I`ve found does exist in pmp mod 2.01,a clip without stuttering with average bitrate at 3000kbps was also much more frequant than at 1800kbps.(BTW,the audio encoding settings was 192kbps cbr)
Shonen
Posts: 26
Joined: Fri Jun 16, 2006 8:52 pm

Post by Shonen »

Scyrax, what you're describing is exactly what occurs with my encodes as well. Sorry if my description was wrong, the video itself doesn't actually stutter, indeed. It's more of an ultra short "pop" or "crack" that occurs on the audio now and then, and which is only audible when I put in earphones. After a few more views I realized that I was really quite the whining little b***h. Fullscreen AVC is soo sweet, and prolonged time away from the AC cord is mighty fine as well.

I can always start PMP Mod 1.0 for those few ultra-high quality encodes or I can compile a PMP Mod version with jonny's fantastic source code and adjust the clock back to 222/222/111.

And now just to learn how to do it..lol.
arex
Posts: 23
Joined: Sun Dec 18, 2005 10:58 pm

Post by arex »

scyrax wrote:Actually 120mhz was enough for performance for I`ve tested a 480x272 30fps clip with very complex scene at quantizer=10 and peak bitrate reaches to 17000kbps without stuttering.

but there is another problem with audio:It seem that it usually accompanied by some random noise,similar to a very very short stuttering at about 0.2 sec, especially often after forward/backward.and this noise was performance relative,clip at low bitrate occurs much less than very high bitrate.and for the same clip, I`ve also found that pmp avc 1.0 at 222mhz the noise was less frequent than 1.01 at 120mhz.(you may not hear it while using external speaker,but a sensitive headphone)

PS:
In fact this phenomenon I`ve found does exist in pmp mod 2.01,a clip without stuttering with average bitrate at 3000kbps was also much more frequant than at 1800kbps.(BTW,the audio encoding settings was 192kbps cbr)
i just found the same problem~~i encoded steams with some different tools, bus the noise still exist. the encoding settings was 128kbps CBR
k0nan
Posts: 36
Joined: Tue Jan 03, 2006 12:43 pm

Post by k0nan »

Did anyone have any luck on recompiling mencoder.exe with the modified x264 library for compatability with PMP AVC?

I prefer mencoder for encoding on machines which I can't install codecs (needed for AVS scripts/Vdub) or .net framework (xvid4psp) on.
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

about the audio, i'll upload a test version today (i have some ideas about what could be the cause)
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

ok, there is a test version here:

http://jonny.leffe.dnsalias.com/tmp/tests/pmpmod.rar
( too late, link removed :P )

arex, Shonen, scyrax, can you verify and tell me your impressions?
Last edited by jonny on Tue Jun 20, 2006 5:41 pm, edited 1 time in total.
Shonen
Posts: 26
Joined: Fri Jun 16, 2006 8:52 pm

Post by Shonen »

Joy to the world, both culprit videos (Utada Hikaru, Eri Nobuchika) are crackle-free now! What did you do?
scyrax
Posts: 18
Joined: Tue Feb 07, 2006 11:25 am

Post by scyrax »

Yeah,audio was perfect now~ Excellent work jonny :)
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

What did you do?
i've found 2 bugs in the core (i've made 2 wrong assumptions in the thread that output the audio/video frames)
my ears are not much sensitive (the ff trailer helped me, i wasn't able to spot those pops before)
the problem is also present in the standard pmpmod version, since 1.00 (it's probably less noticeable due to the cpu @ 333Mhz)
thanks to all for the detailed description
Shonen
Posts: 26
Joined: Fri Jun 16, 2006 8:52 pm

Post by Shonen »

Well, excellent job, jonny. Thanks for fixing it so quickly.

I've ran 1.01 virtually non-stop from full charge to shutdown and was able to reach about 4 hours. Having said that, I've sometimes run it on the internal speakers on pretty loud volumes, and the battery pack I used is the very first that came with my PSP when I got it back in September 2005. Will test it again tomorrow for confirmation.
Shonen
Posts: 26
Joined: Fri Jun 16, 2006 8:52 pm

Post by Shonen »

Got up to 5:30 hours today.

I was thinking about that replay/loop thing I mentioned earlier. I don't know how to code, but wouldn't be the logic behind it that if the clip ends ("p->semaphore_show_done" in pmp_play.c ?) there would be an "if" paramater stating that "if" a loop command is issued (possibly mapped to the "home" or X + Ltrigger/Rtrigger), the clip would not close ("pmp_play_close(p)" ?) but instead start over at the beginning of the clip? For the interface module, there's a little room left on the right of the GUI, the word "loop" would just fit.

Anyway, just brainstorming. Sorry if I don't make sense.
jonny
Posts: 351
Joined: Thu Sep 22, 2005 5:46 pm
Contact:

Post by jonny »

Got up to 5:30 hours today.
probably depends on many factors
my test was with a 2h movie, 25fps, 128kbps vbr mp3, a moderate volume

about the loop, look here:
(probably no more working in the current code)
http://forums.ps2dev.org/viewtopic.php?p=35576#35576
( before continuing the discussion you should learn/experiment c for at least 6 months :p )
Shonen
Posts: 26
Joined: Fri Jun 16, 2006 8:52 pm

Post by Shonen »

Well, battery life is much better than with XMB or PSPlayerMT (the latter burned through the pack in about 2 hours due to 333mhz).

Well, about the loop, at least I seemed to be thinking in the right direction. Perhaps if I ask for some help of my IT-degree neighbour I could try and figure it out.

What features/fixes are prioritized for you right now?
Post Reply