Post subject: AVI records over 4GB become corrupt?
Joined: 7/6/2007
Posts: 4
Heyo everybody! Was just doing some AVI records today with the latest Mupen64-rerecording, and as soon as my file became more than 4GB, the contents became corrupt, leaving only the last 4GB of the file working. Not exactly sure why this is happening, since the video shows the proper length but it's unwatchable except for the last 4GB. This has happened using both uncompressed and huffyuv (lossless). I want it lossless so I can transcode later on. No issues with audio or desync - but I'm not running windows vista - XP SP2 BTW. So anyone have any ideas on this issue?
Emulator Coder
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
AVI doesn't support files over 4GB, not without crazy hacks anyway.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Joined: 7/6/2007
Posts: 4
Hmm... I'll have to take a look at why virtualvcr seems to be able to then. Maybe I'm confusing myself and I used a different container with virtualvcr. Is there any way to get Mupen64 to record to a different container? Like I said, I'd like to capture lossless and transcode later. EDIT - Actually, I've found that using OpenDML the 4GB limitation can be overcome. I take it that Mupen64 doesn't support OpenDML. Perhaps segmenting into multiple files could help?
Joined: 3/1/2005
Posts: 46
bonnerus wrote:
EDIT - Actually, I've found that using OpenDML the 4GB limitation can be overcome. I take it that Mupen64 doesn't support OpenDML. Perhaps segmenting into multiple files could help?
As far as I know, none of the TASvideos emulators support OpenDML. File splitting is the easiest way to get around it, but it's only implemented in FCEU and SNES9x.
Joined: 11/11/2006
Posts: 1235
Location: United Kingdom
Its also implemented in Gens, which splits the AVIs into 2gb segments.
<adelikat> I am annoyed at my irc statements ending up in forums & sigs
Joined: 7/6/2007
Posts: 4
Wow, this makes it fairly hard to actually do a long gameplay recording. Say you have 100 minutes that you'd like to do a recording of - but even though you might be compressing the video fairly heavily, the audio is dumped uncompressed. 100 minutes of uncompressed audio will take up about 8.4GB which already exceeds the 4GB AVI limitation. I'm quite interested in how DeHackEd did the AVI of Rikku's excellent 120 star run on Mario 64 (movie #850) which is about 100 minutes.
Emulator Coder
Joined: 3/9/2004
Posts: 4588
Location: In his lab studying psychology to find new ways to torture TASers and forumers
bonnerus wrote:
I'm quite interested in how DeHackEd did the AVI of Rikku's excellent 120 star run on Mario 64 (movie #850) which is about 100 minutes.
DeHackEd uses a pipe to MEncoder, thus no crazy huge AVIs.
Warning: Opinions expressed by Nach or others in this post do not necessarily reflect the views, opinions, or position of Nach himself on the matter(s) being discussed therein.
Joined: 7/6/2007
Posts: 4
Thanks for that Nich, I've now got it working by using a screen capture driver with virtualdub. It's not the most efficient solution, but it does work.
Emulator Coder, Site Developer, Former player
Joined: 11/6/2004
Posts: 833
Actually, mencoder's AVI support does allow exceeding the 4 GB limit. As I understand it, AVI is a chunked file format where each chunk is unable to exceed 4 GB. Mencoder starts new chunks every <1 GB so it can just keep going. 40 GB AVIs are possible. Apparently mupen64 does not support this feature and simply produces 1 chunk. If it exceeds the size limit, it's broken. That said, for anything but really long mupen64 movies, I have mencoder skip straight to the final AVI and not bother with a multi-gigabyte intermediate. The OpenGL plugins perform screen captures by basically pressing PrintScreen and then cropping the resulting image. Thus the video must be always on top, and that's a big waste of screen space. I'd rather do it once and still be able to use my computer during the heavy work. Snes9x, FCEU, Gens, etc. don't have this restriction. Must be 3d acceleration related.
Active player (410)
Joined: 3/16/2004
Posts: 2623
Location: America, Québec
Andy Olivera wrote:
File splitting is the easiest way to get around it, but it's only implemented in FCEU and SNES9x.
Are you sure? I don't remember file splitting in FCEU and Snes9x. But do remember it exists in Gens.
Joined: 3/1/2005
Posts: 46
Phil wrote:
Are you sure? I don't remember file splitting in FCEU and Snes9x. But do remember it exists in Gens.
Definitely. I helped add it to FCEU(starting around v98.15, I believe). Not sure when it was added to SNES9x, but it's definitely there. Creating an AVI from the FF3 run would've been a pain without it. As to Gens, I haven't upgraded in awhile("about" lists TEST10WIP), so it wouldn't surprise me if I was wrong here...
Joined: 3/1/2005
Posts: 46
DeHackEd wrote:
The OpenGL plugins perform screen captures by basically pressing PrintScreen and then cropping the resulting image. Thus the video must be always on top, and that's a big waste of screen space. I'd rather do it once and still be able to use my computer during the heavy work. Snes9x, FCEU, Gens, etc. don't have this restriction. Must be 3d acceleration related.
The way I understand it, the frame is drawn by the plugin. Since the AVI routines can't access whatever video buffer the plugin is using, the only option is to capture the frame after it's been displayed. The fault belongs with the whole "plugin" fad(probably the worst idea ever to hit the emulation scene)...