TASEmulators / TASEmulators/BizHawk
Alternate Sync causes FFmpeg dumping to crash for N64
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.8k
- Forks
- 468
- PR merge metrics
- No merged PRs in 30d
Description
Summary
Dumping N64 video while using the Alternate Sync option causes FFmpeg to crash shortly after starting the dump. I have tested this only with Star Wars Episode 1 Racer for the N64. I tested Pink Panther: Pinkadelic Pursuit for GBA, and the bug did not manifest for that core/game. I tried changing the throttling option to Audio Throttling (I think this setting is related somehow to what alternate sync does) but it did not change the crash.
Audio is broken without the Alternate Sync setting for this game - it is not a continuous audio stream but broken up and skips constantly.
Repro
- Load
Star Wars Episode I - Racer (U) [!] - Pause the emulator
- File > AVI/WAV > Config and Record
- Check Alternate Sync
- Choose FFmpeg writer and click OK
- Choose MP4 profile (the crash happens for any profile I choose)
- Choose a place to save the file
- Unpause the emulator
- Wait a moment (usually about 5 seconds for me)
Output
System.Exception: A/V Desync?
at BizHawk.Client.EmuHawk.NutMuxer.WriteAudioFrame(Int16[] samples)
at BizHawk.Client.EmuHawk.NutMuxer.Finish()
at BizHawk.Client.EmuHawk.FFmpegWriter.CloseFileSegment()
at BizHawk.Client.EmuHawk.FFmpegWriter.Dispose()
at BizHawk.Client.EmuHawk.MainForm.AbortAv()
at BizHawk.Client.EmuHawk.MainForm.AvFrameAdvance()
at BizHawk.Client.EmuHawk.MainForm.StepRunLoop_Core(Boolean force)
at BizHawk.Client.EmuHawk.MainForm.ProgramRunLoop()
at BizHawk.Client.EmuHawk.Program.SubMain(String[] args)


Host env.
- BizHawk 2.4.0; Win10 Home; Intel
- BizHawk 2.4.2; Win10 Home; Intel
- BizHawk 2.5.0; Win10 Home; Intel
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reported stack entry point, BizHawk.Client.EmuHawk.NutMuxer.WriteAudioFrame, and trace how FFmpegWriter.CloseFileSegment and MainForm.AbortAv handle the recording failure. Reproduce the listed N64 recording steps with Alternate Sync and verify that FFmpeg recording completes without the A/V Desync exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100