Skip to content

Duplicate FFmpegkit in pre-release branch #208

Open

Description

@SleepyPrince

Describe the bug

I was exploring a fix for hide tab label not working on newer version of YouTube and stumble on your pre-release branch.
I was able to build it through github actions but when trying to sideload it with sideloadly, I got the following error.

Sideloading failed!
Install failed: Guru Meditation  Failed to process app binary (code -69): SignBinary(Payload/YouTube.app/YouTube): macho sign/edit failed (-19): Payload/YouTube.app/YouTube

I uploaded my build to ChatGPT to analyze and it seems that a duplicate set of FFmpegKit was included thus causing the Mach-O load-command area to overflow. I know only very little about iOS development so I won't be submitting a PR, please take a look at this branch with the possible fix from ChatGPT and verify, which I was able to build and sideload successfully. Thank you.

Steps to reproduce

  1. Fork the pre-release branch
  2. Select correct workflow and branch when Building IPA with tweaks
  3. Run workflow
  4. Sideload the ipa with sideloadly
  5. Fail with above error

Crashlog or video error popup log

No response

Post requisites

  • I have CHECKED that a similar issue has not been reported before.
  • Verified the relevance of the project and the version you are using.
  • Provided a detailed description of the problem and have filled in all required fields.
  • By submitting this issue, I confirm that I have filled in all the necessary fields and complied with the guidelines. Failure to comply may result in the issue being closed without discussion, and repeated violations may lead to restrict account from further participation.

Activity

  1. added
    bug
    on Oct 31, 2026
  2. Tonwalter888 commented on Nov 7, 2026

    @Tonwalter888
    Owner

    I haven't got this issue, try with the latest update on pre-release branch.

  3. TributeOne commented on Nov 7, 2026

    @TributeOne

    I can reproduce this on YouTube 21.42.4 with the current pre-release branch, and I think the cause is not a duplicate ffmpegkit but simply the size of the Mach-O header.

    What happens

    cyan adds one LC_LOAD_WEAK_DYLIB to the main binary for every .dylib and every .framework it injects. The pre-release YouMod package ships eight ffmpeg frameworks (ffmpegkit, libavcodec, libavdevice, libavfilter, libavformat, libavutil, libswresample, libswscale), which cost 536 bytes of load commands even though YouMod.dylib itself does not link against them (otool -L YouMod.dylib only lists CydiaSubstrate; they are loaded at runtime).

    YouTube 21.42.4 has 1064 bytes of free space between the end of its load commands and the start of __text. In my run the injected load commands added up to 1072 bytes:

    load command bytes
    8 ffmpeg frameworks 536
    YouMod, YouGroupSettings, UncappedAVPlayer 160
    YouPiP, YouQuality, YTABConfig, YTVideoOverlay 200
    Return-YouTube-Dislikes 64
    two more tweaks of mine 104
    total 1072

    That is 8 bytes too many. cyan does not notice; the last load command (LC_CODE_SIGNATURE) overlaps the first 8 bytes of __text, so the binary's first function starts with the signature's dataoff/datasize values instead of code. Sideloadly refuses to sign such a binary (the error in this issue); if you sign it anyway, the app dies on launch with EXC_BAD_INSTRUCTION in load_images at YouTube+0x4000, and the fault address in the crash report is exactly the LC_CODE_SIGNATURE dataoff value.

    With the full default tweak set the overflow is much larger, so any 21.42.4 build from the workflow is affected; other YouTube versions have different padding, which would explain why it does not show up on every setup.

    Possible fixes

    • Do not inject the ffmpeg frameworks through cyan -f (so they get no load commands in the main binary). Since YouMod loads them at runtime, it is enough to copy them into Frameworks/ after cyan has run, or to load them from YouMod.bundle.
    • Or load ffmpegkit lazily from a single dylib so only one load command is needed.

    Happy to test a fix on 21.42.4 if that helps.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions