View Full Version : Sofdec MPEG1 video stream with wrong colours...


Zhelkus
30th September 2006, 20:46
I've been ripping the MPEG streams from the Sonic Heroes (PC) SFD movie files.

For the uninformed: Sega and a few other game companies use a video file format whose extension is SFD (Sofdec). These are containers that have a regular MPEG1 video stream and a particular sound format known as ADX that can be easily converted to WAV.

I've successfully ripped 12 video streams (using TMPGEnc Plus 2.5) but the other 10 seem to be screwed up (they show the wrong colours and appear more blocky). I know the files aren't corrupt because when I run the videos within the game they appear fine.

Here's an image of one of the screwed up streams:
http://i2.photobucket.com/albums/y2/chaosdelirium/vlcsnap-77053.jpg

And here's a rapidshare link in case somebody can help me figure out how to rip the stream correctly:
http://rapidshare.de/files/35018742/Sonic_Heroes_-_Team_Sonic_VS_Team_Rose.rar ---3MB

The SFD files can be perfectly viewed with VLC (videolan).

foxyshadis
30th September 2006, 22:17
You can use VLC to save them, under stream settings when you open a file (not quick open). Actually, it'd probably be better to use mencoder to rip it to a lossless format, and then encode from there, since vlc doesn't offer lossless and isn't very high quality when it streams.

Zhelkus
30th September 2006, 23:04
You can use VLC to save them, under stream settings when you open a file (not quick open).
That part I know. However, the weird coloured and blocky image I posted there is a snapshot taken with VLC. Hence if VLC detects the stream as such, the output file will be the same.

Actually, it'd probably be better to use mencoder to rip it to a lossless format, and then encode from there
I just tried it now and mencoder can't even find the MPEG video stream within the SFD file.

Thx for trying tho.

Mr_Odwin
30th September 2006, 23:28
I tried DGIndex and Avisynth. This was the result:
http://rapidshare.de/files/35034948/sonic.avi.html

Zhelkus
30th September 2006, 23:50
I tried DGIndex and Avisynth. This was the result:
http://rapidshare.de/files/35034948/sonic.avi.html
Yup. I tried that too. When you watch this outside VLC in an M1V format the stream looks like this.
http://i2.photobucket.com/albums/y2/chaosdelirium/ClipboardImage.jpg

But it's still screwed. I don't know some videos are working differently....

Here's how it should look like:
http://i2.photobucket.com/albums/y2/chaosdelirium/03_team_sonic-clash_against_team_ro.jpg

Zhelkus
1st October 2006, 03:37
I opened the SFD with a my hex editor. Can somebody make something out of this?

http://i2.photobucket.com/albums/y2/chaosdelirium/HEXediting.gif

Help would be really appreaciated:(

setarip_old
1st October 2006, 05:11
Hi!I opened the SFD with a my hex editor.Try opening one of the "good conversion" SFDs in the same fashion and do a side by side comparison of the header information. This may provide you with the needed information regarding the differing results.

Just guessing here, but at least part of the problem appears to be the header indicating an image size of 320x448, while your "good image" is at 320x240...

Zhelkus
1st October 2006, 05:24
Hey there! Glad to see you trying to help on this thread as well!

Try opening one of the "good conversion" SFDs in the same fashion and do a side by side comparison of the header information. This may provide you with the needed information regarding the differing results...
I aleady did that. The program even has a comparing feature. Unfortunately the readable information in that picture is exactly the same.

What's more, I don't even know what I'm looking at:p All I wanted was to extract a simple video stream...

setarip_old
1st October 2006, 08:16
Just for kicks and giggles, try changing the "448" in the header of the problematic file to "240"...

Nic
1st October 2006, 10:49
I tried editing the sequence header of the MPEG stream to 240 from 448.
(i.e.
00 00 01 B3 14 01 C0 C4
to
00 00 01 B3 14 00 F0 C4
)

Didn't help. Very strange problem. Let us know if you find a solution.

-Nic

foxyshadis
1st October 2006, 15:01
I thought you meant it actually played okay in VLC, which it definitely doesn't. Huh, weird signalling in the file. I'd submit it to ffmpeg along with a link to this thread (for the sample and extra info): http://ffmpeg.mplayerhq.hu/mailinglists.html They should be able to tell what's going wrong and fix it, eventually.

Oh, and the file is mirrored on my server in case you need to give anyone an alternate link, for those who can't do the rapidshare thing: http://foxyshadis.slightlydark.com/random/Sonic_Heroes_-_Team_Sonic_VS_Team_Rose.7z

setarip_old
1st October 2006, 16:38
Are the 10 problematic files from the same disc as the 12 good ones, or are these all from 22 different discs?

If they are from different discs, perhaps the problematic ones incorporate some type of conversion template or mask that is different than that of the good ones...

Despite what you've said, would you be good enough to post the header information from a "good" file?

Zhelkus
1st October 2006, 18:32
Nope, they're all from the same disc. Gimme 20 minutes and I'll upload a "good SFD" for you guys to see.

Thx for the help so far guys:)

EDIT: Ok, here it is.

http://rapidshare.de/files/35126841/Sonic_Heroes_-_Team_Sonic_-_Egg_Albatross_End.rar --8MB

I think I should've done this sooner. Anyhow, the header or the part where they show all the info I displayed in the snapshot is the same.

Thanks for the suggestion, foxyshadis. I think I'll do just that.:D

setarip_old
2nd October 2006, 03:14
Would you be good enough to simply post the same type of header screencap as you did previously?

Zhelkus
2nd October 2006, 04:19
Would you be good enough to simply post the same type of header screencap as you did previously?
Sure thing. Here it is.
http://i2.photobucket.com/albums/y2/chaosdelirium/HEXediting2.gif

The information might appear different but in the end it's still the same because I tried copying this info (from a GOOD SPD) into the other one (the BAD SPD) and the stream turned out the same.:(

They should be able to tell what's going wrong and fix it, eventually.
Which mailing list should I direct myself to? Users or developers?

foxyshadis
2nd October 2006, 04:21
Not sure. Devs, probably.

Zhelkus
2nd October 2006, 04:28
Not sure. Devs, probably.
Drat... I'l just copypasta it. Thx.

setarip_old
6th October 2006, 23:38
The program even has a comparing feature. Unfortunately the readable information in that picture is exactly the same.The information might appear different but in the end it's still the same because I tried copying this info (from a GOOD SPD) into the other one (the BAD SPD) and the stream turned out the same.Regardless of (or, perhaps, supported by) these contradictory statements, I'd still speculate that within the body/bodies of the graphics is a mask/or key that is applied based on the information contained in the header(s)...

Zhelkus
7th October 2006, 04:29
Regardless of (or, perhaps, supported by) these contradictory statements, I'd still speculate that within the body/bodies of the graphics is a mask/or key that is applied based on the information contained in the header(s)...
The contradiction is only literal. I was thinking about that as well but in the end it's just too much of a hassle and time consuming to perform a trial and error sweep with all the info that is on the header. Of course, assuming that the information stored in the header is what is altering the output. In the end this is only speculation. Thx agn for trying, seta.

The FFMPEG mailing lists aren't very helpful when it comes to asking for very technical issues. It seems my situation is proof of it.

setarip_old
7th October 2006, 06:41
Another question - What stream information is generated by VLC for the "good" output and for the "problematic" output? Please post the screencaps for each...

And - rather than presuming that using VLC to convert a "problematic" file won't be good (because of what you saw in a screencap), it might be worthwhile to try one such conversion...

Zhelkus
7th October 2006, 08:26
Another question - What stream information is generated by VLC for the "good" output and for the "problematic" output? Please post the screencaps for each...
I'll post both in one screencap:)
http://i2.photobucket.com/albums/y2/chaosdelirium/ClipboardImage-1.gif

The "bad" one is on the left, right is "good". Odd thing is that the time isn't indicated on the bad one, nor did the screencap capture the video frame, unlike with the "good" one. Another peculiarity is that the audio stream is shown on both as an mpga track, while it really is an ADX track (explained in the first post). VLC flaw?

And - rather than presuming that using VLC to convert a "problematic" file won't be good (because of what you saw in a screencap), it might be worthwhile to try one such conversion...
I did try to convert it some time ago. It turned out the same.:( No difference whatsoever.

I got to get some sleep for tomorrow's calculus test. Thx a lot for the effort.

setarip_old
7th October 2006, 08:41
There always seems to be a "hanging chad" with each of your new posts.

You previously said,However, the weird coloured and blocky image I posted there is a snapshot taken with VLC. Hence if VLC detects the stream as such, the output file will be the same.but your latest post shows a blank screen for such a file?I got to get some sleep for tomorrow's calculus test.Why would you have to take a test about the hard stuff your dentist scrapes off your teeth? ;>}

Zhelkus
7th October 2006, 17:47
but your latest post shows a blank screen for such a file?
VLC has an internal snapshot tool. "Video->Snapshot".

Why would you have to take a test about the hard stuff your dentist scrapes off your teeth? ;>}
In spite of me not liking it, I'm in college and it's part of the curriculum:p

There always seems to be a "hanging chad" with each of your new posts.
It's always a "login-check-logout" process.:D

setarip_old
7th October 2006, 21:04
I'm personally out of suggestions/ideas about this.

Hopefully, you, or some other member will come up with and post the solution ;>}