Skip to content

MKV muxing generates audio crackles in macOS 11.3+ QuickTime Player #4740

Open

Description

@PoC22

Operating System Info

macOS 11.3

Other OS

No response

OBS Studio Version

Other

OBS Studio Version (Other)

Mac 27.0 RC 4 & RC5

OBS Studio Log URL

http://obsproject.com/

OBS Studio Crash Log URL

No response

Expected Behavior

Clear audio on recording.

Current Behavior

When using the Mux facility from MKV to MP4 format crackling in the audio is introduced.

Using .MOV as the recording format OR using another program to change from MKV to MP4 (e.g. FFMPEG) circumvents this audio issue.

In essence: The muxing facility is borked in Mac OBS Studio 27.0 RC 4.

Steps to Reproduce

  1. Mux in 27.0 RC 4 AND 5

...

Anything else we should know?

MacBook Air M1

Activity

  1. changed the title [-]MKV muxing generates audio crackles in 27.0 RC 4[/-] [+]MKV muxing generates audio crackles in 27.0 RC 5[/+] on May 21, 2021
  2. asher-the-thrasher commented on May 21, 2021

    @asher-the-thrasher

    Does it occur on 26.1.2 as well?

  3. PoC22 commented on May 21, 2021

    @PoC22
    Author

    No.

  4. WizardCM commented on May 29, 2021

    @WizardCM
    Member

    We did not touch FFmpeg in this update. What video players have you noticed this issue in? Please test with VLC. I believe there's a known issue in QuickTime Player where audio doesn't sound correct?

  5. PoC22 commented on May 29, 2021

    @PoC22
    Author

    VLC playback of MKV file in VLC is fine.

    Muxing MKV with FFMPEG to convert to .MP4 and playing the result with QuickTime is fine.

    OBS Studio Muxing of MKV to MP4 and playing in QuickTime is not fine.

    Playing MKV muxed by OBS Studio to MP4 in VLC is fine (so you may be right).

    That seems to be the permutations.

  6. WizardCM commented on May 29, 2021

    @WizardCM
    Member

    I believe it's a bug that was introduced in macOS 11.3, and might've been fixed in 11.4.

  7. PoC22 commented on May 29, 2021

    @PoC22
    Author

    If it is, it's not fixed in 11.4.

  8. PoC22 commented on May 29, 2021

    @PoC22
    Author

    Either way Muxing the MKV from OBS Studio to MP4 using FFMPEG as a separate program fixes the issue in QuickTime, so something's up somewhere in the chain.

  9. WizardCM commented on May 29, 2021

    @WizardCM
    Member

    It's possible that it's a bug in ffmpeg that was exposed in macOS 11.3 and might be fixed in a newer version of FFmpeg.

  10. WizardCM commented on May 29, 2021

    @WizardCM
    Member

    It looks like we previously closed this issue in #4626. It's either something we can fix with an ffmpeg update, or it's out of our control & needs to be fixed by Apple.

  11. PoC22 commented on May 29, 2021

    @PoC22
    Author

    Where does OBS Studio draw its FFMPEG routine from?

    Again the OBS Studio mux conversion causes the issue (with QuickTime playback) but an independent FFMPEG library that I use as part of a another program, does not.

  12. PoC22 commented on May 29, 2021

    @PoC22
    Author

    I use FFMPEG 4.4. built for Apple Silicon and that version works fine for independent muxing and playing back in QuickTime.

  13. changed the title [-]MKV muxing generates audio crackles in 27.0 RC 5[/-] [+]MKV muxing generates audio crackles in macOS 11.3+ QuickTime Player[/+] on May 30, 2021
  14. bodote commented on Jun 3, 2021

    @bodote

    downgrading to 26.1.2 does not help either for me

  15. dtest commented on Jun 17, 2021

    @dtest

    I have the same issue, and added some additional things I've tested with in this thread.

    But the relevant bits:

    • Apple MBP Big Sur 10.4
    • OBS 27.0.1
    • Microphone: Shure MV5 (directly USB attached)
    • OBS-recorded Shure MV5 audio results in crackling audio of the mp4. ~This converted MP4 is rejected when trying to import into Camtasia, which I take to mean the file is corrupted. ~
    • If I use Handbrake to convert the mkv file, QuickTime plays without audio crackles. But Camtasia still refuses to import the file.
    • OBS-recorded built-in laptop mic does not result in crackling audio. And this converted MP4 can be successfully imported into Camtasia.
    • I also have a Windows computer that I tested the direct-attached MV5 mic with OBS 27.0.1, and it works fine.
    • I did try downgrading to 26.1, 26.0 and 25.0. All versions result in the same crackling.

    I'm happy to provide more info on my testing if it helps, just need suggestions. My next thing to try is to test converting with ffmpeg directly, once I figure out how to do that!

  16. dtest commented on Jun 17, 2021

    @dtest

    I have to retract the comments about Camtasia. It appears it was some issue with drag/dropping the mp4 that causes it to process/disappear. I've got that sorted now.

    So the end result is my mic has audio crackling in QuickTime player when using OBS remux. I can use handbrake or ffmpeg (from homebrew) to get it converted without crackling.

  17. PatTheMav commented on Jun 27, 2021

    @PatTheMav
    Member

    First of all I can confirm that this is an issue specifically when remuxing MKV files - when using .ts (which Quicktime can play natively) and remuxing that file to .mp4 there are no issues.

    I confirmed this twice by taking said .ts recording, remuxing it to .mkv using ffmpeg 4.4 on the command line, then remuxing it to .mp4 using OBS. It is only then that the crackling audio is introduced.

    I'll re-build obs-deps using FFmpeg 4.4 (alas we cannot use that version for production because it introduced a HLS-related bug circa around 4.3) to check if it is actually fixed by updating FFmpeg.

  18. PatTheMav commented on Jun 27, 2021

    @PatTheMav
    Member

    Can confirm that the issue is not fixed by updating FFmpeg to 4.4 as part of obs-deps, the problem persists. Muxing the .mkv recording to .mp4 still exhibits the audio distortions when using OBS, there are no issues when doing the same with FFmpeg 4.4 on the command line.

    As it is, I'm afraid this seems more like an implementation error of FFmpeg within OBS, specifically when handling mkv files.

  19. added
    issue/confirmed
    platform/macos
    on Jun 27, 2021
  20. RytoEX commented on Oct 8, 2022

    @RytoEX
    Member

    Using .MOV as the recording format OR using another program to change from MKV to MP4 (e.g. FFMPEG) circumvents this audio issue.

    I use FFMPEG 4.4. built for Apple Silicon and that version works fine for independent muxing and playing back in QuickTime.
    @PoC22
    How did you use FFmpeg to change from MKV to MP4? What was the command syntax used?

    Again the OBS Studio mux conversion causes the issue (with QuickTime playback) but an independent FFMPEG library that I use as part of a another program, does not.

    What program did you use? I ask this in the same vein as above, to ascertain whether you simply remuxed or actually re-encoded the file.

    • If I use Handbrake to convert the mkv file, QuickTime plays without audio crackles.

    @dtest
    Handbrake would re-encode the file, so it is not the same as simply remuxing.

  21. Piipperi commented on Aug 2, 2023

    @Piipperi

    Chiming in, while I don't get audio cracking in QuickTime, I get it in Final Cut Pro. One workaround that seems to work nicely is to FFmpeg the audio from the original clip as ALAC (for example), then Compound Clip the remuxed file (with the audio muted) and the new audio file.

    I do really wish for OBS to just get their act together with this though.

  22. PatTheMav commented on Aug 2, 2023

    @PatTheMav
    Member

    I just tried to reproduce it to no avail:

    • HEVC-based MKV recording, remuxed to MP4: No issues in QuickView, QuickTime, or Final Cut
    • H264-based MKV recording, remuxed to MP4: No issues in QuickView, QuickTime, or Final Cut

    I did notice that the remuxed recordings seem to inherit a fractional framerate however (which is to be expected because MKV is weird in that regard). Recording straight to MP4 yields proper 60fps in Final Cut Pro, the remuxed recordings are detected as having 58.82 fps.

    I do really wish for OBS to just get their act together with this though.

    OBS is developed and maintained mostly by volunteer contributors who spend a considerable amount of time and care on its continued development. As OBS is open source, you are very welcome to check out the source code yourself and debug the issue, which would be especially helpful as you still seem to be able to reproduce it.

  23. DaiAoMori commented on Jan 11, 2026

    @DaiAoMori

    I recently figured why my audio is bad in FinalCut - it's not my cheap audio stack, it's the remuxing :(

    The issue here seems to be a combination of FinalCut's way of dealing with a variable frame rate and audio sync.

    Seemingly, Finalcut tries to match the source frame rate to the project frame rate, and due to the audio block timing being "tied" to the video, the audio is shifted around when the frames are, too. Finalcut doesn't seem to use a very good algorithm for this, thus creating the crackling noises.

    It sure thing has something to do with how the remuxing handles the variable frame rate; I have no deeper insights, but it speaks volumes that it all works fine when command line ffmpeg is used to remux the mkv file to mp4, same as using handbrake (at least that's what I read - I only exported the audio using ffmpeg as aiff and added that to FC)

    The main issue fixing this is that we have literally no clue why finalcut behaves this way, while e.g. VLC plays back the remuxed MP4 just fine; likely, the decoder in VLC just syncs the video frames to the audio clock, while FinalCut will (I guess) map the video frames to the project frame clock, and then adjust audio to the video.

    Now that I am thinking about it: the audio retiming in FinalCut is really bad, and known to produce audio artifacts...

    It is totally sufficient to just export the audio as AIFF and load it separately with the original remuxed video into a compound clip. In case of a high amount of video frame drops this might lead to timing issues, but due to final cut now handling the audio and video independently, the binary identical (!) audio now renders just fine, even with the original video file that has the crackling audio track.

    I have no clear angle on what to look at to fix this; somehow, the remuxing leaves something in the video frame timing that FinalCut really doesn't like.

    I might do some more tests with remuxing using ffmpeg on the cli...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedplatform/macos

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions