Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 23rd October 2011, 04:59   #1  |  Link
Robert Martens
Registered User
 
Join Date: Feb 2010
Location: New York
Posts: 116
CMVSource 1.0.0 - Load Dwarf Fortress movies in Avisynth

CMVSource 1.0.0

Loads Dwarf Fortress CMV and CCMV movies. Requires a tileset and colors file, either from a Dwarf Fortress installation or custom files you specify. Outputs RGB32; I'd strongly recommend PointResize if you need to resize these clips. CMVSource should be safe to use with MT mode 1, as the (C)CMV file format doesn't require sequential frame access.

A collection of player-made DF recordings can be found in the movies section of the Dwarf Fortress Map Archive: http://mkv25.net/dfma/browsemovies.php The CCMV files you can download from that site are supported by CMVSource, and the Flash player seen there will give you an idea of what these files will look like in Avisynth (though by default my plugin uses the fullscreen DF tileset, where the DFMA uses the windowed version).


Using the experience gained developing my first plugin, TurnsTile, and again taking inspiration from DF, I've worked up my first source filter. I don't know how many people here, if any, play the game, but if you want to encode in-game movie recordings without using Fraps, Camtasia, or similar screen recording software, here you go.

Developing a source filter, as opposed to a regular processing filter, wasn't nearly as scary as I thought it'd be. Derive from IClip instead of GenericVideoFilter, fill out a VideoInfo, implement all of the methods instead of just overriding the ones you need, and that's it. This whole thing has been quite a learning experience: coming to grips with version control (namely Git, which is now my hammer in search of nails), unit testing, multiple projects in one VC solution, dependencies, build automation, zlib decompression, it's been tremendously eye opening, and hopefully the collection of things I've included in the package is as useful to others as I hope it'll be. I've gained so much confidence through all of this, in fact, that I'm starting at version 1.0.0 right away this time. With any luck that won't blow up in my face.

The unit testing mentioned involved writing a barebones executable, using Boost's test framework, that links to Avisynth; I've included avisynth.lib in the archive, and made it clear that the Avisynth source can be downloaded from my site in the same place as the plugin itself, so I believe I'm complying with the GPL here. Including the full Avisynth source directly in the plugin zip seemed a bit over the top, making the ~800KB file closer to 3MB, so I went with the side-by-side distribution. I hope that's acceptable, I always find the legal aspects of this the most frightening.

Efficient alpha blending is one thing that's dogging me at the moment. I've dug through Layer, I've found countless articles across the internet, I've seen Avery Lee's SIMD-free approach, but cheats or not I can't get anything that runs faster than what I'm using now. I even started in on some MMX work, and though I found handwritten assembly loops addictive, initial tests show me that performance gains will require far more understanding of the subject than I currently possess (the assembly listing from MSBuild shows it replacing divisions with multiplication, addition, subtraction, and bit shifts, even without me using power-of-two values, and I've yet to understand how that's possible), and the plugin as it stands works, so I think a first release is called for. I'll keep digging through MMX, SSE, and every other instruction set I can find privately, but until such time as I can get it to provide a real benefit I'll keep my Frankensteinian experiments to myself.

Last edited by Robert Martens; 26th October 2011 at 19:47.
Robert Martens is offline   Reply With Quote
Reply

Tags
ccmv, cmv, dwarf, fortress

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:41.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.