Someone please figure out how to demux these SFD files.

Discussion in 'Technical Discussion' started by Meat Miracle, Jul 10, 2010.

  1. Meat Miracle

    Meat Miracle

    Researcher
    1,654
    4
    18
    <a href="http://evilboris.sonic-cult.net/!trash/SP6104.SFD" target="_blank">http://evilboris.sonic-cult.net/!trash/SP6104.SFD</a>
    <a href="http://evilboris.sonic-cult.net/!trash/SP6105.SFD" target="_blank">http://evilboris.sonic-cult.net/!trash/SP6105.SFD</a>

    These files were taken from later-generation Saturn titles, which used CRI Sofdec, the same middleware format that was later used on the Dreamcast, and PS2/Xbox/GCN (with MPEG2 video). Much like the Dreamcast SFD files, they contain MPEG1 video and ADX audio.

    The catch is: they all have TWO video streams. A low-resolution version intended for playback using a software mpeg decoder application, and a glorious full-resolution version, using the optional MPEG Card.

    I could not find any SFD converters that could process these files. Any ideas?
     
  2. LocalH

    LocalH

    roxoring your soxors Tech Member
    3,299
    13
    18
    wouldn't you like to know
    Guitar Hero II Deluxe
    Have you tried using something like ps2str to demux them, or does that only work with MPEG-2 program streams?
     
  3. Meat Miracle

    Meat Miracle

    Researcher
    1,654
    4
    18
    I tried mplayer and sfd2mpg.

    ps2str looks like a tool specifically built for Playstation 2 STR files, not Middleware CRI Sofdec files.
     
  4. LocalH

    LocalH

    roxoring your soxors Tech Member
    3,299
    13
    18
    wouldn't you like to know
    Guitar Hero II Deluxe
    Well, from doing some cursory reading, I was under the impression that these were either Program Streams or Transport Streams, and PSS files are really just Program Streams, so I figured it might have been worth a shot to demux them. I tried bbdmux and got three tiny files for the first video, but the second one gave me two 0-byte files and one impossibly-large file. bbinfo tols me that they were TS, not PS, but as the bbdmux output seemed wrong, that might be too.

    TMPGEnc claims to be able to decode Sofdec files, so maybe it can demux them too.
     
  5. Meat Miracle

    Meat Miracle

    Researcher
    1,654
    4
    18
    The problem is, there are about a hundred different kinds of SFD formats, and the existing converters only support the most popular Dreamcast/PS2 versions (none of which had 2 videos inside).
     
  6. Sappharad

    Sappharad

    Oldbie
    1,392
    65
    28
    <!--quoteo(post=477478:date=Jul 10 2010, 07:01 PM:name=Meat Miracle)--><div class='quotetop'>QUOTE (Meat Miracle @ Jul 10 2010, 07:01 PM) <a href="index.php?act=findpost&pid=477478">[​IMG]</a></div><div class='quotemain'><!--quotec-->The problem is, there are about a hundred different kinds of SFD formats, and the existing converters only support the most popular Dreamcast/PS2 versions (none of which had 2 videos inside).<!--QuoteEnd--></div><!--QuoteEEnd-->
    The bigger problem is that the structure of this SFD format is completely different from the existing ones.
    Dreamcast era and onward always uses the 2048 sector size with a 30 byte header on each sector with 0x01C007 used in the sector headers to identify the ADX audio streams. The files you linked still appear to use 2048 byte sectors, but the sector headers are completely different. They only appear to be 8 bytes in this file, and the ADX audio stream isn't just a normal ADX file with it's own header interleaved so the audio stream can't easily be located.

    However, I am seeing several distinct repeating values in the sector headers. 0x00010400, 0x00010200, and 0x00020200 seem to represent the 3 different streams you mentioned. A simple application to pull those out should do the job. Check back in an hour.

    Edit: Here. The following code will get you the 3 streams out of the files you posted. However, out of the 3 only video1 seems to be playable in a video player and for me it's always a black screen unless I seek then sometimes a frame will appear. The first video you posted appears to have a rocket in it, but I can't see much else. Maybe once you have the split streams you can do something from there to repair them.
    Code (Text):
    1. using namespace std;
    2. #include <iostream>
    3. #include <fstream>
    4.  
    5. int readfour(ifstream &infile){
    6. &nbsp;&nbsp;&nbsp;&nbsp;int temp = 0;
    7. &nbsp;&nbsp;&nbsp;&nbsp;int value = 0;
    8. &nbsp;&nbsp;&nbsp;&nbsp;
    9. &nbsp;&nbsp;&nbsp;&nbsp;infile.read((char*) &temp,1); //Read 1 byte
    10. &nbsp;&nbsp;&nbsp;&nbsp;temp = temp * 16777216;
    11. &nbsp;&nbsp;&nbsp;&nbsp;value += temp;
    12. &nbsp;&nbsp;&nbsp;&nbsp;temp = 0;
    13. &nbsp;&nbsp;&nbsp;&nbsp;
    14. &nbsp;&nbsp;&nbsp;&nbsp;infile.read((char*) &temp,1); //Read 1 byte
    15. &nbsp;&nbsp;&nbsp;&nbsp;temp = temp * 65536;
    16. &nbsp;&nbsp;&nbsp;&nbsp;value += temp;
    17. &nbsp;&nbsp;&nbsp;&nbsp;temp = 0;
    18. &nbsp;&nbsp;&nbsp;&nbsp;
    19. &nbsp;&nbsp;&nbsp;&nbsp;infile.read((char*) &temp,1); //Read 1 byte
    20. &nbsp;&nbsp;&nbsp;&nbsp;temp = temp * 256;
    21. &nbsp;&nbsp;&nbsp;&nbsp;value += temp;
    22. &nbsp;&nbsp;&nbsp;&nbsp;temp = 0;
    23. &nbsp;&nbsp;&nbsp;&nbsp;
    24. &nbsp;&nbsp;&nbsp;&nbsp;infile.read((char*) &temp,1); //Read 1 byte
    25. &nbsp;&nbsp;&nbsp;&nbsp;value += temp;
    26. &nbsp;&nbsp;&nbsp;&nbsp;
    27. &nbsp;&nbsp;&nbsp;&nbsp;return value;
    28. }
    29.  
    30. int main(int argc, char* argv[]){
    31. &nbsp;&nbsp;&nbsp;&nbsp;char inname[128];
    32. &nbsp;&nbsp;&nbsp;&nbsp;ifstream infile;
    33. &nbsp;&nbsp;&nbsp;&nbsp;ofstream outvideo1;
    34. &nbsp;&nbsp;&nbsp;&nbsp;ofstream outvideo2;
    35. &nbsp;&nbsp;&nbsp;&nbsp;ofstream outaudio;
    36. &nbsp;&nbsp;&nbsp;&nbsp;char letter;
    37. &nbsp;&nbsp;&nbsp;&nbsp;char altletter;
    38. &nbsp;&nbsp;&nbsp;&nbsp;int value = 0;
    39. &nbsp;&nbsp;&nbsp;&nbsp;int segment = 1;
    40. &nbsp;&nbsp;&nbsp;&nbsp;
    41. &nbsp;&nbsp;&nbsp;&nbsp;cout << "Enter input filename: ";
    42. &nbsp;&nbsp;&nbsp;&nbsp;cin >> inname;
    43. &nbsp;&nbsp;&nbsp;&nbsp;
    44. &nbsp;&nbsp;&nbsp;&nbsp;infile.open(inname, ios::binary | ios::in); //Open the file
    45. &nbsp;&nbsp;&nbsp;&nbsp;outvideo1.open("video1.mpg", ios::binary | ios::out);
    46. &nbsp;&nbsp;&nbsp;&nbsp;outvideo2.open("video2.mpg", ios::binary | ios::out);
    47. &nbsp;&nbsp;&nbsp;&nbsp;outaudio.open("audio.adx", ios::binary | ios::out);
    48. &nbsp;&nbsp;&nbsp;&nbsp;
    49. &nbsp;&nbsp;&nbsp;&nbsp;do
    50. &nbsp;&nbsp;&nbsp;&nbsp;{
    51. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;infile.seekg((segment*2048)+4, ios::beg);
    52. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;value = readfour(infile);
    53. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (value == 0x010200){
    54. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//This is video 1 data!
    55. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;infile.seekg((segment*2048)+8, ios::beg);
    56. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    57. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (int x = 0; x<1020; x++){
    58. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;infile.get(letter);
    59. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;infile.get(altletter);
    60. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;outvideo1.put(letter);
    61. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;outvideo1.put(altletter);
    62. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
    63. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
    64. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (value == 0x010400){
    65. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//This is video 2 data!
    66. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;infile.seekg((segment*2048)+8, ios::beg);
    67. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    68. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (int x = 0; x<1020; x++){
    69. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;infile.get(letter);
    70. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;infile.get(altletter);
    71. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;outvideo2.put(letter);
    72. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;outvideo2.put(altletter);
    73. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
    74. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
    75. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (value == 0x020200){
    76. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//This is audio data!
    77. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;infile.seekg((segment*2048)+8, ios::beg);
    78. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    79. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (int x = 0; x<1020; x++){
    80. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;infile.get(letter);
    81. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;infile.get(altletter);
    82. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;outaudio.put(letter);
    83. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;outaudio.put(altletter);
    84. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
    85. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
    86. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    87. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;segment++;
    88. &nbsp;&nbsp;&nbsp;&nbsp;} while (infile.peek() != EOF);
    89. &nbsp;&nbsp;&nbsp;&nbsp;infile.close();
    90. &nbsp;&nbsp;&nbsp;&nbsp;outvideo1.close();
    91. &nbsp;&nbsp;&nbsp;&nbsp;outvideo2.close();
    92. &nbsp;&nbsp;&nbsp;&nbsp;outaudio.close();
    93. &nbsp;&nbsp;&nbsp;&nbsp;
    94. &nbsp;&nbsp;&nbsp;&nbsp;return 0;
    95. }
     
  7. Meat Miracle

    Meat Miracle

    Researcher
    1,654
    4
    18
    Awesome. Can I have an exe version of that? One where I can set the stream start offsets manually, in case I run into files with different data.

    Where did you those offsets listed in the files?

    <!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->The first video you posted appears to have a rocket in it, but I can't see much else.<!--QuoteEnd--></div><!--QuoteEEnd-->
    It's the final Segata commercial.
     
  8. <a href="http://www.mediafire.com/file/myidndmvryd/CRI%20Sofdec.7z" target="_blank">Try this.</a>
     
  9. Huh, normally I have no problem demuxing SFDs (even the later scrambled ones with multiple audio tracks) using TMpegEnc but these give an error. Weird.
     
  10. LocalH

    LocalH

    roxoring your soxors Tech Member
    3,299
    13
    18
    wouldn't you like to know
    Guitar Hero II Deluxe
    I think it's due to the fact that there are two video streams. I don't believe TMPGEnc properly supports Transport Streams, but they might work with only one video stream. Unless this is a version of the Sofdec container that isn't a modified Program or Transport Stream. The fact that "normal" SFDs demux properly under TMPGEnc means that they're at least close enough to a PS/TS for it to work properly in those cases.
     
  11. Meat Miracle

    Meat Miracle

    Researcher
    1,654
    4
    18
    Could someone please upload a compiled exe of sonicblurs code?
     
  12. Sappharad

    Sappharad

    Oldbie
    1,392
    65
    28
    <!--quoteo(post=480608:date=Jul 17 2010, 12:16 PM:name=Meat Miracle)--><div class='quotetop'>QUOTE (Meat Miracle @ Jul 17 2010, 12:16 PM) <a href="index.php?act=findpost&pid=480608">[​IMG]</a></div><div class='quotemain'><!--quotec-->Could someone please upload a compiled exe of sonicblurs code?<!--QuoteEnd--></div><!--QuoteEEnd-->
    <a href="http://www.sappharad.com/junk/SatSFDemux.zip" target="_blank">http://www.sappharad.com/junk/SatSFDemux.zip</a>
     
  13. Meat Miracle

    Meat Miracle

    Researcher
    1,654
    4
    18
    Okay. So that app is not processing any of the other samples I have. After half an hour, it turns out that the samples I uploaded are modified by the server. That's where the "010400" headers come from, the original files don't have anything like it.

    Terribly sorry for wasting anybodies time with the bad samples.

    Here are some good ones, zipped so the server doesn't screw them up with mime type bullshit.
    <a href="http://evilboris.sonic-cult.net/!trash/SOFDEC.zip" target="_blank">http://evilboris.sonic-cult.net/!trash/SOFDEC.zip</a>

    Strangely enough your converter actually did manage to grab the first, low-res video from the files, with almost no errors. So that makes me think that the false headers were actually at a right place by sheer coincidence. The data stream in all the files seem to start at 0x800, with what looks like an ADX header without loop info.
     
  14. Meat Miracle

    Meat Miracle

    Researcher
    1,654
    4
    18
    OK, this is just silly. I started bruteforcing one of the files based on ADX data samples:

    Code (Text):
    1. SP6104.SFD
    2. begin&nbsp;&nbsp; - end&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hex size content
    3. ---------------------------------------
    4. 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - 0x800&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;800&nbsp;&nbsp;&nbsp;&nbsp;header
    5. 0x800&nbsp;&nbsp; - 0x1d000&nbsp;&nbsp;&nbsp;&nbsp;1c800&nbsp;&nbsp;&nbsp;&nbsp;ADX + header
    6. 0x1d000 - 0x1e000&nbsp;&nbsp;&nbsp;&nbsp;1000&nbsp;&nbsp;&nbsp;&nbsp;? (contains MPEG1 sequence header)
    7. 0x1e000 - 0x1e800&nbsp;&nbsp;&nbsp;&nbsp;800&nbsp;&nbsp;&nbsp;&nbsp;ADX
    8. 0x1e800 - 0x20000&nbsp;&nbsp;&nbsp;&nbsp;1800&nbsp;&nbsp;&nbsp;&nbsp;?
    9. 0x20000 - 0x20800&nbsp;&nbsp;&nbsp;&nbsp;800&nbsp;&nbsp;&nbsp;&nbsp;ADX
    10. 0x20800 - 0x21800&nbsp;&nbsp;&nbsp;&nbsp;1000&nbsp;&nbsp;&nbsp;&nbsp;?
    11. 0x21800 - 0x22000&nbsp;&nbsp;&nbsp;&nbsp;800&nbsp;&nbsp;&nbsp;&nbsp;ADX
    12. 0x22000 - 0x24000&nbsp;&nbsp;&nbsp;&nbsp;2000&nbsp;&nbsp;&nbsp;&nbsp;?
    13. 0x24000 - 0x25000&nbsp;&nbsp;&nbsp;&nbsp;1000&nbsp;&nbsp;&nbsp;&nbsp;ADX
    14. 0x25000 - 0x26800&nbsp;&nbsp;&nbsp;&nbsp;1800&nbsp;&nbsp;&nbsp;&nbsp;?
    15. 0x26800 - 0x27000&nbsp;&nbsp;&nbsp;&nbsp;800&nbsp;&nbsp;&nbsp;&nbsp;ADX
    16. 0x27000 - 0x29000&nbsp;&nbsp;&nbsp;&nbsp;2000&nbsp;&nbsp;&nbsp;&nbsp;?
    17. 0x29000 - 0x29800&nbsp;&nbsp;&nbsp;&nbsp;800&nbsp;&nbsp;&nbsp;&nbsp;ADX
    18. 0x29800 - 0x2a800&nbsp;&nbsp;&nbsp;&nbsp;1000&nbsp;&nbsp;&nbsp;&nbsp;?
    19. 0x2a800 - 0x2b000&nbsp;&nbsp;&nbsp;&nbsp;800&nbsp;&nbsp;&nbsp;&nbsp;ADX
    20. 0x2b000 - 0x2c800&nbsp;&nbsp;&nbsp;&nbsp;1800&nbsp;&nbsp;&nbsp;&nbsp;?
    21. 0x2c800 - 0x2d000&nbsp;&nbsp;&nbsp;&nbsp;800&nbsp;&nbsp;&nbsp;&nbsp;ADX
    22. 0x2d000 - 0x2f000&nbsp;&nbsp;&nbsp;&nbsp;2000&nbsp;&nbsp;&nbsp;&nbsp;?
    23. 0x2f000 - 0x2f800&nbsp;&nbsp;&nbsp;&nbsp;800&nbsp;&nbsp;&nbsp;&nbsp;ADX
    24. 0x2f800 - 0x31800&nbsp;&nbsp;&nbsp;&nbsp;2000&nbsp;&nbsp;&nbsp;&nbsp;?
    25. 0x31800 - 0x32800&nbsp;&nbsp;&nbsp;&nbsp;1000&nbsp;&nbsp;&nbsp;&nbsp;ADX
    26. 0x32800 - 0x34000&nbsp;&nbsp;&nbsp;&nbsp;1800&nbsp;&nbsp;&nbsp;&nbsp;?
    27. 0x34000 - 0x35000&nbsp;&nbsp;&nbsp;&nbsp;1000&nbsp;&nbsp;&nbsp;&nbsp;ADX
    28. 0x35000 - 0x36800&nbsp;&nbsp;&nbsp;&nbsp;1800&nbsp;&nbsp;&nbsp;&nbsp;? (contains MPEG1 sequence header)
    29. 0x36800 - 0x37000&nbsp;&nbsp;&nbsp;&nbsp;800&nbsp;&nbsp;&nbsp;&nbsp;ADX
    30. 0x37000 - 0x38800&nbsp;&nbsp;&nbsp;&nbsp;1800&nbsp;&nbsp;&nbsp;&nbsp;?
    31. 0x38800 - 0x39800&nbsp;&nbsp;&nbsp;&nbsp;1000&nbsp;&nbsp;&nbsp;&nbsp;ADX
    32. 0x39800 - 0x3c000&nbsp;&nbsp;&nbsp;&nbsp;2800&nbsp;&nbsp;&nbsp;&nbsp;?
    33. 0x3c000 - 0x3d800&nbsp;&nbsp;&nbsp;&nbsp;1800&nbsp;&nbsp;&nbsp;&nbsp;ADX
    What the hell is this? Random interleaving?
     
  15. Sappharad

    Sappharad

    Oldbie
    1,392
    65
    28
    If you swap two of the files, will those two still play properly?
    I don't see anything in these fixed files that would identify the sector types. The only thing it has in common with Dreamcast era SFD is the sectors are still 0x800 bytes.
     
  16. Meat Miracle

    Meat Miracle

    Researcher
    1,654
    4
    18
    Yeah, they still play properly. Even though the swapped out files have different data on sectors.
    Even the MPEG sequence header seems bogus: according to them the videos are 29.97 fps, but they certainly don't play at that framerate. Maybe the full resolution ones do, however those videos are not 240x160, they are fullscreen.

    Here are the program files that run the code on this demo cd, maybe they can be reverse engineered. Both SH2s and the SCU DSP is active as well when the files are being played, so the video decoder may not be in sh2 language.
    <a href="http://evilboris.sonic-cult.net/!trash/SFDPLAY.zip" target="_blank">http://evilboris.sonic-cult.net/!trash/SFDPLAY.zip</a>
     
  17. Bit of a bump, but I've had some troubles with SFD files too.

    I examined the XBLA leak of Sonic Adventure, and to my surprise it contained unique variations of the intro SFDs not found in the DC or GC versions. (PC uses WMV of course.)

    The US and JP DX videos decode fine, but the DC original is not decoding properly in Media Player Classic, Winamp, FFPlay, or VirtualDub.

    What's the big deal? The Dreamcast intro was encoded at the strange resolution of 320x448. The XBLA version is in 640x480. I'm hopeful that, once properly decoded, it show itself to be a higher resolution encode from the source, and not just a sizeup.

    Compare:

    [​IMG] [​IMG]

    I copied these three strings out of the MPEG file:
    TMPGEXS
    TMPGEXE
    IDCPREC
     
  18. I'm back with more SFD woes. Someone try getting this to play: <a href="http://home.comcast.net/~doa4/movie.sfd" target="_blank">http://home.comcast.net/~doa4/movie.sfd</a> 401MB from Initial D Extreme Stage on PS3. TMPEG says that the video track is an MPEG-1 VBR stream but it's messy like others and the audio seems to be some CRX AIX or AIXP thing.