Post subject: Dumping AVI with Dolphin
Joined: 8/29/2005
Posts: 148
Location: Dayton, OH
This post could probably also go in the Dolphin forum, but I think it makes more sense here. I recently dumped the MM10 Bass run using Dolphin and thought it might be useful to post some insights/questions about dumping using Dolphin. I'm sure Grunt can give much further insight on these topics. You can see the settings I used when dumping here. The settings image files are: http://imageshack.us/photo/my-images/807/mm10dolphinsettings2.png/ http://imageshack.us/photo/my-images/810/mm10dolphinsettings1.png/ 1) I did as much as I could to get the highest quality. Ilari said that Grunt used a custom build of Dolphin to dump the other MM10 movie, so there might be other non-interface methods to improve quality? Are there any settings which can be standardized for dumping? Or will it vary from game to game? 2) Dump aspect ratio is weird in Dolphin 3.0. It was discussed in the chat the if Dolphin can output at HD resolution, we should use that instead of dumping and scaling up. However the only way I could get a higher res was to use fullscreen mode set to my desired resolution, and then tell the internal resolution to match the window size. If I could manually resize the window to the res I want, then I could have it dump correctly without fullscreen on. 3) The dumped audio file was longer than the dumped video file. I am unsure whether this is a Dolphin bug or just a result of the dump settings or something else entirely. It would be a real pain if every Dolphin encode requires fixing the audio. 4) While dumping the movie I opened one of the menus on Dolphin to check some settings. Apparently this broke something because then the message boxes for challenge achievements caused the screen to go black. Maybe it is best to not touch dolphin while it is dumping? Similar to how it is best to just restart dolphin after making config adjustments.
RachelB
She/Her
Player (127)
Joined: 12/3/2011
Posts: 1579
Not sure if you still care, or if you've already figured this out, but just in case, to dump in HD, you just need to set the internal res to whatever you need (2x for 720p, 3x for 1080p), turn off render to main window, and enable auto adjust window size. Unfortunately you cannot dump to your monitor's resolution like that, because the title bar will cause it to scale down slightly, but if you have a higher res monitor, or can otherwise hack it to scale larger than the monitor, it will work fine.
Joined: 8/29/2005
Posts: 148
Location: Dayton, OH
Yeah, I haven't tried it, but that seems correct. The bigger issue right now is that the audio from dumping is 3 seconds longer than the video.
RachelB
She/Her
Player (127)
Joined: 12/3/2011
Posts: 1579
Encoding The video at 59.941 fps should fix that. I guess it normally runs at that fps, but then dumps at 60, which causes the desync?
Joined: 8/29/2005
Posts: 148
Location: Dayton, OH
Hmm, an interesting idea. Up until now, my efforts have been on altering the audio. Do all Wii games run at 59.941? Where did you find that particular number?
RachelB
She/Her
Player (127)
Joined: 12/3/2011
Posts: 1579
ledauphinbenoit wrote:
Hmm, an interesting idea. Up until now, my efforts have been on altering the audio. Do all Wii games run at 59.941? Where did you find that particular number?
In virtual dub, under frame rate. But the ntsc standard is indeed 59.94, so it seems safe to say it is indeed the case.
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
The exact value for NTSC is 60/1.001, though some consoles might differ slightly. In Avisynth:
AVISource("source clip.avi")
AssumeFPS(60000, 1001)
Post subject: Audio sync
Joined: 3/18/2006
Posts: 971
Location: Great Britain
Dunno if this is what you mean, in the past, dolphin had a bug where audio wouldn't sync with video. This is caused because of loading screens. I think I used to delete the loading screen frames, or something, to compensate.
Joined: 8/29/2005
Posts: 148
Location: Dayton, OH
Yeah, I tried another test encode using AssumeFPS. It made the audio and video lengths match, but the audio still lagged behind over the course of the video.
Joined: 8/29/2005
Posts: 148
Location: Dayton, OH
Just to clarify, my problem has been that the audio is too long for the video. The audio dumped as 34:05 and the video dumped as 34:02. So yeah, deleting video frames wouldn't help in this case.
Active player (333)
Joined: 1/19/2010
Posts: 383
Location: Texas
rog wrote:
Not sure if you still care, or if you've already figured this out, but just in case, to dump in HD, you just need to set the internal res to whatever you need (2x for 720p, 3x for 1080p), turn off render to main window, and enable auto adjust window size. Unfortunately you cannot dump to your monitor's resolution like that, because the title bar will cause it to scale down slightly, but if you have a higher res monitor, or can otherwise hack it to scale larger than the monitor, it will work fine.
This doesn't work well with RE4. During pause screens, the window resolution changes (from 1280x720 to 1024x768). I'm using a 1080p monitor, so I know the image can fit. The 1024x768 resolution isn't too odd, since this is a standard window size, but why it changes in mid recording is weird. When in full screen however it works fine.
Editor, Experienced player (607)
Joined: 11/8/2010
Posts: 4012
ledauphinbenoit wrote:
Just to clarify, my problem has been that the audio is too long for the video. The audio dumped as 34:05 and the video dumped as 34:02. So yeah, deleting video frames wouldn't help in this case.
I was told on IRC that a dumped audio track has some extra frames of silence added to the beginning of the recording, as well as being too slow (it needs to be sped up by 10-20%).
Active player (333)
Joined: 1/19/2010
Posts: 383
Location: Texas
CoolKirby wrote:
ledauphinbenoit wrote:
Just to clarify, my problem has been that the audio is too long for the video. The audio dumped as 34:05 and the video dumped as 34:02. So yeah, deleting video frames wouldn't help in this case.
I was told on IRC that a dumped audio track has some extra frames of silence added to the beginning of the recording, as well as being too slow (it needs to be sped up by 10-20%).
Speeding it up won't fix it; it's because of load times. I can edit out the additional seconds every time there is a load screen, but during normal gameplay the audio syncs correctly. Btw, what is the best codec to use for dumping frames? I'm using the Microsoft Video 1 with 100% quality, but even then the quality is no where near what it should be, and has a very large file size (about 120MB per minute with 720p)
RachelB
She/Her
Player (127)
Joined: 12/3/2011
Posts: 1579
Lagarith works for lossless dumping, though the file size is huge. At 720p, i believe i was getting around 1-1.5 gb/min. I usually just dump straight to h264 though, which still looks great, and comes out to around 30-50 mb/min with a rate factor of 23. As far as audio goes, i just use the change so video and audio duration match option in vdub. It makes it sync, or at least close enough to sync, that i can't tell that it's off. It sets the frame rate to anywhere from 59.91 to the correct 59.94. I can only assume the inconsistency there means it's doing something wrong, but it's seems good enough.
Joined: 8/29/2005
Posts: 148
Location: Dayton, OH
I've tried doing some additional testing on this. I messed around with several different Dolphin configuration options, but the audio always seems to be longer than the video. Even if you are dumping only a single minute, the audio is several frames longer.
RachelB
She/Her
Player (127)
Joined: 12/3/2011
Posts: 1579
I think dolphin's audio dumper is just buggy. It's always off by a random amount for me. I've had times where it was shorter than the video even.
Editor, Experienced player (607)
Joined: 11/8/2010
Posts: 4012
I have the problem SoulCal is having: The audio syncs fine with the video until a loading screen comes up. Then the audio is ahead of the video. I had to edit the encode of my Prologue every time some kind of loading screen happened so that the audio would sync with the video again.
Guga
He/Him
Joined: 1/17/2012
Posts: 838
Location: Chile
Whenever I try to close Dolphin while is dumping, it crash and AVI file is unwatchable. Yes, MPC is unable to open it. Also, when I open the .iso, it says: "./User/GC/dsp_coef.bin has an incorrect hash. Would you like to stop now to fix the problem? If you select "No", audio will be garbled."
RachelB
She/Her
Player (127)
Joined: 12/3/2011
Posts: 1579
ThatGugaWhoPlay wrote:
Whenever I try to close Dolphin while is dumping, it crash and AVI file is unwatchable. Yes, MPC is unable to open it.
Try going into graphics settings and unchecking dump frames. Advancing a frame or two will then give you a message saying it stopped dumping to avi, and the avi will work even if dolphin crashes after that.
Also, when I open the .iso, it says: "./User/GC/dsp_coef.bin has an incorrect hash. Would you like to stop now to fix the problem? If you select "No", audio will be garbled."
What's the md5 of your dsp_coef.bin? it should be 9a6514b88003c9c47e334de654ec550b, if not, then redump it.
Emulator Coder, Skilled player (1140)
Joined: 5/1/2010
Posts: 1217
I was looking at the source to figure out how to get audio and video to sync up... I then tried to calculate the exact framerates used by Dolphin, and got the following (all should apply to both GC and Wii): NTSC progressive: 1,620,000/26,999 (60.0022223045297973999) fps. NTSC interlaced: 60,750,000/1,014,391 (59.8881496385516038687) fps. PAL60 progressive: 60/1 (60.0) fps. PAL60 interlaced: 18,750/313 (59.9041533546325878594) fps. PAL progressive: 50/1 (50.0) fps. PAL interlaced: 15,625/313 (49.9201277955271565495) fps. The interlaced rates are valid only if "Accurate VBeam emulation" is off (which causes +1 extra line per frame). If that option is on, the framerates should be the same as in progressive case. NTSC rates have been measured, PAL rates are speculative. Note: New dolphin revisions have different yet-to-be-determined framerates.