Creating PMF movie clips

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

Moderators: cheriff, TyRaNiD

Post Reply
glitchbit
Posts: 11
Joined: Sat Jun 25, 2005 5:24 am

Creating PMF movie clips

Post by glitchbit »

I've already made this post over at psphacker.com but the users there aren't much into figuring things themselves out evidently but here is the info I have and DrEggman has already done this obviously but is not willing to tell us how (yet) and he has posted here saying he made some custom ones amazingly no one in that thread even asked how he did it.....(but it has been asked and he wouldn't say how, to make it short)

Basicly this is what ICON1.PMF is

**to put it simply, find the encoder that can do this \/ **

ICON1.PMF
Graphic size: 144x80 pixels(ICON) max 480x272(gameboot.pmf)
Image/movie format: Configured as IDR-Picture or P-Picture, encoded in AVC only
MPEG-4 Part 10 AVC
macroblock size of 16x16 pixels
file format is based on the MPEG-2 program stream
The header of the PSMF dictates multiplexing.
(Main profile level 3 (max. bit rate 4.8Mbps)) (some say level 2.1 but most evidently say 3)
File size: Max. 500 kilobytes(ICON)(Gameboot?), including background music file

here are the known encoders to myself

Encoders

- x264: opensource (GPL) encoder (Source), available as VFW codec: x264vfw or ffdshow (output .avi), as commandline: x264cli (outputs .mp4 and raw) or mencoder (outputs raw and .avi) (Doom9's MeGUI) and inside the Handbrake tool (Linux, MacOS and BeOS)
supports 2pass, CABAC, Loop, multiple B-Frames, B-References, multiple Reference Frames, 4x4 P-Frame and 8x8 B-Frame Blocksizes
- NeroDigital AVC: useable in Nero Recode2, outputs .mp4
ND AVC supports 2pass, CABAC, (adaptive) Loop, multiple B-Frames, mulitple Reference Frames, weighted prediction, 8x8 P-Frame Blocksizes, 16x16 B-Frame Blocksizes, Adaptive Quant. (Psy High)
- MainConcept: available as a free unlimited encoder app. (adds a watermark), outputs .264 and .mpg PS/TS
1pass (CBR/VBR/fixed Quants), P-Frame Reordering, CABAC, Loop, Multiple B-Frames, Multiple Ref, 4x4 P-Frame Sizes, PAR and RDO
- Sorenson: useable in Sorenson Squeeze 4, outputs .mp4,
Sorenson supports 2pass, max 2 B-Frames, B-References, Loop and multiple Slices
- Moonlight: useable in Moonlight's OneClick Compressor and CyberLink's PowerEncoder, outputs .mpg
Moonlight supports 1pass (VBR/CBR/Fixed Quants), CABAC, Loop, 2 B-Frames, 8x8 P-Frame Sizes, Adapt. Quant, PAR, Interlacing
- Apple: useable in Quicktime 7, outputs .mp4 and .mov
Apple supports 2pass, max 1 B-frame, Adapt. Quant, multiple Slices, but no CABAC, no Loop and no Weighted Prediction
- JM: The AVC Reference Software offers in Version 9.3 already Main and High Profile: B/SP-Frames, CABAC, Loop Filter, 4x4 Blocksizes, multiple Reference Frames, Adaptive Quant, Error Resilience, RDO, Lossless Coding, Custom Quants, Rate Control aso...
- Hdot264: opensource (GPL) VFW version of the reference software by doom9 member charact3r, still based on a very old version of the reference (JM 4.0c)
- mpegable: offered for some time a free VFW Encoder (not based on the reference), doesnt handle YV12
mpegable supports 1pass (fixed quants) uses P-Frames only, 8x8 P-Frame Blocksizes, CAVLC only, Loop
- VSS: free preview VFW Encoder (limited to 5 days), based on the reference encoder
- Envivio: useable in 4Coder, outputs .mp4

one of these has to be able to replicate all of those requirements, which one I do not know. Dr.Eggman is very good at what he does but with the amount of work it takes and mainly just the freakin long time it takes there is no way he wrote a custom encoder. Awhile back he wrote a guide explaining how to create mp4 files with nero recoder 2 so maybe that is a place to explore we know he uses that program at least.

If we can figure this out the intro should be a snap, same format just larger scale then we can have someone over at ps2dev to write us up a flasher. I was going to keep the info I have found so far to myself but things move faster when we are all working on the same page don't they and I have been able to get the psp to play a garbled up .pmf file in an eboot.pbp(wrong encoder obviously).

sources
http://www.pspvideo9.com/forums/viewtopic.php?t=415
http://64.233.179.104/search?q=cach...ICON1.PMF&hl=en

I will add more later but those are the two most relevant.
Last edited by glitchbit on Sat Jun 25, 2005 11:36 am, edited 1 time in total.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

Nice work. I'm moving this into the PSP Software discussion because it seems like a better fit there.
glitchbit
Posts: 11
Joined: Sat Jun 25, 2005 5:24 am

Post by glitchbit »

here is four additional posts I had made rolled up into one at the bottom is a pmf file I made but it is garbled and doesn't play right but it does not crash the pmf player(if it does you just restart your psp)

http://www.pspvideo9.com/PSMF/ICON1.PMF

you can dump it and convert it to avi easy enough using mplayer

for info visit page 3 at

http://www.pspvideo9.com/forums/viewtopic.php?t=415

their discussion is pretty helpful



These videos are relatively small in size 100kb-200kb but it can go to 500kb at max

I suggest download something like HDD Hex Editor 2.3-2.9 (3 is glitchy) or even better WinHex but it is not free and view ridge racer then view others or/and compare it to your own. I had to highlight copy and paste my psmf0014(or psmf0012) header file into my compile h.264 file, but regardless there are still areas that didn't match up with repeating tags that starting with @M or M@ I don't remember but it may have to do with the multiplexing?

It would seem to me Dr.Eggman is using some type of AVC h.264 encoder and has a program that patches the psmf0012 headers in there(none of them seem to match exactly dead on, so it rules out hex editing, which i need to swap out the headers to make sure that the small differences don't have any impact on the working pmf videos, I supose otherwise my previous efforts were for nothing)

Hope this may help someone out there. And Dr.Eggman if you would like to drop us some hints please do so we can get to the fun part =)




ok I have had some semi-success in getting particular parts of my encoded clips to match up if you compare the beginning and ending of Dr.Eggman files to the ones I just created.(they now both start out with ºD followed by a lot of y's at the beginning and more y's at the end)(actually DrEggmans had C's with two lines in it where my y's are)

But there are some characters in between that repeat themselves 6-12 times that mine does not have, so I know I am step closer.(for some reason it makes me think the reason why @M is repeated is due to the type of "multi"plexing?).

**CORRECTION** it is M@ and it is repeated a good number of times like it should be but I am having serious compression issues, if I can figure out what is causing it to balloon and get it back to normal I'd say there is a good chance this is it! I will have to insert the PSMF0014 header manually but that is the least of my worries.

my file size went from 130kb to like 3mb so there is something seriously wrong with the mainconcept encoder or I just missed something in the settings.

**UPDATE I brought down the bit rate and got the file size to 251kb I will now insert the psmf0014 header and I will post back with the results >)

**UPDATE -.- apparently the psp does not even attempt to read it....for reasons unknown to me at this time......atleast with my first attempt it showed me a garbled up image and now it just won't try it at all. I will look into this further.




I have used Mainconcept, moonlight and x264 encoders.

Mainconcept has a lot of configurbility and appears to have a similar file structure by looking at it in a hex editor, not a perfect match though by any means and no matter what combination I tried it stayed basicly the same.

moonlight very limited, there is no way it could do it

x264 open source and appears to be very capable much like mainconcept, haven't got to mess with its settings as much and so far the file structure appears to differ even more from psmf than mainconcept but I won't rule it out yet. It appears to have more configurebility.

Also the x264 while appears as a garbled image when you try and play it in an eboot file, it does not crash the psmf player all together, it can still play good pmf files but the one I did with mainconcepts is garbled the same way but crashes the psmf player until I restart the psp, even though its file structure is more similar. This may not mean anything but worth noting.

here is an attachment *This is the garbled up movie I made, I take no responsibility for what it may or may not do to your psp, mine has survived just fine though*

http://www.psphacker.com/forum/attachme ... mentid=427
pspvideo9
Posts: 19
Joined: Tue Mar 15, 2005 12:32 pm

Post by pspvideo9 »

Hi glitchbit,
It's nice to see that other people are interested in seeing user created pmf's as we are. I'm a bit unsure why you didn't post this in our PSP Video 9 forums since most video-savvy people hang around there. As seen by those postings.

> DrEggman has already done this obviously but is not willing to tell us how
At present there is only ONE way to create PMFs and that is by using the Sony-built encoder included with the Official PSP SDK. Use of this without an authorized license and/or distribution of it, is ILLEGAL.

> one of these has to be able to replicate all of those requirements
None of these encoders will create a valid PMF file themselves. While video with audio is pretty much impossible, you may be able to create a video-only PMF file.

The steps would be something like this:
- Encode an H.264 video with one of those various encoders.
- Strip the video stream from the resulting MP4 file (container).
- Multiplex the H.264 video stream into a MPEG-2 Program Stream.
- Add the 2048 byte PSMF header to the beginning of the MPEG-2 PS.

Now whether the H.264 video would even playback on the PSP is another question as you can read through that PSP Video 9 thread, Sony's implementation uses a number of advanced features that currently cannot be found in some commercial/opensource H.264 implementations.

> then we can have someone over at ps2dev to write us up a flasher
This program is actually already built, its just useless without being able to make your own PMFs.
glitchbit
Posts: 11
Joined: Sat Jun 25, 2005 5:24 am

Post by glitchbit »

thanks it will definitly get me back on the right track, and when I said all those requirements I just meant the type of file not the header info it needs to play. And I did probably a half baked job of stripping the beginning container with my hex editor, and inserted the 2048 byte header in there with it, I should have dumped it like you suggest then multiplex with mpeg-2 program stream.

And I did notice you psp video 9 forums(where do you think I got some of my info ;) ) and yea I probably should have posted everything I gathered there for help.

But does anyone know if DrEggman has access to the officail psp sdk? The leaked one is just full of libraries and contains one file about psmf called libmpeg.h which isn't very helpful for the actual encoding.(or atleast the is how it seemed to me)

So what programs are there that can multiplex h.264 and mpeg2 program stream? I have been using mainconcepts and its multiplexing for my h.264 is actually already mpeg-2 program stream I believe.
glitchbit
Posts: 11
Joined: Sat Jun 25, 2005 5:24 am

Post by glitchbit »

Does anyone know what IGN's ICON1.PMF is? did IGN the website make their own short video or somethin? I can't figure out what the people are referring to when they say IGN o0
glitchbit
Posts: 11
Joined: Sat Jun 25, 2005 5:24 am

Post by glitchbit »

This is interesting

Code: Select all

00 00 01 ba 44 00 05 3d 1d 11 01 86 a3 f8 00 00    ...ºD..=...†£ø..
01 bb 00 0c 80 c3 51 80 f0 7f b9 e0 13 bd e0 08    .»..€ÃQ€ð¹à.½à.
00 00 01 bf 00 fe 01 e0 00 00 00 00 00 00 00 01    ...¿.þ.à........
00 00 00 00 00 ee 00 3b 00 80 01 70 00 80 01 be    .....î.;.€.p.€.¾
00 80 02 8c 00 80 02 e3 00 80 02 79 00 80 03 d1    .€.Œ.€.ã.€.y.€.Ñ
00 80 02 54 00 80 02 9e 00 80 03 57 00 80 02 e5    .€.T.€.ž.€.W.€.å
00 80 03 62 00 80 00 29 00 80 05 22 00 80 03 91    .€.b.€.).€.".€.‘
00 80 00 3f 00 80 00 99 00 80 00 a7 00 80 00 30    .€.?.€.™.€.§.€.0
00 80 00 28 00 80 00 28 00 80 00 26 00 80 01 96    .€.(.€.(.€.&.€.–
00 80 00 a0 00 80 00 c5 00 80 00 98 00 80 01 c2    .€. .€.Å.€.˜.€.Â
00 80 00 f0 00 80 01 51 00 80 02 e2 00 80 02 de    .€.ð.€.Q.€.â.€.Þ
00 80 01 e9 00 80 03 07 00 80 03 1a 00 80 03 88    .€.é.€...€...€.ˆ
00 80 02 5c 00 80 00 48 00 80 03 c9 00 80 02 86    .€.\.€.H.€.É.€.†
00 80 00 f2 00 80 00 db 00 80 00 32 00 80 00 a4    .€.ò.€.Û.€.2.€.¤
00 80 00 a2 00 80 00 25 00 80 00 37 00 80 00 26    .€.¢.€.%.€.7.€.&
00 80 00 27 00 80 00 2d 00 80 00 23 00 80 01 17    .€.'.€.-.€.#.€..
00 80 00 23 00 80 00 27 00 80 01 06 00 80 00 7e    .€.#.€.'.€...€.~
00 80 00 9d 00 80 01 2a 00 80 00 b1 00 80 00 de    .€.�.€.*.€.±.€.Þ
00 00 00 cc 00 00 01 e0 06 d6 81 c1 0d 31 00 05    ...Ì...à.Ö�Á.1..
bf 21 11 00 05 a7 ab 1e 60 13 00 00 00 01 09 10    ¿!...§«.`.......
I placed that right after the 2048 byte psmf0014 header and it causes the psp to attempt to play my file unsuccessfully. I do not know what it would do if I placed a mp4 file after it.
jimparis
Posts: 1145
Joined: Fri Jun 10, 2005 4:21 am
Location: Boston

Post by jimparis »

glitchbit wrote:This is interesting
That's just the start of an MPEG-2 program stream. As pspvideo9 said, you need to now
pspvideo9 wrote:Multiplex the H.264 video stream into a MPEG-2 Program Stream.
Just appending an mp4 in a container format to a partial MPEG-2 PS won't do any good.
glitchbit
Posts: 11
Joined: Sat Jun 25, 2005 5:24 am

Post by glitchbit »

Degree D tells the psp how playback multiple sections of each clip, without it you get nothing.

Ok I figured out something pretty big the characters ºD with following info much like the post above contain the data required to playback sections of the pmf files. That is why all of my encoded clips do not work, because there is what I would call a mini header before each repeating m@ characters and ºD info differs slightly each time. M@ info header appears multiple times and means the mpeg type is h.264 Main (opose to Baseline).


I don't think there is anything else I can do unless someone knows how to build an algorithym that compares each M@ mini header info in encoded h.264 files to build each ºD mini header before it.

**EDIT**
you made your post while I was typing the above....hmm well my clips do have an mpeg2 program stream in them but it looks like sony is using a different type of mpeg2 program stream?
glitchbit
Posts: 11
Joined: Sat Jun 25, 2005 5:24 am

Post by glitchbit »

I give up unless something else comes to my attention. Also DrEggman made his custom pmf's before the leaked psp sdk and even with the leaked psp sdk it really doesn't contain anything useful and definitly no encoder. It does cover psmf though but it just appears to be functions on how to get your psmf file to play within a game or program, but until someone *cough*(DrEggman) tells us how it does us no good.(Unless he is using the sdk that was not leaked)

and like jimparis said that tid bit of code above most definitly is the mpeg-2 program stream, I just changed it to elementry and transport streams and it changes it completely. Whatever sony is doing to this format it seems their mpeg-2 program stream is not normal and contains the key to pmf playback.
Chrighton
Posts: 58
Joined: Wed Jun 15, 2005 8:24 pm

Post by Chrighton »

glitchbit wrote:I give up unless something else comes to my attention. Also DrEggman made his custom pmf's before the leaked psp sdk and even with the leaked psp sdk it really doesn't contain anything useful and definitly no encoder. It does cover psmf though but it just appears to be functions on how to get your psmf file to play within a game or program, but until someone *cough*(DrEggman) tells us how it does us no good.(Unless he is using the sdk that was not leaked)
DrEggman is an artist for SCEA and thus has access to tools - it's in his best interest to not be forthcoming *g*
glitchbit
Posts: 11
Joined: Sat Jun 25, 2005 5:24 am

Post by glitchbit »

Chrighton wrote:
glitchbit wrote:I give up unless something else comes to my attention. Also DrEggman made his custom pmf's before the leaked psp sdk and even with the leaked psp sdk it really doesn't contain anything useful and definitly no encoder. It does cover psmf though but it just appears to be functions on how to get your psmf file to play within a game or program, but until someone *cough*(DrEggman) tells us how it does us no good.(Unless he is using the sdk that was not leaked)
DrEggman is an artist for SCEA and thus has access to tools - it's in his best interest to not be forthcoming *g*
now someone tells me......thats something a google search won't tell you about dreggman...................well atleast I can sleep tonight knowing that currently there is no way of doing this until someone spends the time to write a new encoder or someone leaks sony's.

one thing that still bugs me though is the fact that only his pmf files could not be dumped but any other officail pmf I could successfully, maybe sony fixed something in their more recent encoder to hide their format better.......
User avatar
taconinjas
Posts: 10
Joined: Tue Jun 21, 2005 4:25 pm

Post by taconinjas »

i hope someone figures this out. i have the gameboot.pmf read/write program...... just no .pmf's.
placasoft
Posts: 53
Joined: Mon Mar 28, 2005 10:53 am

Post by placasoft »

can you send me the program?
Post Reply