Log in

View Full Version : Extract Gamecube FMVs problem...help?


Undead Sega
7th March 2012, 20:44
Hi guys, I was wondering if anyone can help me on this, I came across this thread on about how one would extract FMVs from a Gamecube game:

http://www.animemusicvideos.org/forum/viewtopic.php?f=44&t=93501

and while it is great, I also done another method on accessing the games using GC-Tools and with the game I as well, I did this to the gamecube version of Resident Evil 3 inwhich I wanted to extract the FMVs which I managed to locate. However, this is where the problem lies, unlike in that tutorial where the videos were in Bink format, this one was in .STR extension, which is also the same kind that PS1 games used, but very strange enough, after hours of researching on the internets, NOONE has ever discussed these .STR video files as they cannot be played whatsoever! :( I have tried loading it into converters and loaded it through DirectShowSource via. AviSynth but it says it doesnt recognise the file type, I even tried playing it through a PSX movie players which ultimately rejected it or in some cases, crashed it.

I really want to try and view these great FMVs as they are one of a kind, and I stil cant get my head around that it seems no one has ever come across .STR files in a gamecube game. I would really appreciate it if anyone can help me on this, unlike other consoles I dont know too much on how videos are encoded for the Gamecube except for Bink, but it seems more than one kind can be used on the console.

Thanks for hearing and I hope to hear back from you lot too! :)

jmac698
7th March 2012, 22:13
If it's uncompressed, it's probably quite simple. First try renaming to .fmv maybe and see if it works. Try in VLC as I think it tries to autodetect the videotype regardless of name.
Also do a quick calculation of the file size and see if the time of the movie, and the likely resolution, matches closely to an uncompressed filesize.
If it's uncompressed, it would probably be not too hard to figure out the format. You could read it with rawsource and write a script to display it. It would need a bit of research on the gamecube hardware and how it naturally stores video. I'm sure it's easy to Google.

Dark Shikari
7th March 2012, 22:14
libav has quite a lot of decoders for obscure game video formats. See if it uses an existing one; if not, perhaps it can be reverse-engineered.

jmac698
7th March 2012, 22:59
At the risk of stating the obvious,
Did you try this? You did say you tried it in some psx movie players. Did you try several of the files? Any chance some were corrupted?
http://www.fileinfo.com/extension/str
PsxMC
PSMPlay
PSXPlay
PsxTulz
jPSXdec

jmac698
7th March 2012, 23:11
Try the player http://segu.psxemu.com/
It seems that the format is a type of motion jpeg, but not fully compatible.
The problem with playback may be an extra huffman compression step added to the file. This will prevent normal playback.
http://wiki.multimedia.cx/index.php?title=PlayStation_Motion_Decoder


While the MDEC hardware is rigid about the format of incoming data, many PlayStation games have gone an extra step by Huffman-compressing the data, decompressing it in software before sending it to the MDEC for final decode. Many games opted to use Huffman tables from MPEG-1. However, other games use custom tables. In doing this, developers can

optimize compression for a given set of FMV
thwart curious gamers who explore the data files on a PlayStation disc and seek to view the files with 3rd-party software


It may be possible to decode if you can find a generic huffman decoder or some mpeg utility that does the huffman decoding step only, then it should be in a format for one of the players.

According to the format at http://www.zophar.net/fileuploads/2/10731bgqkx/playstation.htm
There should be a header of 00, 38 at the start of the file (I don't know in which order though).

Undead Sega
7th March 2012, 23:51
Hi guys, thanks very much for getting back to me with all this info, I'm sure it will be sueful for other as well.

If it's uncompressed, it's probably quite simple. First try renaming to .fmv maybe and see if it works. Try in VLC as I think it tries to autodetect the videotype regardless of name.
Also do a quick calculation of the file size and see if the time of the movie, and the likely resolution, matches closely to an uncompressed filesize.
If it's uncompressed, it would probably be not too hard to figure out the format. You could read it with rawsource and write a script to display it. It would need a bit of research on the gamecube hardware and how it naturally stores video. I'm sure it's easy to Google.

I have indeed tried renaming it with different extensions and tried playing it through VLC player (first thing I did when trying to figure this out) but no luck whatsoever, it did display the Audio details but this kept changing and nothing wsa heard or displayed.

At the risk of stating the obvious,
Did you try this? You did say you tried it in some psx movie players. Did you try several of the files? Any chance some were corrupted?
http://www.fileinfo.com/extension/str
PsxMC
PSMPlay
PSXPlay
PsxTulz
jPSXdec
Try the player http://segu.psxemu.com/
It seems that the format is a type of motion jpeg, but not fully compatible.
The problem with playback may be an extra huffman compression step added to the file. This will prevent normal playback.
http://wiki.multimedia.cx/index.php?title=PlayStation_Motion_Decoder



It may be possible to decode if you can find a generic huffman decoder or some mpeg utility that does the huffman decoding step only, then it should be in a format for one of the players.

According to the format at http://www.zophar.net/fileuploads/2/10731bgqkx/playstation.htm
There should be a header of 00, 38 at the start of the file (I don't know in which order though).

Funny enough, I have tried playing the files using most of these players, and as I said in my original post, they either rejected it or crashed. I have just tried playing it through PSmPlay and it wouldnt work whatsoever :(

libav has quite a lot of decoders for obscure game video formats. See if it uses an existing one; if not, perhaps it can be reverse-engineered.

Unfortunately I dont quite know how to make use of the libav decoders (or maybe I've forgotten to?) but it would be great if it can! So, for the sake of you lot and to make things abit easier, I have uploaded the smallest fmv example on the disc (with a site that has not been shutdown!): roopne.str - 2.5 MB (http://uploading.com/files/5943bf28/roopne.str/)

Dark Shikari
7th March 2012, 23:53
Unfortunately I dont quite know how to make use of the libav decoders (or maybe I've forgotten to?) but it would be great if it can! avconv -i inputfile ...

Undead Sega
8th March 2012, 00:53
Oh right, is this done in Avisynth itself or another application?

Dark Shikari
8th March 2012, 00:54
It's done using avconv (or ffmpeg)...

jmac698
8th March 2012, 02:00
In beginner terms,

That's means it's done in the command prompt, or dos window. Grab some ffmpeg windows binaries, unzip them to your c: drive,
then
cd c:\
avconv -i file.str ...

cd means change directory, it makes c:\ the default directory for the following commands.
avconv should be directly at the root of the C: drive (this is just for convenience).
Put also your .str file there.
Then the command will try it, so see if it works.
For futher details on what -i means or what else to put, you need to read the manual for avconv. Perhaps there's something like -o test.avi.
http://www.videohelp.com/tools/ffmpeg

As my reference said, it may have been compressed to a type of "zip" format so that you can't get at the actual movie file, and this was done on purpose to either save space or prevent people from playing the movie! You need to "unzip" it - NOTE: not actually zip, but some custom compression.
I have speculated that it might be possible to "unzip" this with some kind of utility, but it would take some research.

Undead Sega
8th March 2012, 02:28
Ahhh I see, it did look familiar :D However, isnt this possible to do in Avisynth? I tried loading it with FFVideoSource but it claims not to recognise it or something :(

Dark Shikari
8th March 2012, 02:31
If ffvideosource doesn't work, avconv probably won't, but sometimes avconv can give useful info about a file while trying to probe it.

But if it has some weird nonstandard compression, odds are it won't find anything.

Undead Sega
8th March 2012, 02:50
Ohhh man, this is not good :( I gave you lot a sample of it, have a go if you wish.

P.S. I just tried opening a file in GSpot, but it doesnt tell me anything :(

Midzuki
8th March 2012, 07:32
Hi there.

Even though your uploaded file has a .STR extension, its first 5 bytes are "HVQM4" --- which led me to:

http://wiki.multimedia.cx/index.php?title=H4M

HVQM3 is used on N64 Mario Party series games
HVQM4 is used on some Nintendo GameCube Biohazard/Resident Evil series games

Also:

http://www.emutalk.net/threads/34156-H4M-player-found

Hope this helps :o

jmac698
8th March 2012, 07:53
Also, could you play it in an emulator and record the movie? There's sophisticated ways to do this with Tool Assisted Speedplay.

I did mention to look for 00,38 as the header, so obviously this is not HREC format.

Undead Sega
9th March 2012, 03:42
Hmmm, what did you use to read the first 5 bytes???

Will anything in Avisynth be able to decode HVQM4??? :(

jmac698
9th March 2012, 04:51
Once you record it some other way, then it will be a video file that can be read in Avisynth.
So record the video in an emulator or use fraps or something to record the video in the player.

Midzuki
9th March 2012, 04:55
@ Undead Sega:

1) I used a hex-editor (XVI32, freeware and still my favorite one)

2) As jmac698 said, so far no other way than a (preferably-lossless) capture of the video playback (either thru the console itself or thru an emulator) -.-

As I have already gone thru similar situations, yes I know how much that sucks :(

P.S.: jmac698 was faster than I, now I hate him :D

[ just kidding of course =^.^= ]

jmac698
9th March 2012, 10:11
I hate you too :)

Midzuki
9th March 2012, 17:27
And just for the sake of completeness:
P.S. I just tried opening a file in GSpot, but it doesnt tell me anything

MediaInfo says:

General
Complete name : roopne.str
Format : GameCube Movie
File size : 2.54 MiB

Undead Sega
10th March 2012, 02:14
Also, could you play it in an emulator and record the movie? There's sophisticated ways to do this with Tool Assisted Speedplay.

I did mention to look for 00,38 as the header, so obviously this is not HREC format.

@ Undead Sega:

1) I used a hex-editor (XVI32, freeware and still my favorite one)

2) As jmac698 said, so far no other way than a (preferably-lossless) capture of the video playback (either thru the console itself or thru an emulator) -.-

As I have already gone thru similar situations, yes I know how much that sucks :(

P.S.: jmac698 was faster than I, now I hate him :D

[ just kidding of course =^.^= ]

That was something I totally want to avoid, I wanted to have it as raw as possible and work from it, I dont quite understand why such format is so difficult to get working, I thought this would've been possible at this current time.

The worst part also of all of this is that I just cannot get avconv to work at all, it just keeps crashing/shutting down when I tried installing it. Is it possible for someone here to give it a go and see if it works on it? :)

Undead Sega
14th November 2013, 01:28
Hello everyone! How are you all? :D

I'm sorry for bringing this up again, but I was wondering, has there been any progress or updates to AviSynth for supporting H4N encoded videos by any chance??? I am still trying to see if this is a possibility :)

TheSkiller
17th November 2013, 15:57
Have you tried the ffmpeg command line approach yet?
It worked perfectly for me last year when ripping some PS1 STR videos using this command line:


c:/ffmpeg.exe -f psxstr -i C:/xxxx.str -acodec pcm_s16le -vcodec rawvideo C:/out.avi


Although I guess it won't work with your STR videos because they probably use a different codec internally than PS1 games did...

Undead Sega
17th November 2013, 21:18
If I wanted to do PS1 videos, then that would've been no problem with me whatsoever. The STR videos on some or many GameCube games uses the H4M codec which at this current moment is virtually unplayable at all!

I am still seeing if this is a possibility with Avisynth :D

Anyone at all may I ask?

filler56789
17th November 2013, 21:50
My suggestion: goto http://codecs.multimedia.cx/ and
ask Kostya to reverse-engineer the pesky codec :)

It doesn't hurt to try, considering that the author of the DVD-A plugin for foobar2000 found a way to decode encrypted APT-X100 audio :cool: "only because" a Videohelp forumer asked him nicely :D

Undead Sega
18th November 2013, 01:36
Well I just emailed Kostya, this is the person whom you were referring to am I correct?

filler56789
18th November 2013, 02:16
But of course. The DVD-Audio wizard is named Maxim Anisiutkin, and probably he is not much into video codecs =^.^=

Undead Sega
18th November 2013, 23:37
Right okay, well he got back to me and this is what he had to say to me:

Hmm, this is the first time I hear about this format. There are too many formats
out there and I have never had much interest for console formats.

Unfortunately I'm not sure it's possible to reverse engineer this
format in a sane time
(at least for me) because there's too little information available and
there are not so
many people who had experience reverse engineering codecs from PowerPC code.

Maybe people in localization community can help you more, they should have more
experience with game binaries and resource unpacking.

Now I don't exactly know where to go from here if I am completely honest! :(

filler56789
19th November 2013, 03:10
That's not good news indeed :( , but at least he was quite honest and didn't try to sell false hopes.
BTW, do you know what he meant by "localization community"? :confused:

ChiDragon
19th November 2013, 08:23
Fan translaton, I believe.

Undead Sega
19th November 2013, 13:27
That's not good news indeed :( , but at least he was quite honest and didn't try to sell false hopes.
BTW, do you know what he meant by "localization community"? :confused:

I think what e meant by that was to ask people who are related to what I was asking him for, so this bring the Video codecs people, or Gaming/Emulation community. Both of which I have somewhat asked (here being one of them).

If we could provide him the proper information, perhaps it would help?

Undead Sega
23rd November 2013, 22:55
No?

Anyone at all may I ask?

:(

littleD
26th November 2013, 09:59
Multimedia Mike? http://multimedia.cx/eggs/

Undead Sega
26th November 2013, 15:31
Hmmm I see...and what are you trying to suggest with this perhaps? :D

littleD
26th November 2013, 19:39
Anyone at all may I ask?Well.. perhaps maybe you might ask him your question? :P

Seriously, he is coder whos area of interest are (also rare) video/audio formats, he reverse enginere them too. Look on About Multimedia Mike.

Undead Sega
6th December 2013, 04:13
Sorry for the late reply, but I didnt manage to get through to him and asked my question.

To cut the story very very short, this is what I got at the end:

I would probably need to reverse engineer GameCube PowerPC assembly code
in order to understand this format, and I really don't have the time for
that right now. However, if you really need the video, you should be
able to fetch anything you need off of YouTube. I just search for
"resident evil remake cutscenes" and they're all there, in great
quality. Use a YouTube downloader utility to fetch them locally so you
can manipulate them.

I attached him a source code to the latest version of the Dolphin emulator which I explained to him is able to emulate the games very well and is even able to play the FMVs i.e. the H4M video, in hopes that it would help him understand how the PowerPC assembly code. This was back in 2nd December I made that reply, I have not yet heard back from him whatsoever :(