Skip to content
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.

Support macOS? #499

Closed
azureplus opened this issue Jul 27, 2020 · 16 comments
Closed

Support macOS? #499

azureplus opened this issue Jul 27, 2020 · 16 comments
Assignees
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@azureplus
Copy link

Support macOS?

@tanersener
Copy link
Owner

Why do you need mobile-ffmpeg binaries for macOS, can you be more specific?

@tanersener tanersener self-assigned this Jul 27, 2020
@tanersener tanersener added the question Further information is requested label Jul 27, 2020
@azureplus
Copy link
Author

azureplus commented Jul 27, 2020

to support all platforms

@tanersener tanersener added enhancement New feature or request and removed question Further information is requested labels Jul 27, 2020
@tanersener
Copy link
Owner

iOS Main releases support Mac Catalyst. Did you try using them?

@azureplus
Copy link
Author

iOS Main releases support Mac Catalyst. Did you try using them?

Yes, but I want to use your framework in the lower version of macOS

@tanersener
Copy link
Owner

tanersener commented Jul 30, 2020

Sorry, but I'm not sure at this point whether I will support macos or not.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@NCrusher74
Copy link

Hi, I'm trying to implement this as an SPM package (which is also an issue requested, #551 ) but it really doesn't make sense to do that without also enabling developers for MacOS to use the SPM package. For that, I need a build that is usable on MacOS, but while I can code in Swift, I'm actually a little lost trying to build FFmpeg from scratch with all the various dependencies for MacOS.

My plan to to create one SPM package with the full gpl build. From there, the compiler can decide what it does and doesn't need for a given app on a given platform.

@tanersener
Copy link
Owner

okay, go for it.

@NCrusher74
Copy link

I'm sorry, I wasn't clear enough.

In order to build the SPM package, I need .xcframework files for MacOS.

But honestly, I'm lost trying to compile FFmpeg from scratch, particularly in a way that will then enable me to generate .xcframework files that will be compatible with your .iOS and .tvOS files to create a universally usable package.

So I guess what I'm saying is that, if you add MacOS support as requested here, I can generate an SPM package to fulfill issue #551.

@tanersener
Copy link
Owner

I got it. I have asked a question on that ticket. Let me repeat it here. Can you explain what SPM is and the benefits of supporting it?

@NCrusher74
Copy link

I'm sure someone with more knowledge than I (I've only been learning Swift for a year) could answer in more explicit detail, but I'll try my best.

Swift Package Manager basically enables code to be modular, so that you can use it in different projects.

For example, my project deals with audiobook library management. I want to support both MP3 and MP4 audio (.m4a/.m4b) files.

So I created one SPM library (SwiftTaggerID3) to parse and tag MP3 files. I created another library (SwiftTaggerMP4) to parse and tag MP4 files.

Then I created a library called SwiftTagger which uses SwiftTaggerID3 and SwiftTaggerMP4 as dependencies and provides the code necessary to unify the two so that you can use the same command and it will handle your metadata and chaptering, regardless of whether your file is an MP3 or M4A/M4B.

SwiftTagger handles pretty much the whole gamut of tagging, not specific to audiobooks, it can be used on music, podcasts, etc. For audiobooks, specifically, I created AudiobookTagger, which uses SwiftTagger as a dependency, and focuses specifically on metadata relevant to audiobooks.

SwiftTaggerMP4 and SwiftTaggerID3 both have dependencies that are packages of all the little convenience extensions I use in my code, and enumerations for ISO-639-2 language codes and ICU Locale codes, since the ID3 language tag specs required ISO-639-2 codes, and MP4 uses ISO-639-2 codes in the mdhd atom, or ICU locale codes in the extended language (elng) atom.

So now I can create an audiobook library management system app, and I can create an audiobook tagging app, AND I can create an audiobook format conversion app, and all of them will use AudiobookTagger (i.e. SwiftTagger, i.e. SwiftTaggerID3/SwiftTaggerMP4) as its backbone for handling chapters and metadata.

So creating a SPM package for FFmpeg would basically enable people who are creating apps for Apple platforms to easily add FFmpeg to their apps. Once the .xcframeworks are added to the SPM package, we can then write whatever wrappers need to be written to enable them to be used in Swift.

@NCrusher74
Copy link

NCrusher74 commented Oct 24, 2020

I should add that my interest in seeing this done is that, at present, the app I'm creating is using FFmpeg as an external tool and simply executing the command-line argument necessary for what I need to do. But because I'm unsure of how to build a custom FFmpeg build, I've got the whole shebang in my project bundle, which makes my app huge, when in actuality I'm only using a small piece of it.

Creating an FFmpeg SPM package basically enables the compiler to only include the parts of FFmpeg it needs to do what you need to do.

@tanersener
Copy link
Owner

No, Homebrew is optional and does not come by default. You need to install it yourself. You can still try running ffmpeg though. But I'm not sure if Apple allows you to do that. On iOS running another command is prohibited.

@NCrusher74
Copy link

Sorry I had actually meant that question to go to a different discussion and just posted it in the wrong tab. I'm hashing over options with my mentor in case I can't find a way to make this work.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@tanersener tanersener added the wontfix This will not be worked on label Mar 20, 2021
@tanersener
Copy link
Owner

macOS support is implemented FFmpegKit, which is the continuation of MobileFFmpeg. So I suggest switching to FFmpegKit.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants