Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: .cmv player  (Read 10337 times)

Jifodus

  • Bay Watcher
  • Resident Lurker
    • View Profile
    • Dwarf Fortress Projects
.cmv player
« on: April 12, 2007, 12:06:00 am »

It was suggested that the movie recorder that Dwarf Fortress has, could be used for tutorials.  On pages 11 and 12 of the Future of the Fortress thread.  However it was mentioned that there is no way to control the speed/pause or rewind the movies.  So I figured I'd fill in the gap until Toady gets around to adding controls and other advanced features to movies and the movie player.  (There is an added advantage, you can now play the movies without having to load Dwarf Fortress, which takes about 30 seconds from clicking to playing.)

96kB  http://www.geocities.com/jifodus/CMVPlayer.zip  MD5: BFB1E2DCE5378EADEE9CBA5AE2280792 (Version 1.2.0.4)

P.S.  I'd post tutorials myself, except I usually abandon my fortress after the game crashes and I loose a lot of progress.  I've only once had a 5+ year fortress which I killed off by mining to the Adamantium.
P.P.S.  Since I am paranoid, I did run my program through  http://virusscan.jotti.org/  and nothing was found, but you still should be careful and check it yourself anyway.
P.P.P.S.  Please read the ReadMe.txt it has the currrent limitations and issues.  Most of those will go away when I get around to correcting them.  But I have other projects/assignments that I need to take care of first.  It took about 3 days, with about 3 weeks between the second and third day.
P.P.P.P.S.  Also, I only get 4.2MB of transfer an hour from geocities, and I'm too lazy to find some place else.  Another note, geocities might disable hot-linking on it so if it doesn't work, copy and paste the link into the address bar and it should work.

[ April 14, 2007: Message edited by: Jifodus ]

[ April 21, 2007: Message edited by: Jifodus ]

[ April 21, 2007: Message edited by: Jifodus ]

[ April 24, 2007: Message edited by: Jifodus ]

Logged

flap

  • Bay Watcher
    • View Profile
Re: .cmv player
« Reply #1 on: April 12, 2007, 04:31:00 am »

Thank you for that bit of software. Very usefull !

We should definitely set a utils page on the wiki, or a web site...

And is it something for which you would release the source code ? Or you plan to keep developping ?

Also apparently you have decoded the format of the movies... Can you provide some informations ?

Logged

flap

  • Bay Watcher
    • View Profile
Re: .cmv player
« Reply #2 on: April 12, 2007, 05:12:00 am »

I have added your link to this wiki page : http://dwarf.lendemaindeveille.com/index.php/Utils
Logged

TotalPigeon

  • Bay Watcher
    • View Profile
Re: .cmv player
« Reply #3 on: April 12, 2007, 01:33:00 pm »

Nice. The inefficiency is noted  ;)
Logged

JT

  • Bay Watcher
  • Explosively Canadian
    • View Profile
    • http://www.jtgibson.ca/df/
Re: .cmv player
« Reply #4 on: April 15, 2007, 05:26:00 pm »

We used to have a standalone CMV player which was distributed around before Dwarf Fortress was released in alpha -- I still have the set of introductory videos in my DF folder, but new videos don't work in the old player and the old videos don't work in the new player.

Maybe Toady can re-release his official CMV player, updated to the new file format, when the new version is put out?

Logged
"The very existence of flamethrowers proves that some time, somewhere, someone said to themselves, 'You know, I want to set those people over there on fire, but I'm just not close enough to get the job done.'" --George Carlin

Jifodus

  • Bay Watcher
  • Resident Lurker
    • View Profile
    • Dwarf Fortress Projects
Re: .cmv player
« Reply #5 on: April 15, 2007, 09:42:00 pm »

Can you send me the videos? Maybe I can add support to my player.

Btw, flap, do you check your PMs?

Logged

flap

  • Bay Watcher
    • View Profile
Re: .cmv player
« Reply #6 on: April 16, 2007, 02:23:00 am »

No.

If I find how to do that I will.

Logged

Spelguru

  • Bay Watcher
  • Rabid Swedish Person
    • View Profile
Re: .cmv player
« Reply #7 on: April 16, 2007, 02:40:00 am »

Click the My Profile button in the upper right corner.
Logged
Got Ninja?
Orkz Orkz Orkz Orkz, Orkz Orkz Orkz Orkz... WAAAAAGH!
NHP (Non human pact. Copy and paste if you are going to destroy all human-like creatures in spore.)

JT

  • Bay Watcher
  • Explosively Canadian
    • View Profile
    • http://www.jtgibson.ca/df/
Re: .cmv player
« Reply #8 on: April 20, 2007, 06:01:00 pm »

quote:
Originally posted by Jifodus:
<STRONG>Can you send me the videos? Maybe I can add support to my player.</STRONG>

http://www.jtgibson.ca/df/dwarffortress1-5.zip  (8,097,076 bytes)
http://www.jtgibson.ca/df/dwarffortress6-10.zip  (9,100,832 bytes)
http://www.jtgibson.ca/df/dwarffortress11-15.zip  (13,398,885 bytes)
http://www.jtgibson.ca/df/dwarffortress16-20.zip  (13,243,756 bytes)
http://www.jtgibson.ca/df/dwarffortress21-25.zip  (11,429,529 bytes)
http://www.jtgibson.ca/df/movieview.exe  (122,880 bytes)

[ April 20, 2007: Message edited by: JT ]

Logged
"The very existence of flamethrowers proves that some time, somewhere, someone said to themselves, 'You know, I want to set those people over there on fire, but I'm just not close enough to get the job done.'" --George Carlin

Jifodus

  • Bay Watcher
  • Resident Lurker
    • View Profile
    • Dwarf Fortress Projects
Re: .cmv player
« Reply #9 on: April 21, 2007, 12:18:00 am »

I modified my code to handle those old movies.  It wasn't actually much different from the current files.  The old movies didn't have the sound information.

(Same Link As In First Post)

Logged

JT

  • Bay Watcher
  • Explosively Canadian
    • View Profile
    • http://www.jtgibson.ca/df/
Re: .cmv player
« Reply #10 on: April 21, 2007, 01:48:00 am »

I just gave this a whirl.  As soon as any movie hits the 10,000th frame, the frame counter on top turns into garbage characters and the movies stop playing... =)
Logged
"The very existence of flamethrowers proves that some time, somewhere, someone said to themselves, 'You know, I want to set those people over there on fire, but I'm just not close enough to get the job done.'" --George Carlin

Jifodus

  • Bay Watcher
  • Resident Lurker
    • View Profile
    • Dwarf Fortress Projects
Re: .cmv player
« Reply #11 on: April 21, 2007, 03:31:00 pm »

Thanks, fixed. It was a... um... a Windows problem, because of a memory leak involving GDI objects. I didn't catch this because, it would only show up if you didn't fast-forward the clip (as I tended to do during normal testing).

(Same Link As In First Post)

Logged

JT

  • Bay Watcher
  • Explosively Canadian
    • View Profile
    • http://www.jtgibson.ca/df/
Re: .cmv player
« Reply #12 on: April 21, 2007, 06:41:00 pm »

Looking good so far!  Is there any way to make the player save the playback speed I last used (both for when you load the program and hit play as well as for when you hit pause and then hit play again)?  On my overclocked Athlon 3200+ I have to reduce it to near 1/12 to get things flowing at a normal speed, and it's a lot of right-clicking on the Next Frame button to get it down to there every time I pause the movie.

[edit]Also, the CMV Player seems to use as much CPU as possible, especially when paused.  When paused, is the program actually just looping through a do-nothing loop infinitely until the player makes a command, or does it make use of an event timer?  I notice that whenever I pause the movie, my CPU fan (ordinarily quite quiet) starts spinning faster and faster in response to the perceived load.

[ April 21, 2007: Message edited by: JT ]

Logged
"The very existence of flamethrowers proves that some time, somewhere, someone said to themselves, 'You know, I want to set those people over there on fire, but I'm just not close enough to get the job done.'" --George Carlin

Jifodus

  • Bay Watcher
  • Resident Lurker
    • View Profile
    • Dwarf Fortress Projects
Re: .cmv player
« Reply #13 on: April 21, 2007, 08:16:00 pm »

quote:
Originally posted by JT:
<STRONG>[edit]Also, the CMV Player seems to use as much CPU as possible, especially when paused.  When paused, is the program actually just looping through a do-nothing loop infinitely until the player makes a command, or does it make use of an event timer?  I notice that whenever I pause the movie, my CPU fan (ordinarily quite quiet) starts spinning faster and faster in response to the perceived load.</STRONG>

Yes. I do use a do nothing loop. Though I'm eventually gonna use timers to do the partial speed playback, and use GetMessage instead of PeekMessage when it's paused (zero/near zero usage then).  But first I have to time the frame rate so the partial speed actually makes sense.  I also find that-needing-to-get-down-to-1/8-to-actually-be-able-to-see-what-is-going-on annoying too.  ;)

Logged

flap

  • Bay Watcher
    • View Profile
Re: .cmv player
« Reply #14 on: May 16, 2007, 03:14:00 am »

You can easilly reduce that "do nothing" loop CPU usage. Just include a "sleep(100);" in the loop. Your application will pause 100 ms between each loop. (you will need to include "time.h" if you use C/C++)

EDIT : The latest version seem older than your last post. So you might have solved that issue already. If so, sorry for the inaccurate advice.

With the new movie released by Toady, I have a suggestion ! (But I don't thnik that it would be new...) :
-Go forwars/backward 10 by 10, 100 by 100, 1000 by 1000 frames.

[ May 16, 2007: Message edited by: flap ]

Logged
Pages: [1] 2