Quantcast

Page 1 of 2 12 LastLast
Results 1 to 15 of 24

Thread: Mega/Sega CD Video Playback: CDXL, Indeo, Cinepak, Sega FILM, TruVideo, Captain Crunc

  1. #1
    Hero of Algol
    Join Date
    Aug 2010
    Posts
    8,207
    Rep Power
    194

    Sega CD Mega/Sega CD Video Playback: CDXL, Indeo, Cinepak, Sega FILM, TruVideo, Captain Crunc

    Hi!

    I would like to discuss about codecs and file formats related to Mega/Sega CD's video playback.

    I have a few question which I would like to see answered by this thread:
    - Can we use CDXL on the Mega/Sega CD? Does it have any advantage over standard Cinepak used in the early Sega CD FMV titles?
    - How do we convert CDXL to Cinepak?
    - How do we convert a MPEG file to a Mega/Sega CD compatible format?
    - How do we create playable video files and CDs for the Mega/Sega CD?
    - Has anyone ever tried to use Captain Crunch codec on the Mega/Sega CD? Any possible advantages over TruVideo?
    - Do we have any open source implementation of these old codecs or a new one which Mega/Sega CD homebrew developers could use?
    - What's the best codec we could use on Mega/Sega CD FMV games and applications?


    An initial article to discuss:

    Source: https://ia601709.us.archive.org/7/it...Sep%201993.pdf


    Some reference links:
    http://chanae.walon.org/pub/docs/tec...info/codec.htm
    http://multimedia.cx/eggs/sega-cd-fmv-vq-analysis/
    http://wiki.multimedia.cx/index.php?title=Sega_FILM
    https://en.wikipedia.org/wiki/Cinepak
    http://segaretro.org/TruVideo
    https://en.wikipedia.org/wiki/CDXL

    Some interesting links:
    http://www.sega-16.com/forum/showthr...the-MD-Genesis
    http://eab.abime.net/showthread.php?t=63825
    http://www.amiga.org/forums/showthre...478#post100478
    http://www.cd32-allianz.de/cdxl/convert2cdxl/intro?
    http://www.cd32-allianz.de/cdxl/v1?
    http://www.cd32-allianz.de/cdxl/v2?
    http://www.cd32-allianz.de/cdxl/erstellen?
    http://www.cd32-allianz.de/cdxl/mpeg?





    Last edited by Barone; 09-16-2015 at 04:08 AM.

  2. #2
    16-bits is all he needs Master of Shinobi matteus's Avatar
    Join Date
    Apr 2006
    Location
    UK
    Age
    39
    Posts
    2,450
    Rep Power
    66

    Default

    Fonz from Watermelon did an extensive amount of development of a Sega CD FMV codec with optimal colour use, I believe this was used to create a Sega CD version of the Gamesack episode above?

    Take a look at his demos here:
    http://www.genny4ever.net/index.php?page=works#mcd

    The limited palette of the MD doesn't lend itself well to video but works well with animation that's why I created the example I did.
    Last edited by matteus; 09-16-2015 at 06:07 AM.


  3. #3
    Hero of Algol TrekkiesUnite118's Avatar
    Join Date
    May 2010
    Age
    33
    Posts
    8,345
    Rep Power
    137

    Default

    This would be interesting to see more info on. I've wondered for a bit if some of those old VHS Tape games could be converted into Light Gun games for the Sega CD:



    Basically how it worked was you had this toy space ship that had a light sensor in in it. If it was pointed at a part of the screen where a yellow flash happened it counted as you getting hit. If it was pointed at a part of the screen where a red flash was happening and you pulled the trigger it counted as you hitting an enemy.

  4. #4
    16-bits is all he needs Master of Shinobi matteus's Avatar
    Join Date
    Apr 2006
    Location
    UK
    Age
    39
    Posts
    2,450
    Rep Power
    66

    Default

    I've said this in the past but if you rendered the background in virtua cop as video and layered the characters as sprites on top, I'm sure you could get something that looked pretty decent overall. Not sure how the drop in resolution would look though!


  5. #5
    Wildside Expert bgvanbur's Avatar
    Join Date
    Jul 2011
    Location
    NY, USA
    Age
    39
    Posts
    199
    Rep Power
    22

    Default

    Quote Originally Posted by Barone View Post
    - Can we use CDXL on the Mega/Sega CD? Does it have any advantage over standard Cinepak used in the early Sega CD FMV titles?
    Writing a generic driver for CDXL would be difficult on the Sega CD. 4096 colors are allowed, video frames can use YUV which would could be slow to convert. The audio is the same, but the chunk size might be annoying to deal with. I think a Sega CD with 32x might be able to do it though but makes the generic driver have more layers to code up.

    Quote Originally Posted by Barone View Post
    - How do we convert CDXL to Cinepak?
    ffmpeg handles CDXL so can convert to images/audio and reencode in your choice Sega CD format.

    Quote Originally Posted by Barone View Post
    - How do we convert a MPEG file to a Mega/Sega CD compatible format?
    I use ffmpeg and my suite of scripts in SCDTools. I have released sevaral sample CDs with the full source on it. My process isn't very clean and usually takes me some time to determine the best way to convert a new video (consider aspect ratio, fps, dithering method, etc).

    My initial cinepak work was released over at sonic retro:
    http://forums.sonicretro.org/?showtopic=26243

    Quote Originally Posted by Barone View Post
    - How do we create playable video files and CDs for the Mega/Sega CD?
    Once you have the video, you still need to have the sub CPU and main CPU code to run the video. I use the cinepak codecs as provided by Sega which doesn't require too much code to get a simple video played.

    Quote Originally Posted by Barone View Post
    - Has anyone ever tried to use Captain Crunch codec on the Mega/Sega CD? Any possible advantages over TruVideo?
    Is the captain crunch codec even documented? From the description it sounds like it might too much for the Sega CD to run natively.

    TruVideo doesn't mean a specific format. I believe this is truly a marketing term since early on (such as Prize Fighter) it used the SGA format and later (such as Fahrenheit) is used the Cinepak format. Some Cinepak games don't tote the TruVideo term though (such as Jurassic Park and Ecco 2, though they did through around other buzzwords).

    Quote Originally Posted by Barone View Post
    - Do we have any open source implementation of these old codecs or a new one which Mega/Sega CD homebrew developers could use?
    I reverse engineered the codec for the Cinepak version 1.2.

    I would love to make an enhanced cinepak (fix a few issues, allow long videos, pause, skip backwards/forwards, customizable audio rate), but it hasn't been a priority for me.

    Quote Originally Posted by Barone View Post
    - What's the best codec we could use on Mega/Sega CD FMV games and applications?
    Really the cinepak may be annoying to use, but no one else has come even close to releasing something more convenient to use.

  6. #6
    Wildside Expert bgvanbur's Avatar
    Join Date
    Jul 2011
    Location
    NY, USA
    Age
    39
    Posts
    199
    Rep Power
    22

    Default

    Quote Originally Posted by matteus View Post
    Fonz from Watermelon did an extensive amount of development of a Sega CD FMV codec with optimal colour use, I believe this was used to create a Sega CD version of the Gamesack episode above?

    Take a look at his demos here:
    http://www.genny4ever.net/index.php?page=works#mcd

    The limited palette of the MD doesn't lend itself well to video but works well with animation that's why I created the example I did.
    I was the one who helped them with Sega CD videos for 2 different episodes (a full episode on the Sega CD and an FMV-bola segment at the end of another episode).

    He did great work but did he ever release the source for the video stuff?

    Quote Originally Posted by TrekkiesUnite118 View Post
    This would be interesting to see more info on. I've wondered for a bit if some of those old VHS Tape games could be converted into Light Gun games for the Sega CD:

    Basically how it worked was you had this toy space ship that had a light sensor in in it. If it was pointed at a part of the screen where a yellow flash happened it counted as you getting hit. If it was pointed at a part of the screen where a red flash was happening and you pulled the trigger it counted as you hitting an enemy.
    Quote Originally Posted by matteus View Post
    I've said this in the past but if you rendered the background in virtua cop as video and layered the characters as sprites on top, I'm sure you could get something that looked pretty decent overall. Not sure how the drop in resolution would look though!
    These would be doable, it justs needs data to know about what to do at different times in the video. So you can have a table in the code that does this, or modify the video file to have this type of information (which most likely would need to be sent to the MAIN CPU since that is the most likely place to handle controller and light gun actions).
    Last edited by bgvanbur; 09-17-2015 at 04:14 PM.

  7. #7
    16-bits is all he needs Master of Shinobi matteus's Avatar
    Join Date
    Apr 2006
    Location
    UK
    Age
    39
    Posts
    2,450
    Rep Power
    66

    Default

    Quote Originally Posted by bgvanbur View Post
    I was the one who helped them with Sega CD videos for 2 different episodes (a full episode on the Sega CD and an FMV-bola segment at the end of another episode).

    He did great work but did he ever release the source for the video stuff?
    Oh really! Fonz is private about his work, I guess it took him a long time to do.


    Quote Originally Posted by bgvanbur View Post
    These would be doable, it justs needs data to know about what to do at different times in the video. So you can have a table in the code that does this, or modify the video file to have this type of information (which most likely would need to be sent to the MAIN CPU since that is the most likely place to handle controller and light gun actions).
    It's a shame more work hasn't been done to hack the PC version of Virtua Cop's resource files.

    I'd have a go at writing something if they were easily accessible.

    Your codec stuff is amazing! I've just been playing all your demos!


  8. #8
    16-bits is all he needs Master of Shinobi matteus's Avatar
    Join Date
    Apr 2006
    Location
    UK
    Age
    39
    Posts
    2,450
    Rep Power
    66

    Default

    I figured I'd share this as it's what I'm now using to work out how much cart space I'll have in my projects for animation in the long term: http://segadev.matthewbennion.co.uk/...Calculator.php


  9. #9
    16-bits is all he needs Master of Shinobi matteus's Avatar
    Join Date
    Apr 2006
    Location
    UK
    Age
    39
    Posts
    2,450
    Rep Power
    66

    Default

    Also here is a demo I threw together! It's not perfect as I didn't fully optimise the colour palettes on any of the animation and ResComp has messed up a few frames! This is two roms being played btw.

    Last edited by matteus; 09-23-2015 at 09:30 AM.


  10. #10
    Raging in the Streets goldenband's Avatar
    Join Date
    Dec 2009
    Posts
    4,636
    Rep Power
    102

    Default

    I have two longstanding questions about this topic, more or less related, and both possibly a bit naive:

    1) Do any of the codecs or methods used for generating FMV on the Sega CD/Mega CD allow for subtitles to be easily rendered in the area below letterboxed videos? Apparently some folks were recently able to add subs to PC-FX videos without having to re-encode and re-compress them (!), but that may be an anomaly.

    2) What's the best way to convert Sega CD video assets back into a form easily readable by a modern OS? I ask in particular because of the GAME OVER sequence from Cobra Command/Thunder Storm FX, which has a nifty little bit of music that gets cut short at the end. I've always wanted to investigate whether it's getting truncated on playback, or whether the source file itself is clipped.

    Also, this may be a stupid question, but how do we categorize (or recognize) the difference between procedurally-generated anime-style animation and FMV? For instance, are the Earnest Evans animations FMV, or something else -- and what should we call that something else?

  11. #11
    Wildside Expert bgvanbur's Avatar
    Join Date
    Jul 2011
    Location
    NY, USA
    Age
    39
    Posts
    199
    Rep Power
    22

    Default

    I think that subtitle thing is anomaly (assuming you are talking about Zeroigar on PC-FX, http://www.romhacking.net/forum/index.php?topic=20071.0).

    My partner elmer and I (with thanks to Esperknight) have fully subtitled all of the FMVs with hardsubs that work on real hardware, and there is zero quality lost in the image. This was possible for several reasons. The original video had 16 pixel tall black borders at the top and bottom. We essentially cropped off the top border, doubled the bottom border, and stuck the subtitles down there. Because the PC-FX's playback chip is JPEG based and can essentially display two JPEGs at once, and because there was enough bandwidth, we simply appended the subs to the original video as a separate video that plays at the same time. It looks quite nice, if I do say so myself.
    For subtitles on the Sega CD you could edit the frames and add them in that way which may affect video quality (and depending on the compression used may cause weird artifacts on the subtitles themselves), or the more difficult route would be to program them in. I am aware of no generic Sega CD codec that has special support for subtitles.

    For the SGA and cinepak formats, there are some tools out there to convert videos to something usable now. I looked into the Cobra Command and it's movies are some custom format so there is no ready made tool to convert that since the format needs to be reverse engineered first.

    The animations in Earnest Evans are a grey area. They achieve the affect of a FMV but do not use a streamed video. I think it depends on the context.

  12. #12
    Raging in the Streets goldenband's Avatar
    Join Date
    Dec 2009
    Posts
    4,636
    Rep Power
    102

    Default

    Hey, thanks for the detailed reply, bgvanbur!

    Quote Originally Posted by bgvanbur View Post
    I think that subtitle thing is anomaly (assuming you are talking about Zeroigar on PC-FX, http://www.romhacking.net/forum/index.php?topic=20071.0).
    That's exactly the one, and I thought I remembered that it depended on some quirk of the PC-FX. Alas.

    Quote Originally Posted by bgvanbur View Post
    For subtitles on the Sega CD you could edit the frames and add them in that way which may affect video quality (and depending on the compression used may cause weird artifacts on the subtitles themselves), or the more difficult route would be to program them in. I am aware of no generic Sega CD codec that has special support for subtitles.
    Forgive me if I'm asking this in a naive way, but -- do the FMV compression schemes used on Sega CD make use of the Genesis's hardware sprites at all? In other words, what graphical resources are left over after the FMV is rendered? I'm trying to get a sense of whether/in what circumstances a graphical subtitle layer using Genesis sprites would be feasible, whether it's superimposed on FMV or placed below a letterboxed video.

    Quote Originally Posted by bgvanbur View Post
    I looked into the Cobra Command and it's movies are some custom format so there is no ready made tool to convert that since the format needs to be reverse engineered first.
    Thanks for confirming that. I don't think the laserdisc version has the same "GAME OVER" sequence, and it's identical in the Mega CD release. It may seem like a silly thing to look into, but I really like the tune, and find it kind of appalling that they'd ship the game with an intentional hard cut in the audio.

    (BTW the PlayStation version uses the same graphic but without the tune; not sure about the Saturn.)

    Quote Originally Posted by bgvanbur View Post
    The animations in Earnest Evans are a grey area. They achieve the affect of a FMV but do not use a streamed video. I think it depends on the context.
    I'd love to know more about those quasi-FMVs in anime style (and the ones used in other, similar games), but don't want to derail Barone's thread. If I start a new thread about it, what terminology should I use?

  13. #13
    Wildside Expert bgvanbur's Avatar
    Join Date
    Jul 2011
    Location
    NY, USA
    Age
    39
    Posts
    199
    Rep Power
    22

    Default

    I determined the audio format of the video files. Here is all the audio from the videos on the disc (and a text file describing the format as far I have reverse engineered it). All the wolf team games use a similar format for the videos. I may do more work on this to fully document the format.
    https://dl.dropboxusercontent.com/u/26821164/cobra.zip

    To my knowledge most FMV did not use sprites (but sometimes use them for the user interface). And given that most FMV user interfaces aren't too sprite intense you should have plently of room for sprites in the sprite table. Since you might want more than 40 characters, you would have to have more than one chracter sprite requiring custom tile data for the sprites, so to have 40 characters that way would cost 2% of your VRAM (40 32-byte tiles and a few 8-byte sprite table entries), so might be hard to squeeze in on later videos that really pushed the video to large sizes that also have a border since most of the VRAM is already claimed.

  14. #14
    Raging in the Streets goldenband's Avatar
    Join Date
    Dec 2009
    Posts
    4,636
    Rep Power
    102

    Default

    ^This is awesome! What a great contribution to the community and to our Sega CD knowledge -- thanks so much for putting time into that.

    I'm disappointed to find out that the audio was indeed authored with an abrupt cutoff, but it's nice to know for sure. I guess I can only hope that there's some other obscure version of the game (FM Towns? anything?) that has it intact.

    I'll have to check some Japanese-exclusive games and see if there's any leftover VRAM while they're streaming FMV. Any recommendations on the best tools to do that?

  15. #15
    16-bits is all he needs Master of Shinobi matteus's Avatar
    Join Date
    Apr 2006
    Location
    UK
    Age
    39
    Posts
    2,450
    Rep Power
    66

    Default

    I'm not sure what method FMV on the MCD generally uses to show video. Are they using a scroll plan and double buffering the frames in different positions on the plan like I do?


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •