FINAL FANTASY XIII

FINAL FANTASY XIII

View Stats:
Lulech93 Dec 11, 2017 @ 8:43pm
I have successfully converted PS3 cutscenes to PC!
Seems a bit late at this point, but better late than never, right? To my knowledge no one else has managed to get PS3 cutscenes for FFXIII running in the PC version--which, honestly, is a bit surprising, now that I've figured out how it's done for myself.

As everyone probably knows, the PC version of FFXIII ships with cutscenes of lower quality than the PS3 release, which uses the lowest compression of any edition of the game. Also as everyone probably knows, you can't just drop the PS3 cutscene files into the PC version of the game and expect them to work.

At first glance, this can be a bit puzzling, considering the format appears to be the same. For example, the opening intro is named "z000_us.win32.wmp" on PC and "z000_us.ps3.wmp" on PS3. Just change "ps3" to "win32" and it should be the same, right?

Well, no, actually, they're not the same at all. A quick hex edit will reveal that the PC cutscenes are secretly encoded as Bink 2 videos, while the PS3 cutscenes are secretly (what I believe is) a proprietary Sony container called PAM. The video portion of these PAM files is essentially your standard MPEG, but audio is encoded in ATRAC. This we can determine by the "KB2i" (Bink 2) and "PAMF0041" (PAM) in the headers for each file.

For example: https://i.imgur.com/hFY5oiN.png

Now, even though both of these are known formats, try any media player you like and it'll most likely fail to read them. This is because Square Enix has added a 16-byte header of their own identifying the video as a WMP file even though, in this case, the WMP format is completely fictional. On the PC, simply removing these first 16 bytes is all it takes for the video to be recognized by RAD Video Tools as a Bink 2 video. Since the PS3 version is essentially a fake format within a fake format, you have to go a bit further and delete the first 800 bytes instead, leaving just an MPEG file behind.

Now, at this point either file should play back in media players like MPC or VLC just fine. But to get the PS3 cutscenes into the PC version of the game, we need to convert them to Bink video, and RAD Video Tools doesn't seem to like hex edited PS3 cutscenes as they are. Plus, extracting the audio from the PS3 cutscenes is a bit harder, and so by default the video will be silent. Yet another problem is that the PC version of the game has cutscenes stored at 1280x736 (why?) and the PS3 version at 1280x720 (that's better). Running 720p cutscenes in the PC version works, but for some reason only the blue color channel is scaled to fullscreen while red and green are displayed at 1x resolution.

To solve all of these issues, I used FFMPEG to first extract the audio from the PC cutscenes and then combine them with the PS3 cutscenes into AVI files using MPEG4 and MP3 for video and audio, respectively. While I was at it, I also told FFMPEG to scale up the PS3 cutscenes to 1280x736. At last, the resulting files can be read by RAD Video Tools and from there converted to Bink (Bink or Bink 2 doesn't matter, and Bink 2 requires a license, so I stuck with Bink 1).

The last step was to hex edit the final Bink file and add back in the 16-byte WMP header that I had deleted earlier. After that, it really was just a matter of renaming "z000_us.ps3.wmp" to "z000_us.win32.wmp" and sticking it in my FINAL FANTASY XIII\white_data\movie folder!

Unfortunately, Bink 1 is not that great a format, and it's difficult to complete this transition without some loss of quality. Still playing around with things on that front. However, the PS3 cutscenes have distinctly better color regardless, and with FFMPEG it's also possible to interpolate the cutscenes to 60 FPS to better match PC gameplay.

All in all, I had quite a fun time exploring these files and coming up with a solution to a three year-old problem. Eventually, my work here will be implemented as a conversion profile in Vidsquish, a tool I created to automate the process of modifying game cutscenes to better suit your exprience. So if better cutscenes interests you, but hex editing doesn't, keep your eyes peeled on the Vidsquish group page!

www.steamcommunity.com/sharedfiles/filedetails/?id=890543121

UPDATE 1/14/18 - I have now managed to identify and extract audio streams from the PS3 cutscenes... I think. There are seven channels for surround sound, but they're not quite the format I was expecting and so far nothing I've thrown them at has been able to play them. This means they're either a) a variant of ATRAC3 which is even less well-known than ATRAC3, and/or b) I'm not identifying the streams correctly and extracting the wrong bytes.

However, I can confirm that the PC audio is four-channel surround, so while not quite as good as the PS3, it's not a horrible downgrade. Most likely it'll be easier to find a way to preserve the original PC audio quality than to find a workable solution for PS3 audio at this point.

UPDATE 1/17/18 - It's official: Vidsquish now supports converting PS3 cutscenes to PC automatically! Check out the Steam group linked above!
Last edited by Lulech93; Jan 17, 2018 @ 7:49pm
< >
Showing 16-30 of 44 comments
Lulech93 Jan 11, 2018 @ 3:13pm 
Originally posted by Krovoc:
low rez CS

To be clear, 720p is the best resolution we've got from any version of the game. Using the PS3 cutscenes won't get you more pixels, but it will get you better image quality :)
Lulech93 Jan 17, 2018 @ 7:50pm 
Big update! Vidsquish, my cutscene modding tool, now has two profiles for Final Fantasy XIII--one of which will automatically convert PS3 cutscenes to PC! Check it out: https://steamcommunity.com/groups/vidsquish#announcements/detail/1670141137771045466
Khronikos Feb 2, 2018 @ 12:12am 
Really cool. You would think they could just do this themselves FFS.
Lulech93 Feb 2, 2018 @ 2:14pm 
Originally posted by Ok:
How does the PS3 cutscene conversion work, where do I get the original PS3 cutscenes? Do I need to download all the cutscenes somewhere or rip them from the PS3 bluray?

Of course the proper way to do it would be to get the files off the PS3 bluray. Instructions for the rest are in the application itself--just click the ? button next to the PS3-to-PC profile. In short, you just need to put the PC and PS3 cutscenes in the same folder and run the application.

However, in their current state both the normal FFXIII profile and the PS3-to-PC profile are very incomplete. I have everything I need to finish them at this point, but it will require a lot of time-consuming manual labor and I have other priorities holding me back from working on it at the moment.
Lulech93 Mar 3, 2018 @ 9:55pm 
Originally posted by TheGhostFreak21:
How can we get the PS3 movie Files? Thanks :)

From the game's Bluray disc itself. Look up the RPCS3 quickstart guide for a list of compatible PC Bluray drives and the tools you need to make a backup of the disc files. Although it is legal, I'll refrain from linking it directly here in case that would be frowned upon by Steam moderators.
Burter's Neck Mar 25, 2018 @ 4:50am 
Thanks for this tutorial, but I can't seem to convert one of the files with Vidsquish, file z019_us.ps3.wmp.66601

I can convert the 66600, 66602, 66603, 66604 and 66605 files by just removing that number at the end, and then putting it through Vidsquish. But with 66601 when I remove the 66601 at the end of the file, it crashes in Vidsquish when it comes to converting with Bink " Error Opening file z019_us.ps3.wmp"

For what its worth, 66601 is the only file that doesn't play beforehand in MPC. All the other 6660x files can play in there before I converted them, its just the 66601 file that comes up with no image but plays a 04:13 file.

Any ideas?
Last edited by Burter's Neck; Mar 25, 2018 @ 4:51am
Lulech93 Mar 25, 2018 @ 1:07pm 
Originally posted by EccoTheDench:
Any ideas?

As it turns out, there's actually multiple Bink videos stored together in each file. Bink itself doesn't support this by default, but there's nothing stopping you from stringing all the binary data together, which is exactly what Square has done for some strange reason. Even better, the PS3 and PC files aren't listed in the same order. This causes all sorts of confusion for programs trying to read the data.

While I have made progress on an automated method for sorting all the files out, there's still a lot of work to be done and eventually I had to put the project on hold for other priorities.
SweatyThighs Nov 18, 2018 @ 10:13pm 
So does this still work I dont see Final Fantasy 13 as a profile anymore?
Lulech93 Nov 19, 2018 @ 12:50pm 
You can still use it but be warned that it's very incomplete and there's a very good reason it's still that way. Multiple cutscenes are combined into a single file, and the game looks for the start of a new cutscene at specific predefined byte addresses. This means that all videos have to be the same filesize or less to fit within the same addresses, which makes preserving PS3 cutscene quality nearly impossible since they have to be compressed to the same level as the PC originals anyway.

BUT, now we have a new twist to the story: the Xbox One re-release of FFXIII includes a brand new batch of cutscenes from the original source, and it's likely they would work natively with the PC version. I'd wager getting your hands on those is a better option than trying to get PS3 cutscenes to work on PC.
edale1 Jan 28, 2019 @ 9:13am 
Originally posted by Lulech23:
BUT, now we have a new twist to the story: the Xbox One re-release of FFXIII includes a brand new batch of cutscenes from the original source, and it's likely they would work natively with the PC version. I'd wager getting your hands on those is a better option than trying to get PS3 cutscenes to work on PC.
Was this ever investigated? Do the Xbox One cutscene files work on the PC version?
Lulech93 Jan 28, 2019 @ 8:52pm 
I don't currently have an Xbox One, so I'm unable to test the theory personally. As far as I know no one else has either, but I'd be very interested to be proven wrong.
Sath Jan 29, 2019 @ 4:02am 
A simpler question hopefully - how do you extract the PS3 cinematics from the movie bin file if you'd be happy to just be able to play them on your PC? Nothing I've tried has worked. (Yes I own my own copies of the PS3 games, plus a PC copy of XIII, so no need to be piracy squee I hope.)
Lulech93 Jan 29, 2019 @ 12:57pm 
Originally posted by Sath:
A simpler question hopefully - how do you extract the PS3 cinematics from the movie bin file if you'd be happy to just be able to play them on your PC?

  1. Use a Hex editor like HxD to open the .wmp files in PS3_GAME\USRDIR\white_data\movie.
  2. With the exception of the intro, all the files will contain multiple movie tracks. Search for the text string "PAMF0041".
  3. Delete the first 800 bytes of the track, including the line containing "PAMF0041".
  4. Highlight everything from the start of the track to the next occurrence of "PAMF0041".
  5. Copy the track and create a new file in HxD, then paste the track. (You may get a warning about content filtering--just ignore this.)
  6. Save the new file as "movie.mpg".

One thing to note here is that the videos will be silent. I've gotten so far as to identify the audio format as ATRAC, but I haven't yet found a good way to play it back on PC. If you really wanted to, you could rip the audio from the PC cutscenes and mux them in with the PS3 ones to get around that problem. Just follow the same process as above, but look for the header "KB2i" and delete the first 16 bytes to create playable BINK video files instead.
chrcoluk May 8, 2019 @ 7:58pm 
do you need the ps3 files for this to work? given ps3 media isnt readable in a pc, how is this done?

it seems there is a big guide missing to do this, it assumes someone has magically grabbed media filed from unreadable media.
Last edited by chrcoluk; May 8, 2019 @ 7:58pm
< >
Showing 16-30 of 44 comments
Per page: 1530 50