View Full Version : Is there any way to convert PSP's PMF files to a PC playable format?
Cyber Akuma
21st November 2008, 10:36
This includes with sound, as most methods seem to ignore this step.
PMF files are basically a container format that uses H264 video and AC3 audio.
I tried following some guides that involve using mplayer to demux the files into a video and audio stream then mencoder to put them into an avi, but they are extremely convoluted and do not work:
http://www.psp-hacks.com/forums/f134/guide-convert-pmf-to-avi-t159985/
They required me to seperate the video and audio stream into a raw format (which also made me lose any important data such as framerate).
On some videos it even fails to demux the video and/or audio stream.
I then have to use a psp app to convert the raw AC3 track to Wav IF it worked
And then I have to guess the framerate to try to match it with the original framerate when encoding/muxing it back.
All this is IF mplayer was successful in demuxing both the video and audio in the first place.
A ton of work for an end result that is basically useless because I have no way of recreating the correct framerate. The suggested default of 29.97 was not correct.
This was a few years ago and back then I coudlent find an answer to my problems. I was hopeing now there were better/easier ways to do this by now. Preferably an app designed for working with and demuxing/converting/editing PSP PMF format video. Or perhaps somebody new has an idea I can try.
I am trying to encode the intros to DJ Max 1, DJ Max 2, and Star Ocean First Departure by the way. When using Mplayer, DJ2's video comes out corrupted near the end and it can't extract the audio from Star Ocean's intro, it just gives me a blank file.
I am not sure about Star Ocean, but DJ Max 2's corruption seems to be mplayer's fault since a PMF playback codec I tried to use (which I later uninstalled when I found out it was just a hacked version of the elecard decoder) played it back perfectly.
dat720
21st November 2008, 12:55
If you haven't found a program on PSP site's chances are your not going to get much help here.
PMF is a proprietry Sony format, the only device that uses it is the PSP, i guess the PS3 might aswell, not sure.
Your best bet maybe using some kind of Frame Capture software, shouldnt need a gutsy PC as the PSP vis are all 480x272....
Somone here relased a program for bluray ripping which is a frame grabber... id start there.
derbeDeus
21st November 2008, 14:38
First of all, PMF files are MPEG PS with a header of 0x800.
So for all the tools you want to use on them, remove the first 0x800 bytes. Use a hex editor. You'll see that the following data is: 00 00 01 BA, etc...
Rename the file to *.m2p
Now you have the mux, inside there's a video stream (id 0xE0) of type H264 (mpeg4-avc).
Use BBtools (http://members.cox.net/beyeler/bbmpeg.html)'s bbdemux to extract the video part. Well any good mpeg demuxer will do the job.
bbdmux file.m2p 0xE0 file.h264
The result is an 'elementary' stream, ie. pure video. Some tools may complain that they cannot get the fps from it. Use 29.97 to specify it manually.
You can play the h264 file with mplayer or vlc
The audio part inside the m2p mux is atrac3 (at3) not ac3!!!
If you do bbdmux file.m2p you'll see the streams inside your file. I assume that 0xBD contains the audio part, but then there's a sub-stream id that you need to know to extract it.
Again, look for some good mpeg demuxer to 'explore' the stream.
Cyber Akuma
21st November 2008, 16:26
First of all, PMF files are MPEG PS with a header of 0x800.
So for all the tools you want to use on them, remove the first 0x800 bytes. Use a hex editor. You'll see that the following data is: 00 00 01 BA, etc...
Rename the file to *.m2p
Sorry, I feel like an idiot for asking this, but while I have used Hex Editors before I am still new to them.
How much data is 0x800?
I noticed that after the initial header at 0x0 through 0x7 most of the file from 0x8 through 0x800 was 0s, with a few random values here and there... but the zeroes continued until 0x802, is that normal?
http://i12.photobucket.com/albums/a207/Cyber_Akuma/Forum%20Hosted%20Junk/pmfhex.png
Now you have the mux, inside there's a video stream (id 0xE0) of type H264 (mpeg4-avc).
Use BBtools (http://members.cox.net/beyeler/bbmpeg.html)'s bbdemux to extract the video part. Well any good mpeg demuxer will do the job.
bbdmux file.m2p 0xE0 file.h264
The result is an 'elementary' stream, ie. pure video. Some tools may complain that they cannot get the fps from it. Use 29.97 to specify it manually.
You can play the h264 file with mplayer or vlc
Is there any way I can put this elementary video stream into a container without re-encoding it (and therefore lowering the quality) so I can mux it with the audio?
All the PMF guides I read before made me encode it into uncompressed AVI after I extracted the h264 video stream so I can re-encode it into another format, I do NOT want to do that, since this will result in quality loss after I re-encode it to something that isn't uncompressed.... and I was VERY impressed by the quality of some of these intro videos, I don't want to lower it.
Its already in H264 format so can I put it in a container with framerate and other information so that it would be be playable in any player that can handle H264 media? The quality is already PERFECT and I don't want to re-encode it and lower the quality. I won't be able to lower the filesize this way either since its already pretty small, any of my encoding attempts to try to preserve even decent quality would result in a larger file than the original, and still not the same quality as the original.
The audio part inside the m2p mux is atrac3 (at3) not ac3!!!
Sorry about that, I am always confusing those two.
If you do bbdmux file.m2p you'll see the streams inside your file. I assume that 0xBD contains the audio part, but then there's a sub-stream id that you need to know to extract it.
Again, look for some good mpeg demuxer to 'explore' the stream.
To be perfectly honest, you lost me at this part.
I don't know what a sub-stream is and what you mean about needing to extract it's ID, is this anything like the FourCC code for video codecs? Though I don't know how to work with those codes for audio.
And how would I encode this elementary AT3 audio stream into an uncompressed WAV so I can encode it into a more common audio stream?
What audio format would you recommend I encode it into?
My previous expirence is making Xvid/Mp3 video in AVI format using Virtualdub, I haven't had much expirence with .mp4 video. (I assume mp4 is the "default/most popular/widely used/widely supported" container for H264 video? Well... other than maybe MOV or WMV but those are propitery containers)
While I could of course put h264 video and MP3 audio in an AVI (and have done before) this is a complete mess and hack of the AVI container and some of my media devices would not be able to recognize and play such video.
What audio format should I use to encode the audio stream? And what video editor should I use to mux the audio and video (highly preferably the original H264 stream that has not been re-encoded) into an .mp4 container? Preferably something simple like Virtualdub, I mainly used it to encode video streams and mux video/audio streams together, never really used it for editing.
derbeDeus
24th November 2008, 01:07
I noticed that after the initial header at 0x0 through 0x7 most of the file from 0x8 through 0x800 was 0s, with a few random values here and there... but the zeroes continued until 0x802, is that normal?Yes, that's normal. As I said, you only need to remove the first 0x800, so keep the two bytes of zero from 0x800 to 0x802 :) and the following data.
There are not many choices to mux a h264 track into. You can try muxing into a mkv (use mkv toolkit) or mp4 (use mp4box). So you don't have to re-encode.
For at3, the hard part is to decode it to plain PCM. After that you can try encoding it to mp3 or aac.
So try demuxing the at3 using bbdmux file.m2p 0xBD file.at3 0x00
There will be some extra bytes left from the mpeg mux, but that's another story, I won't go into details. Try decode the file using the PSP app and hopefully that'll do the job.
Cyber Akuma
24th November 2008, 02:25
Yes, that's normal. As I said, you only need to remove the first 0x800, so keep the two bytes of zero from 0x800 to 0x802 :) and the following data.
Great, thanks.
There are not many choices to mux a h264 track into. You can try muxing into a mkv (use mkv toolkit) or mp4 (use mp4box). So you don't have to re-encode.
GREAT! Its VERY good to hear I don't have to re-encode the H264 stream.
I'll choose MP4, but how would I mux this raw/elementary h264 vidoe stream into a mp4 container? And what tools should I use? Pretty sure VirtualDub can't do MP4 or read raw streams.
For at3, the hard part is to decode it to plain PCM. After that you can try encoding it to mp3 or aac.
I have a program on my psp that converts raw at3 streams to wav, not sure if I can still get it to work though.
If not, is there anything you can recommend?
So try demuxing the at3 using bbdmux file.m2p 0xBD file.at3 0x00
There will be some extra bytes left from the mpeg mux, but that's another story, I won't go into details. Try decode the file using the PSP app and hopefully that'll do the job.
I don't understand, whats with the 0xBD part in the command line? How could the audio always start at the same location? Wouldent it have to start after the videostream?
dat720
24th November 2008, 08:19
To mux MP4's you can use mp4box like derbeDeus already said, or you could also use AVIDemux....
Ranguvar
25th November 2008, 18:24
The PSP AT3-to-WAV converter is sadly the only app that works for this that I know of. The AT3 in PMFs is not normal. You could try a PSP emulator, some got to the point that they could run simple homebrew, so you might have a very small chance there. Or someone could port the app to a PC OS... it is quite simple. But of course, that begs the question, why wasn't it designed to run from a PC in the first place? I'm guessing it needs functions in the PSP's firmware... so without a likely difficult effort to reverse-engineer a new decoding solution, one would have to load the PSP's firmware, or part of it, in some way... again, emulator...
The PSP app is indeed finicky on newer firmware... perhaps 1.50? DAX's Time Machine?
I'm at school and don't have remote connection to my home PC yet, as I'm doing LFS right now at home, so no easy way around the school's uber-firewall to peek at the code again. Just speculation.
Anyways, all that is probably why no one's made a good solution yet :P Too hard for minimal benefit. If you have a PSP-2000 or 3000, use the TV-Out. If you have a 1000, use one of the TV-Out hacks.
dat720
26th November 2008, 09:06
Or... Frame Capture software..... as i already said it should not require a powerful PC to capture a Video and Audio at 480x272.....
derbeDeus
26th November 2008, 13:36
Or... Frame Capture software..... as i already said it should not require a powerful PC to capture a Video and Audio at 480x272.....
The Video is not a problem. Only the audio part.
There is a pc codec for atrac3. But PSP tracks are atrac3plus, therefore there's only a psp app to decode that.
I don't understand, whats with the 0xBD part in the command line? How could the audio always start at the same location? Wouldent it have to start after the videostream?
As you see there is no one-click solution for you. So you need to do a bit of research and understand what's going on.
First you need to get familiar with muxes, such as MPEG PS type.
Then you'll know what 0xBD is. Also if you check the help of bbdmux you should figure out that.
In other words, with current tools you can't achieve results without knowing how the streams are muxed togheter in a mpeg file and without a PSP (don't know what firmware you need to run that sw, probably 1.5 or 1.0).
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.