Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to MacOS #81

Open
ivantronics opened this issue May 19, 2014 · 51 comments
Open

Port to MacOS #81

ivantronics opened this issue May 19, 2014 · 51 comments

Comments

@ivantronics
Copy link

Plain and simple. This piece of software is extraordinaire and it would be lovely to use it without parallels on macs. I have no skill in programming whatsoever, but I believe it won't be that hard, since macos is a unix based system. Please, make it happen

@camez
Copy link

camez commented Aug 29, 2014

Agreed.

I've been using other subtitling programs on my Mac, but recently took my old pc out of the basement, wiped it clean, and loaded just enough back on so that I could use SE on it. It's not even connected to the internet because it's running Windows XP and is way too vulnerable to malware now, so I transfer files back and forth from a flash drive.

That's how much I love SE--having an old, slow, clunky computer take up space in my work area, just so I can load the one program!

@chenlung
Copy link

chenlung commented Apr 9, 2015

Sorry to bump, but I would like this as well.

I've tried a number of subtitle editors on Mac, and it's hard to find a good one.

@niksedk
Copy link
Member

niksedk commented Jul 21, 2015

Sorry, I don't have Mac... so if you've a mac lying around that you don't use do email it to me :)

@DotTheI
Copy link

DotTheI commented Oct 4, 2015

Desperately need SE for OS X as well. Even paid one.

@jdpurcell
Copy link
Contributor

I looked into it a bit; I'll leave some notes in case another developer wants to try.

To aid with debugging, it's greatly helpful to get the solution working in Xamarin Studio. To do that, I had to edit SubtitleEdit.csproj and libse.csproj to remove the pre-build events and any NuGet related items. For both projects you'll need an AssemblyInfo.cs file on the Properties folder - I copied the ones over from my Windows environment but perhaps empty files would even work. As for the libraries that came from NuGet, I just commented out the affected code but it would probably be just as easy to re-reference the libraries. After that everything builds fine.

First I tried to get VLC working. Unfortunately Mono on OS X is 32-bit, so you'll need a 32-bit version of VLC since it's referenced via library instead of the command line. The 32-bit version of VLC is no longer maintained so you'll be stuck with version 2.0.10 from February 2014. I changed the player code a bit to force it to use LibVlcMono, added a dllmap entry to the app.config to point it to libvlc.5.dylib inside the VLC bundle, and changed the audio extraction code to point to the VLC executable inside the bundle. I was able to open a video and extract the audio (the visualizer seemed to work fine). Playback only worked for audio; the video area was just black.

Then I tried mplayer. mplayer builds are no longer maintained at all on OS X, so again you have to find a few year old build - I used "MPlayer OSX Extended". I changed the player code to point to the mplayer executable inside the bundle (didn't try audio extraction since I already did it with VLC). It was able to open up a video, but the video showed up in its own mplayer window. SubtitleEdit's player was unable to control anything (e.g. the play button and seeking did nothing).

After that I gave up. I won't put any more time into it because I have no interest in using Subtitle Edit on OS X. Actually I have no interest in using OS X at all 😄. I bought a MacBook Pro to run Windows just because all the Windows laptops felt cheap and I really wanted a 16:10 display. So anyway if someone else wants to try, maybe it would be possible, but probably not easy. WinForms on OS X is quite terrible anyway, it's slow and buggy.

@DotTheI
Copy link

DotTheI commented Oct 11, 2015

@jdpurcell Thank you for your efforts!!

This application really needs to have an OS X version. There's nothing as good as Subtitle Edit.

@niksedk
Copy link
Member

niksedk commented Nov 25, 2015

As jdpurcell wrote (much good info) WinForms on OSX is quite terrible, so I've started looking at Xamarin + Cocoa + 64-bit, which would make a nice native experience for OSX users incl. latest VLC media player, but the downside is that all UI code needs to be rewritten. For a 64-bit version all System.Drawing.* code (like bitmaps) will need to be 'fixed' as the Xamarin 64-bit frameworks don't support that.

It's not easy as pie, but I think that OSX will get a "light" version of Subtitle Edit some time next year :)

@cellx
Copy link

cellx commented Feb 24, 2017

Maybe the #Electron coding is a good solution for that?

@tillkolter
Copy link

@niksedk Almost two years since your last comment, has there been any progress or did you decide to abandon the idea?

@niksedk
Copy link
Member

niksedk commented Oct 18, 2017

I was hoping that .net core 2 would include system.drawing and make it easy, but still too much is missing.
I've uploaded a Mac beta: https://github.com/SubtitleEdit/subtitleedit-mac - bit Ive not had much feedback or help. Also, this version does not share code with the Windows version, but is more a hacked version. I guess the goal is to make libse cross platform with some 2D gfx lib like ImageSharp - but I don't have much time and I don't know anything about Mac.

@chenlung
Copy link

chenlung commented Nov 1, 2017

Hi @niksedk

I tried it out, and I think with a few fixes (e.g. crashes) it could serve as a 'cut-down' editor for Mac (a 'better-than-nothing' solution) in the meantime; it might even encourage others to come forward. I'm not a developer, but I could provide some feedback.

@niksedk
Copy link
Member

niksedk commented Nov 6, 2017

Also, @oxguy3 write a osx launcher using Wine - https://github.com/oxguy3/subtitle-edit-launcher

@DotTheI
Copy link

DotTheI commented Nov 23, 2017

I didn't know that macOS version exists. It doesn't have translation option, which I use SE for predominantly, unlike Windows version, but I'll keep it as a default subtitle editor. The Wine launcher doesn't work for me, giving an error. Until it's fixed I'll continue running SE with help of CrossOver (and that's very inconvenient) and keep hoping that someday a native macOS SE version will be out.

@alangfp
Copy link

alangfp commented Jan 17, 2018

Any news on a native version of SE for MacOS?? Please, I'd even pay for it, I guess many people would

@rmanne
Copy link

rmanne commented Apr 3, 2018

After that I gave up. I won't put any more time into it

Funny that you didn't bother just trying SE instead of the media players. SE actually makes decent progress. It's super slow to start up (took ~15-30s). It gets pretty far, but crashes when you try to select your OCR auto-correct/spell-checking dictionary. It slowly uses more and more memory until it crashes (maybe it's being killed by the OS?). I tried both 5.10.0 and 5.8.1, but they both crash here.

Note for people that want to try anyways: DO NOT USE HOMEBREW TO INSTALL MONO. brew installs mono without 32-bit compatibility, and mono's 64-bit doesn't support libgdiplus, which appears to be necessary for running SE (and probably most UI applications). Use the official page: http://www.mono-project.com/download/stable/#download-mac

Also, @oxguy3 write a osx launcher using Wine - https://github.com/oxguy3/subtitle-edit-launcher

This didn't work for me at all: no window is created, no error, nothing. Also, not sure why it's even attempting to use wine when the SE binary supports mono. mono got me much further.

EDIT:
Ok so apparently you don't need an auto-correction / spell checking dictionary selected to run SE?
screen shot 2018-04-02 at 22 11 00
It works!
Here are the steps I took:

  1. Install Mono
  2. Install Tesseract (with brew): brew install tesseract
  3. Download and unpack SE (download the portable installer with linux support via mono)
  4. Use mono to run SE: /Library/Frameworks/Mono.framework/Versions/5.10.0/bin/mono --arch=32 SubtitleEdit.exe

@francwalter
Copy link

francwalter commented Apr 28, 2018

Does all features run with this?
Sounds great!
I was using always Aegisub, which is working, but since long (2014) not anymore developed (??) and anyway not so functional as SE, which I use on Windows.
Will try this now on my MacBook Pro from mid 2009 (OS 10.11.6) and report :)
Thanks meanwhile.

@rmanne
Copy link

rmanne commented Apr 29, 2018

As I described above, if you attempt to use auto-corrections, it doesn't work. But the core OCR portion and editor UI work just fine.

@francwalter
Copy link

francwalter commented Apr 30, 2018

Not working on my MacBook (mid 2009 with 10.11.6) at least with Mono 5.10.1
I run:
/Library/Frameworks/Mono.framework/Versions/5.10.1/bin/mono --arch=32 /Applications/SE356/SubtitleEdit.exe
and nothing happens. In the error console I just can read that error (repeated 3 times directly after the command):
30.04.18 11:03:20,340 launchservicesd[93]: SecTaskLoadEntitlements failed error=22

But anyway, I have VMware Fusion on my Mac and can run SE with Windows XP there.
No worries and thank anyway.

EDIT: "... with Windows XP..." where I just ran into the next errors...

@DotTheI
Copy link

DotTheI commented Jun 30, 2018

If the obstacle on the way to develop a fully functional SE version for macOS is the absence of a proper computer, then why not launch a donation campaign for that specific project so that Nikolaj can buy a MacBook laptop?

I realize that anyone may donate to Nikolaj via http://www.nikse.dk/Donate/, but I think if there was a dedicated progress bar (say, to reach $1000) that would show anyone the amount of money left to reach the goal, that would motivate everyone who wants a native SE application for macOS.

@chenlung
Copy link

I would donate to that, though I'm not sure what kind of machine will be needed (also, a redesigned Mac Pro might be announced later this year) and what OS versions could be supported (I'm using 10.11.6).

@NickZ
Copy link

NickZ commented Apr 4, 2019

@niksedk I took a look at the .net core 3 preview, and it appears that most of the issues with system.drawing are resolved. Only a handful of functions remain unimplemented (less than .3%). See my portability analysis here:
ApiPortAnalysis.zip

@niksedk
Copy link
Member

niksedk commented Apr 8, 2019

@NickZ: That sounds interesting - if libse could be used without modification that would make an updated mac version more possible.

@pmdida
Copy link

pmdida commented Oct 17, 2019

@rmanne Are you also able to open videos in SE with Mono ? I am trying your way it works fine, but when asked to open a video it says the right codecs need to be installed, I guess the way to go it to use mpv as described here, but I don't how to do the equivalent of what they describe (symlinking libmpv.so) on Mac.

@rmanne
Copy link

rmanne commented Oct 18, 2019

@didaktik I never tried opening videos and no longer run macOS, so can't test either. I imagine you can just install mpv through homebrew and symlink the same way, the main difference would be that you symlink a .dylib instead of a .so file. Not sure.

@pmdida
Copy link

pmdida commented Oct 18, 2019

Here is a solution that fully works (video also) on my Mac (Mojave 10.14)

Download an Ubuntu virtual machine (Ubuntu 18.04.1 LTS in my case) (done with Parallels 15-day free trial, to be tested with free solution (VirtualBox))

Download mono-complete (not mono-devel) as instructed on the mono project download page.

Download the right version of SubtitleEdit here (at the time of writing it has to be SE 3.5.11 Beta), extract the .zip in your Ubuntu files.

Download the required additional packages (reference here):

sudo apt install libmpv-dev vlc libhunspell-dev tesseract-ocr

Run SubtitleEdit.exe with mono:

mono SubtitleEdit.exe

I didn't have to symlink anything 👍

@radiomik
Copy link

radiomik commented Feb 6, 2020

Also, @oxguy3 write a osx launcher using Wine - https://github.com/oxguy3/subtitle-edit-launcher

First of all thank you Nikolaj for your amazing piece of software. I've been using it for a while now and always had bootcamp installed in my mac just to be able to use your program.

That said, I've tried out running SE through Wine on my iMac (Mac OS High Sierra) and almost got it to work just fine. Seems it's only able to work in 32bit mode for me, but I think that's because Wine's support for 64bit is still quite limited. I'm getting video with no problem (using mpv) and everything else seems working so far except for the waveform functionality (which is essential in my opinion, so renders the program unusable for me if I can't use that).

So here is what happens, I'm able to extract the wave audio using either ffmpeg or vlc, but once it's done the whole performance of the program drops to a level of unusable, and what's even more strange if you invoque for example the settings menu it won't show up. Even if you are able to create the waveform, the moment it's done you can't use the program anymore.. until you just hide the waveform. Then suddenly everything is working again normally with good performance and boom the settings menu shows up again. If you toggle again to show the waveform, you go back to unusable and menus not showing. Any ideas why this could be?? Thank you very much to you and everybody else helping in this project! :)

@chenlung
Copy link

chenlung commented Mar 11, 2021

Could we arrange a special crowdfunder? Perhaps a machine for a developer or just their time. The staff could determine when that should be (e.g. when the software or third-party components are deemed stable/workable enough).

I know it might not be sustainable, but if something can be established it might sew the seed for someone else to continue the effort after (perhaps with not as much effort).

@twardoch
Copy link

twardoch commented Apr 21, 2021

I have made a way to run Subtitle Edit on macOS 11, via Wine: https://github.com/twardoch/subtitle-edit-mac-wine

There is a simple "installer". This uses the whatever the newest release of the official SE for Windows is, so it should work. However — no guarantees! (I was mostly interested in CLI, not GUI.)

@twardoch
Copy link

Ps. If you try my approach and find it not working — please an open an issue at https://github.com/twardoch/subtitle-edit-mac-wine/issues

I may try to fix it then.

@SidneyUA
Copy link

Any news about possible MacOS version? This app is literally irreplaceable.

@chenlung
Copy link

MAUI has a release candidate (the first official one is seemingly intended for Q2 of 2022). Could someone check if it is suitable for use with Subtitle Edit?

@niksedk
Copy link
Member

niksedk commented Apr 16, 2022

MAUI sounds very interesting (when it will be out in a stable version), but the lack of Linux support is somewhat disappointing :(

SE cannot just be recompiled to MAUI, so all 192 windows will be to be re-designed + UI logic re-implemented + all bitmap / drawing / font code re-implemented.

@chenlung
Copy link

Perhaps Linux will come down the line once Windows and Mac are settled?

@niksedk
Copy link
Member

niksedk commented May 8, 2022

@chenlung: MAUI does not support embedding an external video player in a control, which makes it impossible to port SE.

See dotnet/maui#6843
So if you want SE on mac, give the above issue a like !

Hopefully in a future version of MAUI :)

@chenlung
Copy link

@niksedk I wonder about an editor without video in the meantime (a special version for performing tasks such as conversions and analysis/fixes)? Might be possible to make headway until provisions for video become available.

@Cankalay
Copy link

What is the situation with a mac version?

@niksedk
Copy link
Member

niksedk commented Jan 25, 2023

dotnet/maui#6843 was closed, so mpv is not likely as video player...
I think that Microsoft is working on a video player in Maui, so Maui will likely have a video player (probably poor) in next version, which might be out in November.

So for now you will have to use something like Parallels.

For very basic needs you might try the online version: https://www.nikse.dk/subtitleedit/online
Or the command line version: https://github.com/SubtitleEdit/subtitleedit-cli

@chenlung
Copy link

chenlung commented Feb 1, 2023

Announcement (31st January) from Microsoft: Play Audio and Video in .NET MAUI apps with the new MediaElement

Is this what we've been waiting for, @niksedk?

@niksedk
Copy link
Member

niksedk commented Feb 1, 2023

Announcement (31st January) from Microsoft: Play Audio and Video in .NET MAUI apps with the new MediaElement

Is this what we've been waiting for, @niksedk?

It's not anywhere near the good solution, but it's a start... and I was expecting this in the November release.

@chenlung
Copy link

chenlung commented Feb 2, 2023

Announcement (31st January) from Microsoft: Play Audio and Video in .NET MAUI apps with the new MediaElement
Is this what we've been waiting for, @niksedk?

It's not anywhere near the good solution, but it's a start... and I was expecting this in the November release.

Hopefully, by November of this year, we'll have something usable. 😊

@niksedk
Copy link
Member

niksedk commented Aug 2, 2023

Maui lacks a bit... especially mouse/keyboard handling, and the video player is unusable for subtitling atm... but you can like/vote on these if you want an SE version for MacOS:

@niksedk niksedk mentioned this issue Sep 7, 2023
@shawkynasr
Copy link

@niksedk Maui look like fix that issue. I hope soon using SE for MacOS (intel and M1 versions).

@louis-mps
Copy link

louis-mps commented Nov 30, 2023

Hello, any news for the Mac version of SE ?
I tried the different solutions on this thread but none of them worked.

@emtheodore
Copy link

@niksedk would also really love to know whether the maui issue has been fixed and whether a Mac version might be possible!

@niksedk
Copy link
Member

niksedk commented Jan 23, 2024

Maui has improved somewhat :)
I will give this a try again soon.
I'm busy the next month or so, but then I hopefully have a little to time to play with Maui/SE.

@louis-mps
Copy link

@niksedk

Hello, I wanted to check in regarding MAUI/SE progress. I understand you've been busy, but I'm genuinely interested in any updates you might have made when you find a moment to spare. Please don't feel rushed; I appreciate the effort you're putting into this :) Thank you!

@systemcrash
Copy link

I would be most satisfied with the simple ability to edit adjust save/export subs on macOS, and leave all of the bells and whistles like audio/video sync to later, since those seem to depend on the .net runtime, largely.

Can MSVS produce a macOS binary? Or does one need to run MSVS on macOS to do that?

@BrettDean
Copy link

Maui has improved somewhat :) I will give this a try again soon. I'm busy the next month or so, but then I hopefully have a little to time to play with Maui/SE.

macOS devices with M1/2/3 processors may offer more accurate OCR results compared to Tesseract. (potentially)

You can find the source code for it [here](https://github.com/xulihang/macOCR/blob/main/OCR/main.swift).

Alternatively, you can directly run the compiled binary file from [here](https://github.com/glowinthedark/subtitles-ocr/blob/master/OCR).

@ecdye
Copy link

ecdye commented Sep 16, 2024

Well, its not perfect, but as a fun side project after being inspired by the macOCR idea, I created a program for macOS that can convert a regular PGS subtitle stream into a SubRip file using the macOS OCR engine (which is actually pretty good IMHO).

It's WIP and I want to add support for more formats, but feel free to check it out (and if you feel so inclined, contribute).

Let me know what you think!

https://github.com/ecdye/macSup2Srt

@niksedk
Copy link
Member

niksedk commented Oct 4, 2024

I've started on a test project, to see what we can do in Maui (which should run on Win11+MacOs)
It looks promising. The video player is now usable (but with limited video format support).

All UI stuff will need a rewrite, so it will be a very light version of SE. And it will take a lot of time...

I'm hoping for an alpha release in a 2-3 months...

I'm working on these features:

  • Waveform
  • Auto-translation
  • Whisper audio to text
  • Fix common errors
  • Burn-in subtitles

I do not have a mac computer, so I can only test (and compile) this on windows, but it should be somewhat easy to make it work on mac too.

It could look something like this:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests