Closed ShadowOne333 closed 2 years ago
Frankly, I have no idea. I neglected testing on linux for some time because in my currect codebase, sfdmux is being rewritten. I don't have Metroid: Other M, didn't even know it uses CriWare. Could you send a sample movie here? Thanks.
Sure thing, I'll redirect to a zip that a user sent me when doing tests on his side: https://www.dropbox.com/s/xgdn39b6hgw3vo6/dm63Bto64MOMr.zip?dl=0
The only files of interest in that should be the broken and correct SFD files (there's another one that says "compressed broken" but that was a test to see if doing a compressed video would help with playback in-game, it didn't lol) The "correct" SFD is the one created with the EXE version of sfdmux (downloaded from the Releases page), while the "broken" SFD file is the one created with the Linux compiled binary (with the changes suggested here).
Let me know if there's anything else needed.
Bumping this one with new info. I found that two specific cutscenes in Other M were having issues.
Specifically when the ones generated with sfdmux somehow glitched other cutscenes that played right after the one modified. So for example, dm08_01 is one I modified for my hack, and once that one finished being played, dm08_02 starts playing, but with the SFD generated by sfdmux, dm08_02 gets glitched.
I found out that generating an SFD with "Sega Dreamcast Movie Creator" makes an SFD file that properly plays the subsequent cutscenes without issue. Same for the other SFD that has cutscenes right after. The one drawback of using the Dreamcast Movie Creator is that it only allows for muxing one audio and one video file, so muxing the second track (Japanese audio track) is not possible with it.
Perhaps this could be something worth looking into for implementation/fixing on the creation of SFD files with sfdmux? Here are the files for testing/debugging:
Generated with SFDMUX: https://www.dropbox.com/s/3e5k9d0lp0skk60/dm08_01-bugged.sfd?dl=0
Generated with Sega Dreamcast Movie Creator: https://www.dropbox.com/s/f0802r6slr1dgms/dm08_01.sfd?dl=0
I have both Dreamcast Creator and another tool from xbox 360 era which helped me already. I've checked out your previous sfd files and it seems something is wrong with all of them (according to ffmpeg) but I have no idea what that is. My current priority is releasing new version of sfdmux that will, probably, fix all major problems but right now I have issues with proper creation of PTS/DTS and mux rate in video/audio packets, video skips because of that and sometimes just halts a decoder (in sonic colors and black knight at least). I can push what I have already for testing but I don't guarantee smooth playback or working files at all.
If you have a .exe (32bit) I can test out on my own of the latest test version you have, you can post it here and I can try that on my end and let you know how it went.
I made some more modifications to the build_linux.sh
script, I think this should be able to compile all the executable binaries without any hiccups, since I was having some errors and warnings during compilation. I also included a check so the bash script detects whether or not the bin folder exists, and if it doesn't, it creates it:
#!/bin/bash
PROGRAMS=("csc_video_conv" "test_mpeg" "test_adx" "sfdmux")
INCLUDES=-I./include
LIBS=./lib/*
ARGS="-O2 -Wno-unused-result -Wno-format -Wno-implicit-function-declaration" #-Qns
if [[ ! -d bin ]]; then
echo Creating /bin/ directory
mkdir bin
fi
for prog in "${PROGRAMS[@]}"
do
echo Building $prog
gcc "./src/$prog.c" -o "./bin/$prog" $ARGS $INCLUDES $LIBS
done
I'm still having some issues with the SFDs created with it on Other M, but I'll try to see what I can do for those. If there's any suggestions or tests needed, I'm all up for it.
Thanks! I'll merge the changes. Current codebase does not allow for building sfdmux (I just pushed a commit with breaking changes in sfd.h)
In the next commits I will address these changes, sfdmux's timestamp issues and I hope that will make videos more compliant to CRIWare's decoder.
Thank you for the response! I'll keep an eye out for the upcoming commits then once the new changes to the sfd code have been done, and then I'll test on my end and pull request any changes to the Linux script if necessary. I'll also let you know how the Criware tests go once those changes are done too.
Thanks again!
Requires common.c to be added to the LIBS definition, otherwise the
change_order_XX
functions don't get recognized when compiling.EDIT: Actually, I think something else might be missing from the Linux script. I'm currently working on re-editing some of the Metroid: Other M cutscenes, and when muxing the MPG with the 2 ADX files that such game uses with the compiled binary on Linux, makes the cutscene crash on the first couple of seconds when playing the file.
If I instead run the EXE through Wine on Linux, it muxes the file and the game plays it all the way through now, no issues. Any idea what the issue might be for the Linux binary?