P4G PC - Dual audio muxed in ADX files for cutscenes?

Describe your problem in as much detail as you can. Other users might help.
Post Reply
WitheredGryphon
Posts: 3
Joined: Tue Jun 16, 2020 8:40 am
Has liked: 2 posts

I'm currently working on a cutscene mod and this issue has left me stumped.

Any advice on any of these?:
1. How to demux the two tracks from the .adx files (if there are two tracks) and properly mux them again?
2. How to mux the .adx and the .mp4, since FFMPEG throws an I/O error trying to do this?
3. How to spoof my own dual audio .wmv to get the game to play both tracks?
4. If there aren't two tracks, what files I need to change to properly get Dual Audio working with modified cutscenes?

Thanks

Edit:

Slightly dumb mistake, I was looking at the wrong file when demuxing. Questions remain the same though. Demuxing the extracted .usm -> .wmv presents two .wma.raw files that I'm not sure what to do with.
User avatar
pelvisbass
Posts: 10
Joined: Wed Feb 26, 2020 8:53 pm
Has liked: 9 posts
Been liked: 15 posts
Contact:

I could be mis understanding what you asking but p4 golden on pc does not use ADX for the cut scenes. The files should be .wmv and that uses wma audio of which there are two. I did my encoding in this way if it can help you at all.
pelvisbass wrote: Tue Jun 16, 2020 7:50 am I didn't actually try matching the originals but instead tried to improve on it a little bit. I personally used this

Code: Select all

ffmpeg  -i input.mkv  -i input2.wmv -map 0:0 -b:v 30000k -vcodec wmv2 -map 1:1 -map 1:2 -acodec copy -shortest -qscale:v 1 out.wmv
It takes mkv file and encodes that into the format this game works with... after that I take the original .wmv file and just copy over the audio tracks as I don't want to encode audio twice. -qscale:v 1 is the big one as from what I can see that is what allows the video to look much better than the originals.
WitheredGryphon
Posts: 3
Joined: Tue Jun 16, 2020 8:40 am
Has liked: 2 posts

pelvisbass wrote: Tue Jun 16, 2020 9:10 am I could be mis understanding what you asking but p4 golden on pc does not use ADX for the cut scenes. The files should be .wmv and that uses wma audio of which there are two. I did my encoding in this way if it can help you at all.
pelvisbass wrote: Tue Jun 16, 2020 7:50 am I didn't actually try matching the originals but instead tried to improve on it a little bit. I personally used this

Code: Select all

ffmpeg  -i input.mkv  -i input2.wmv -map 0:0 -b:v 30000k -vcodec wmv2 -map 1:1 -map 1:2 -acodec copy -shortest -qscale:v 1 out.wmv
It takes mkv file and encodes that into the format this game works with... after that I take the original .wmv file and just copy over the audio tracks as I don't want to encode audio twice. -qscale:v 1 is the big one as from what I can see that is what allows the video to look much better than the originals.
That was my fault, stupid mistake. Whenever I demuxed the .wmv, I got two .wma.raw files rather than straight .wma (and the .wma.raw files are unplayable). Also, can you elaborate on copying over the audio file? I feel like I'm missing some steps here. And did this also work with dual audio (IOW it played both JP / ENG when tested in the cutscenes)?
User avatar
pelvisbass
Posts: 10
Joined: Wed Feb 26, 2020 8:53 pm
Has liked: 9 posts
Been liked: 15 posts
Contact:

WitheredGryphon wrote: Tue Jun 16, 2020 9:14 am
pelvisbass wrote: Tue Jun 16, 2020 9:10 am I could be mis understanding what you asking but p4 golden on pc does not use ADX for the cut scenes. The files should be .wmv and that uses wma audio of which there are two. I did my encoding in this way if it can help you at all.
pelvisbass wrote: Tue Jun 16, 2020 7:50 am I didn't actually try matching the originals but instead tried to improve on it a little bit. I personally used this

Code: Select all

ffmpeg  -i input.mkv  -i input2.wmv -map 0:0 -b:v 30000k -vcodec wmv2 -map 1:1 -map 1:2 -acodec copy -shortest -qscale:v 1 out.wmv
It takes mkv file and encodes that into the format this game works with... after that I take the original .wmv file and just copy over the audio tracks as I don't want to encode audio twice. -qscale:v 1 is the big one as from what I can see that is what allows the video to look much better than the originals.
That was my fault, stupid mistake. Whenever I demuxed the .wmv, I got two .wma.raw files rather than straight .wma (and the .wma.raw files are unplayable). Also, can you elaborate on copying over the audio file? I feel like I'm missing some steps here. And did this also work with dual audio (IOW it played both JP / ENG when tested in the cutscenes)?

I am pretty bad at explaining these things so if I mess up and you are still confused feel free to contact me on discord @PelvisBass#8205 but what this does is takes the .mkv file (you can change this to whatever extension your modified video is) and encodes it into a .wmv2 video. It then takes both audio tracks in the games original .wmv file and copies them over with no compression then everything gets combined into the .wmv file which can be used in game. If you however want to encode the audio instead of "-acodec copy" you would do something like "-acodec wmav2". This will work with dual audio as it is doing both tracks and in the file. Hope that helps
WitheredGryphon
Posts: 3
Joined: Tue Jun 16, 2020 8:40 am
Has liked: 2 posts

pelvisbass wrote: Tue Jun 16, 2020 9:23 am
WitheredGryphon wrote: Tue Jun 16, 2020 9:14 am
pelvisbass wrote: Tue Jun 16, 2020 9:10 am I could be mis understanding what you asking but p4 golden on pc does not use ADX for the cut scenes. The files should be .wmv and that uses wma audio of which there are two. I did my encoding in this way if it can help you at all.
That was my fault, stupid mistake. Whenever I demuxed the .wmv, I got two .wma.raw files rather than straight .wma (and the .wma.raw files are unplayable). Also, can you elaborate on copying over the audio file? I feel like I'm missing some steps here. And did this also work with dual audio (IOW it played both JP / ENG when tested in the cutscenes)?

I am pretty bad at explaining these things so if I mess up and you are still confused feel free to contact me on discord @PelvisBass#8205 but what this does is takes the .mkv file (you can change this to whatever extension your modified video is) and encodes it into a .wmv2 video. It then takes both audio tracks in the games original .wmv file and copies them over with no compression then everything gets combined into the .wmv file which can be used in game. If you however want to encode the audio instead of "-acodec copy" you would do something like "-acodec wmav2". This will work with dual audio as it is doing both tracks and in the file. Hope that helps
Just to post on here as well. This worked perfectly. Thanks again for the help.
Post Reply
cron

ShrineFox 2020 - 2023
Support | Progress | Labs | Privacy | Terms
This site is NOT affiliated, associated, authorized, endorsed by, or in any way officially connected with Atlus Co., Ltd, Atlus U.S.A., Inc. or Sega Games Co., Ltd, or any of its subsidiaries or its affiliates.