PDA

View Full Version : Demuxing a .pmf (PSP) video file


Cyber Akuma
6th October 2007, 11:56
I have been following the guide here: http://www.psp-hacks.com/forums/viewtopic.php?id=73945&p=1

I was trying to encode the intro from two of my PSP games, DJ Max Portable 1 and 2, into a format I can easily play on my PC.

So far, extracting and encoding the audio in both has not been a problem.

As for the video, using the "mplayer -dumpvideo -dumpfile opening1.264 opening1.pmf" command, I was able to extract the video from the first game as a raw h264 stream just fine, but in the second game's intro a lot of corruption is produced near the end of the file.

As far as I have been able to figure out, this corruption seems to be a bug in a way mplayer extracts the video rather than the file itself. Any application I attempt to encode/play this extracted output in shows the corruption too.

The reason I think it is a bug in mplayer is because a decoder I installed called PMFPlay decoder was able to play both PMF files fine (albet without audio). However, I noticed the elecard MPEG2 decoder logo being displayed in the upper-left corner of the video when this was used, this is usually displayed when using a shareware/unregistered version of the decoder. Whether somehow its using a piece of the elecard MEPG2 decoder left over on my system (my codecs on this thing are really a mess) or its an illegally modified version I do not know, so just to be safe I uninstalled it. Also, since all I was able to do with this was play the pmf files soundless in Media Player Classic I don't see how it could have been any use for me.

Anyway, since the video played fine with PMF decoder but the extracted by mplayer video was corrupted this leads me to believe its a bug in mplayer with that particular file.

So, can anyone think of a way I can try to extract (not convert or encode to a different codec/container) the video data from the second game's intro? Basically, some application that can do the same thing mplayer is doing, but hopefully does not have the same bug?

Thanks

foxyshadis
7th October 2007, 02:04
Is it a recent compile of mplayer, since these sort of bugs are often getting fixed? You can get up-to-the-week ones in the SMplayer package.

Schrade
7th October 2007, 02:25
Elecard's H.264 Decoder is actually MainConcept's I think and that PMF decoder is using a hacked version of it (unregistered of course)

I haven't quite figured out a way to remux the raw video extracted from a .PMF or .MPS file into an mp4 container without getting the glitchies on playback. The only h.264 decoder I've found that can play the raw streams correctly is MainConcept's (Elecard's).

I tried muxing the raw streams into mp4 container and specifying FPS but it doesn't work still.

I can make available some trailers taken from a UMD Video disc if anyone wants to help solve this.

I've found a way to decode the ATRAC3+ audio files into .wav format using a program running on the PSP so once we figure out how to properly mux the h.264 raw stream into an MP4 and have it play back correctly in CoreAVC/VLC/mplayer then we'll be able to rip UMD Videos into .mp4 format and play them however and wherever you want them.

Cyber Akuma
7th October 2007, 06:31
Elecard's H.264 Decoder is actually MainConcept's I think and that PMF decoder is using a hacked version of it (unregistered of course)

I haven't quite figured out a way to remux the raw video extracted from a .PMF or .MPS file into an mp4 container without getting the glitchies on playback. The only h.264 decoder I've found that can play the raw streams correctly is MainConcept's (Elecard's).

I tried muxing the raw streams into mp4 container and specifying FPS but it doesn't work still.

Well, I have had some success putting them into an .avi file (I just prefer AVI...). The problem is since its a RAW stream, it dosent have a set FPS, I have no idea how to calculate the correct FPS and the standards liek 25 or 29.97 are heavily desynced compared to the audio.

See here:
http://forum.doom9.org/showthread.php?t=130590

Although mplayer claimed it found some errors during playback it still worked.

Any way to fix these errors?

I've found a way to decode the ATRAC3+ audio files into .wav format using a program running on the PSP so once we figure out how to properly mux the h.264 raw stream into an MP4 and have it play back correctly in CoreAVC/VLC/mplayer then we'll be able to rip UMD Videos into .mp4 format and play them however and wherever you want them.

Yes I know, the guide I linked talkes about that program and thats what I used to get them into WAV format.

My utlimate goal is to have the h264 video stream directly inserted into an AVI container without re-encoding it, and with the audio at VBR mp3 (again, this is just my personal prefrence).

So far I have almost been completely successful, I jut have two problems:

1. I cannot figure out the correct FPS to use, no matter what I try the audio happens a little bit too soon or too late when I try to compare them to my PSP playing the game's video files.

2. The extracted video in the second game has a lot of glitches near the end.