zraw - rawvideo.bin to AVI

General area for talk about ZSNES. The best place to ask for related questions as well as troubleshooting.

Moderator: ZSNES Mods

RealmRPGer
Rookie
Posts: 35
Joined: Thu Jul 13, 2006 2:41 pm

zraw - rawvideo.bin to AVI

Post by RealmRPGer »

Okay, so, some of you may remember me asking about saving the rawvideo.bin files to an uncompressed avi format. Nothing worked out, so I ended up writing a program to do it. It should also support most/all encoders you have, since it uses the standard dialog seen in standard applications.

Note that this is a very very early and sloppy version, but it gets the job done.

zsnes seems to dump a "junk" frame, so you can select not to load that one in the options dialog.
edit: The junk frame actually appears to be from the save state load.

The only other thing you can do is set what frame to start the avi at(currently it always runs to the end).

Anyway, try it out, give me your comments / suggestions.

Thanks.

http://files.realmprotectors.com/zraw.exe
Last edited by RealmRPGer on Sun Jul 30, 2006 9:01 pm, edited 1 time in total.
paulguy
Zealot
Posts: 1076
Joined: Sat Jul 02, 2005 2:01 am
Contact:

Post by paulguy »

doesn't zsnes already interface with mencoder to encode it?
snkcube
Hero of Time
Posts: 2646
Joined: Fri Jul 30, 2004 2:49 am
Location: In front of the monitor
Contact:

Post by snkcube »

paulguy wrote:doesn't zsnes already interface with mencoder to encode it?
Yes it does...
Try out CCleaner and other free software at Piriform
Image
RealmRPGer
Rookie
Posts: 35
Joined: Thu Jul 13, 2006 2:41 pm

Post by RealmRPGer »

Yes, but afaik it doesn't have as many encoding options, and a lot of them (such as the "raw" / uncompressed mode) doesn't work typical movie players. Hence why I created this program.
Poobah
Lurker
Posts: 164
Joined: Sun Sep 25, 2005 12:59 pm

Post by Poobah »

Perhaps you could see if the devs could implement some of your ideas into ZSNES.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Poobah wrote:Perhaps you could see if the devs could implement some of your ideas into ZSNES.
Do I have to say it again?

It is not possible to make a raw AVI all movie players will use.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
RealmRPGer
Rookie
Posts: 35
Joined: Thu Jul 13, 2006 2:41 pm

Post by RealmRPGer »

Maybe not, but it is very possible to make one that the grand majority does. ;D

Unfortunately to say, this is not currently the case with ZSNES/MEncoder. =/

I WOULD like to see if I could optimize this program to run on-the-fly like MEncoder does. How does ZSNES pass it the raw video file? I mean, it doesn't know the length of the movie at the start, does it?
paulguy
Zealot
Posts: 1076
Joined: Sat Jul 02, 2005 2:01 am
Contact:

Post by paulguy »

yeah im a bit curois how it sends it over in windows. I could see inlinux with a pipe since that's all through memory but not in windows where it'd make a tempfile also it wouldn't actually encode anything until you close zsnes.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

RealmRPGer wrote:Maybe not, but it is very possible to make one that the grand majority does. ;D
Yes, I could do that and it would be a pain in the neck. I tried doing that before I thought of using MEncoder, and I can tell you, it's just not worth it.
RealmRPGer wrote: Unfortunately to say, this is not currently the case with ZSNES/MEncoder. =/
ZSNES/MEncoder produced videos work everywhere with the right codecs. But that is not raw.
RealmRPGer wrote: How does ZSNES pass it the raw video file?
Via stdin.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
RealmRPGer
Rookie
Posts: 35
Joined: Thu Jul 13, 2006 2:41 pm

Post by RealmRPGer »

Yes, I could do that and it would be a pain in the neck. I tried doing that before I thought of using MEncoder, and I can tell you, it's just not worth it.
Hence why I created zraw
Via stdin.
If it is passed via stdin, then how does Mencoder know the % completed?
OutrightOwnage
Rookie
Posts: 11
Joined: Sun Jul 30, 2006 3:50 am

Post by OutrightOwnage »

um doesnt zsnes know how long the movie is? maybe it sends a header or something to mencoder.

but i know next to nothing about that stuff so maybe not
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

RealmRPGer wrote:
Yes, I could do that and it would be a pain in the neck. I tried doing that before I thought of using MEncoder, and I can tell you, it's just not worth it.
Hence why I created zraw
I highly doubt your zraw does as much as needed.
RealmRPGer wrote:
Via stdin.
If it is passed via stdin, then how does Mencoder know the % completed?
It doesn't.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
RealmRPGer
Rookie
Posts: 35
Joined: Thu Jul 13, 2006 2:41 pm

Post by RealmRPGer »

Nach wrote: I highly doubt your zraw does as much as needed.
Well, try it out and you tell me. =p
Nach wrote: It doesn't.
Hrmmmm... Oh, I thought MEncoder displayed a percentage...Guess not.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

RealmRPGer wrote:
Nach wrote: I highly doubt your zraw does as much as needed.
Well, try it out and you tell me. =p
Got source?

And unless you're going to spend hours reading docs all over the web, hex analyze many existing AVIs made with all sorts of programs, and testing with dozens of applications, I don't see how it's possible you even remotely have any large level of compatibility.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
RealmRPGer
Rookie
Posts: 35
Joined: Thu Jul 13, 2006 2:41 pm

Post by RealmRPGer »

As I stated in the original post, the program uses the default encoding utility. That is, it uses the one contained in avifil32.dll. Use the program and the popup window of encoder selections should seem familiar to you (if you're a windows user, of course). This is the standard that most programs use, thus it should be the most compatible one, and the standard Windows movie players go by.

Oh, and, I don't know if it's you trying to be defensive, offensive, or it's just your normal demeanor, but if it's anything other than the latter, I don't mean to be causing you trouble. I had a problem, and this turned out to be the best / easiest solution (for me, anyway).
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

RealmRPGer, Nach's questiong on your app hinges on what it actually does internally... hence he is asking for the source. What may work for media players for Windows may/may not work for those in Linux and vice versa... basically there really needs to be some useful analysis to be done before you say "this works better than what is currently used".
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Okay so it just uses VFW. I can assure you that VFW produced raw AVIs work nicely in other VFW apps, but fail in many other places.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
RealmRPGer
Rookie
Posts: 35
Joined: Thu Jul 13, 2006 2:41 pm

Post by RealmRPGer »

Deathlike2 wrote:RealmRPGer, Nach's questiong on your app hinges on what it actually does internally... hence he is asking for the source. What may work for media players for Windows may/may not work for those in Linux and vice versa... basically there really needs to be some useful analysis to be done before you say "this works better than what is currently used".
Well, I know it's windows only. It uses the windows dll. And I never said that it works better than what is currently used. It doesn't even work in the same manner as the MEncoder encoding. What I did say was that MEncoder wasn't working for me, so I did this, and it DOES work for me, so see if it works for you too. At no point was I saying or trying to say that my program is "better" or that it's really awesome and you have to use it because it's so cool. I see it as a second option if MEncoder isn't working for you and you're using Windows.

Anyway, if you want the source, I can put something together. It's made in C# (I wanted to make something quick and dirty), and is probably dependant on Visual Studio 2005.
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

The ironic thing is that mencoder works just fine for me (but I haven't used it for your specific task). I have no idea why you won't use any of the compression formats.. but the convienence the current system already provides is already awesome.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
Que
saskatchewanite
Posts: 195
Joined: Wed Apr 26, 2006 8:22 pm

Post by Que »

Nach wrote:
Poobah wrote:Perhaps you could see if the devs could implement some of your ideas into ZSNES.
Do I have to say it again?

It is not possible to make a raw AVI all movie players will use.
Could you dump mpeg/2/4? That would be supported by the greater majority of everything.
everything i say is a lie
the above line is true
RealmRPGer
Rookie
Posts: 35
Joined: Thu Jul 13, 2006 2:41 pm

Post by RealmRPGer »

Could you dump mpeg/2/4? That would be supported by the greater majority of everything.
I believe it's only an avi saver. Since I primarily created the program for my own use, it's unlikely I'd add mpeg support unless there was another dll I could use.
I have no idea why you won't use any of the compression formats..
I'm using the movies to sprite rip ( http://www.kurokastle.net/SBL/thread.ph ... bb3&page=1 ) and so I need an uncompressed or lossless format. FFV1 or XVid or whatever that was supposed to be lossless had technical imperfections that were unfitting for proper sprite ripping, and the format MEncoder churned out for uncompressed movies wasn't readable by any of my animation programs. That's why I created zraw.
Deathlike2
ZSNES Developer
ZSNES Developer
Posts: 6747
Joined: Tue Dec 28, 2004 6:47 am

Post by Deathlike2 »

I'm pretty sure you can do sprite ripping with other options that don't involve the movie format... it's been discussed before IIRC. VSnes is what you need.
Continuing [url=http://slickproductions.org/forum/index.php?board=13.0]FF4[/url] Research...
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

Que wrote: Could you dump mpeg/2/4? That would be supported by the greater majority of everything.
XviD and x264 are both MPEG4 streams.
However I can look into outputting an MPEG container video, I believe mencoder has an option for that.
RealmRPGer wrote:and the format MEncoder churned out for uncompressed movies wasn't readable by any of my animation programs. That's why I created zraw.
We don't have ZSNES use MEncoder for the uncompressed options.
However if you edit zmovie.cfg to have MEncoder output uncompressed AVIs, it's going to use RGB0x18 as it's 4CC which isn't liked by VFW. You can however change that to 0x00000000 which is liked by VFW, but then all VFW applications will display the video upside down.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
RealmRPGer
Rookie
Posts: 35
Joined: Thu Jul 13, 2006 2:41 pm

Post by RealmRPGer »

Actually, I couldn't figure out how to get it to output 0x000000 as the fourcc option takes a string, and the ascii character representing 0x00 is non-printable.

Oh, and I took a quick look at vSNES, and I don't see how it's supposed to suit my sprite ripping needs. If you followed the links I gave, you'd see that my rips are animated sprites that are also exact frame captures, meaning the number of frames for each, er, frame of animation is exactly the same as it is in the game. This is the kind of sprite ripping that I need.
Nach
ZSNES Developer
ZSNES Developer
Posts: 3904
Joined: Tue Jul 27, 2004 10:54 pm
Location: Solar powered park bench
Contact:

Post by Nach »

RealmRPGer wrote:Actually, I couldn't figure out how to get it to output 0x000000 as the fourcc option takes a string, and the ascii character representing 0x00 is non-printable.
Use a hex editor.
May 9 2007 - NSRT 3.4, now with lots of hashing and even more accurate information! Go download it.
_____________
Insane Coding
Post Reply