ChurchApps / FreeShow

FreeShow is a free and open-source, user-friendly presenter software.
https://freeshow.app
GNU General Public License v3.0
576 stars 88 forks source link

Improved PowerPoint import #491

Closed JelyMe closed 2 months ago

JelyMe commented 7 months ago

Hey there!

The long boring story

I have recently discovered your wonderful tool and I have begun playing around with it. I program things often and so I thought I would attempt to integrate a feature myself and then merge. I couldn't really figure out how your importing worked and it would probably be best for someone more advanced in TypeScript to implement this.

I would love to migrate my church to use this software but we pretty much require a fancy Powerpoint. This could be solved by using the export as pdf button but me being me thought, "huh, surely libre has a node integration." Which lead me to finding this: https://www.npmjs.com/package/libreoffice-convert?activeTab=readme

The request

My request is that you add an extra option for importing Powerpoints that uses this libreoffice package to convert them to PDFs and then to PNGs. This could reuse existing PDF to PNG logic, and I could even program it but I would need a lot of help to figure everything out.

Thank you so much for making this tool! You are doing the Lord's work lol

vassbo commented 6 months ago

Thanks. Should be doable. I need to redo the entire PDF import also sometime, because it often does not work. Maybe also just have a direct PPT renderer.

JelyMe commented 6 months ago

Great! I remember ProPresenter used to have an option to use PowerPoint as it's renderer. (It was very unstable but I think it just sent inputs to the PowerPoint in present mode.) I wonder if Libre Office will let you do something similar. (Or hopefully better)

XYQuadrat commented 6 months ago

Thanks. Should be doable. I need to redo the entire PDF import also sometime, because it often does not work. Maybe also just have a direct PPT renderer.

If you do manage to integrate a PPT renderer, this would remove the single reason we currently use OpenLP (which is good software, but FreeShow has some great featues we'd love to be able to use). OpenLP spawns a PowerPoint instance in the background and controls it remotely - perhaps this is more feasible than integrating a renderer directly into FreeShow.

halcycon commented 3 months ago

For my tuppence-worth - ProPresenter seems to convert PPT to PNGs for use in shows. EasyWorship used to have a PowerPoint integration (like OpenLP, running in the background) but they struggled to keep it up-to-date thanks to MS constantly changing the API "under the hood." At my Home Church we moved to exporting from PPT to PNG before using slides in EasyWorship as the built-in renderer just wasn't reliable.

I appreciate that how this goes will depend on which renderer you use, but I guess all I'm saying is "There be dragons!"

Would definitely love to see support for a direct render or improved PPT import though!

vassbo commented 3 months ago

I agree it could be difficult keeping a direct render working, most of the NPM packages converting PPT to PNG/PDF requires LibreOffice to be installed on the computer (which makes sense, because it will take care of the converting and be mostly up to date). But I'm not sure it's the route to go, there are many awesome web tools to easily do the convertion.

chanx commented 3 months ago

i have workaraound, i'm using that feature on Propresenter or WorshipTools Presenter, instead of launch Libre with limited PowerPoint feature, maybe we can use other way. Just load the PowerPoint using Office Powerpoint and start the slideshow as usual but in window mode or on your free display, then you can use ndi (ndi.tv) screen capture to capture it and ndi webcam to output that as ndi source OR if we are using Freeshow we can use screen capture as input source. With this we have full powerpoint feature, transition and animation.

joelgraff commented 3 months ago

This is really the most reasonable solution, I think. As an EasyWorship user, I can say that power point rendering was always sketchy when it came to animation and I think the devs have better things to do than chase down integrating with Microsoft's Powerpoint API.

There might be a good feature request in this, however. Maybe integrate a "power point view" as a show? My first thought would be a "Windows" or "Powerpoint" show object under the "Shows" tab. It would just capture an open window, presumably by the name of it's title bar (I'm surprised this isn't already there). Tailor it to just pick open Powerpoint windows as a way to help users "integrate" powerpoint into FreeShow.

Happy to flesh out a feature request if it seems like a reasonable thing to do.

chanx commented 3 months ago

yes looks like that is more reasonable and easier to integrate than we integrating Office Powerpoint API to show the ppt slide. Maybe we can add note at documentation to a workaround for people need to show powerpoint slide using freeshow

vassbo commented 3 months ago

@joelgraff So it can work like this?: The user drops a .ppt/.pptx file in the projects panel, this creates basically a capture reference that requires a opened window on the computer with the same name as the file (an open presentation in PowerPoint or simular), if it does not find it then explain what the user must do, and when it finds it play it as any other window capture! I guess the drawback it that the user then has to focus on the presentation to be able to navigate through!

I guess this could work if the window is streamed, or for more advanced setups, but for simple one output setups if easier to just turn off the FreeShow output "Always on top" and just presenting the presentation as normal when needed! (That's what I do at least)

halcycon commented 3 months ago

Has anyone here used https://github.com/ykhwong/ppt-ndi ? I've had quite a bit of success using this alongside EasyWorship and OBS previously, could be worth a look for re-using some code! In a nutshell it runs PPT in the background and then outputs the show over NDI, but it does so more reliably than anything else I have used.

chanx commented 3 months ago

yes, of course, if user need to control the powerpoint using keyboard or remote pointer,he had to make ppt window/presenter view window active. but if they control using ppt add-ins (like ppt controller via osc) they don't need to make ppt window active all the time. Example of PPT OSC is https://oscpoint.com/ . We can integrate the ppt controller to Bitfocus Companion and let the pastor control through a mobile phone.

@vassbo and you're right, simple show is just turn off FreeShow output and show PPT, but we can't duplicate the powerpoint to more than one display on our room and to obs/atem for streaming.

So it is better if we can integrate in FreeShow.

joelgraff commented 3 months ago

@joelgraff The user drops a .ppt/.pptx file in the projects panel, this creates basically a capture reference that requires a opened window on the computer with the same name as the file (an open presentation in PowerPoint or similar), if it does not find it then explain what the user must do, and when it finds it play it as any other window capture! I guess the drawback it that the user then has to focus on the presentation to be able to navigate through!

That sounds about like what I had in mind. Drag and drop is a nice touch. Otherwise, just pick the file when creating an empty PPT show. You can integrate a series of external renderers to launch or allow the user to add their own. Add an option to auto-disable "Always On Top" when the PPT renderer is running and you've probably got a fairly effective way of showing powerpoint slides without internal rendering.

As for finding the actual window by the title bar, it's a bit of a second-class hack in my mind (like buffer stuffing to automate keypresses), but it should be pretty robust. I imagine just inspecting the title of open windows for two tokens, the filename and the application name, would likely work with whatever renderer gets used. If the renderer is launched from FreeShow, you can probably maintain a more direct link to the process, I would think. Really out of my depth, here. I've only automated Office using COM...

Clearly it would be better to directly integrate the PPT rendering, but if EasyWorship still can't get it right, I don't see that you'll ever have any peace from PPT renderer bug reports in the issue tracker, lol. Regardless, an external solution certainly seems to provide a valuable feature for (presumably) minimal development cost.

vassbo commented 3 months ago

Glad to hear this @jayye-jpg. I might have a solution to make PDF integration more seamless. I'll see what can be done about the PPT.

winternet-studio commented 3 months ago

Yes, definitely PPT integration has to be improved. It is currently one step backward compared to ProPresenter as it's a 2 step process... Any solution needs to be mindful that it cannot require any external PowerPoint to be in focus, but it must be controlled by FreeShow. Otherwise you can't use the PC for anything else at the same time.

chanx commented 3 months ago

Yes, definitely PPT integration has to be improved. It is currently one step backward compared to ProPresenter as it's a 2 step process... Any solution needs to be mindful that it cannot require any external PowerPoint to be in focus, but it must be controlled by FreeShow. Otherwise you can't use the PC for anything else at the same time.

Sorry, but i'm disagree with you, even ProPresenter cannot handle PPT, ProPresenter only can import PPT as image so it won't retain any animation or transition inside the slide. More step process is required if we need to keep all PPT animation and transition and any effect the slide maker made to the slideshow.

If you do not want PowerPoint to be in focus, you can use other PPT Controller like PPT OSC. and you just can leave the powerpoint load in background and do anything else.

It won't be an easy task maybe not possible to integrate all PPT function inside other program than the Powerpoint itself. ProPresenter can't do it either.

Btw, lately some of our church young preacher not design slide using PPT anymore, they are using Canva, according to them, Canva has more and updated feature in designing the slide, animation, and text, image effect. still haven't has chance to try that feature, if Freeshow can directly load the Canva slideshow link will be awesome.

vassbo commented 3 months ago

@chanx You can actually show Canva presentations, Google Slides & online PowerPoints directly using the Website item. More here: https://github.com/ChurchApps/FreeShow/issues/251

winternet-studio commented 3 months ago

Sorry, but i'm disagree with you, even ProPresenter cannot handle PPT, ProPresenter only can import PPT as image so it won't retain any animation or transition inside the slide.

I never said ProPresenter was handling it perfectly - only that importing PDFs in FreeShow is yet another step backwards compared to ProPresenter.

Showing online PowerPoints using the Website item sounds interesting... but what about controlling it...

vassbo commented 3 months ago

@winternet-studio You need to click one time on the presentation in the output window to focus, but when that's done you can control it as normal with the keyboard.

vassbo commented 3 months ago

@jayye-jpg @winternet-studio In version 1.2.6 FreeShow has native PDF support, meaning you can drag/drop and PDF file into the project and it will render it, there's also a "convert to images" button converting into a show with image slides allowing for more control.

I still haven't figured out the PPT yet.

winternet-studio commented 3 months ago

@jayye-jpg @winternet-studio In version 1.2.6 FreeShow has native PDF support, meaning you can drag/drop and PDF file into the project and it will render it, there's also a "convert to images" button converting into a show with image slides allowing for more control.

Nice.

I still haven't figured out the PPT yet.

Okay... I presume you have already looked in the source code for OpenLP? It's in the folder /openlp/plugins/presentations/lib/

winternet-studio commented 3 months ago

@winternet-studio You need to click one time on the presentation in the output window to focus, but when that's done you can control it as normal with the keyboard.

Yes, but that doesn't solve the problem. We need to use other programs on the computer (like handling OBS) while we run the presentation...

vassbo commented 2 months ago

@winternet-studio Managed to find this package that should do the trick: https://github.com/rse/slideshow

vassbo commented 2 months ago

If anyone wants to try it out, here it is: https://github.com/ChurchApps/FreeShow/releases/tag/v1.2.7-beta.1

Just drag & drop a PowerPoint/Keynote (.ppt/.pptx/.key) file into a project. Currently tested on Windows, but it should work on macOS as well.

chanx commented 2 months ago

Not work on my device, just showing Loading and nothing happened. I'm using Office 365 powerpoint. is this version is not compatible?

vassbo commented 2 months ago

@chanx What OS do you have? Where did it stop? Did FreeShow manage to open the app, or did you do it manually? Also if you started the presentation mode, and FreeShow still shows just "Loading..." that probably means that it can't properly find the window, so what does the title of the presentation window look like? Does it include "PowerPoint" at all, or the file name?

chanx commented 2 months ago

@chanx What OS do you have? Where did it stop? Did FreeShow manage to open the app, or did you do it manually? Also if you started the presentation mode, and FreeShow still shows just "Loading..." that probably means that it can't properly find the window, so what does the title of the presentation window look like? Does it include "PowerPoint" at all, or the file name?

mine is windows 11, office 365, no powerpoint window/app is open at all, just showing Loading...

image

image

the window title is the filename.pptx -- PowerPoint

vassbo commented 2 months ago

Thanks, I'll check it out!

vassbo commented 2 months ago

@chanx I think I figured it out, the file path did not get added to newly added elements, only previously added worked (which I had).

vassbo commented 2 months ago

@jayye-jpg Beta 1 had some issues. Please wait for version 1.2.7-beta.2

vassbo commented 2 months ago

Should be working here: https://github.com/ChurchApps/FreeShow/releases/tag/v1.2.7-beta.2

chanx commented 2 months ago

Ok, will try it and report here soon. Thank you.

chanx commented 2 months ago

Still has some problem....

  1. The PPT is opening normally but has some bug
  2. We can control the slide using left/right arrow, but if we push right arrow on last slide, it shows the final slide text and if we push one more, it will exit the slideshow windows and left the main powerpoint window, and we cannot use left/right arrows anymore, because the slide show view is not started. If we switch to powerpoint app and start slideshow, we still cannot make the slideshow view into freeshow or control it. Maybe if it goes last slide /end the slideshow we can close the powerpoint app and show again the start button on freeshow.
  3. if we push up/down to switch to another show, we still cannot return and control powerpoint. We need to manually go to powerpoint windows->start slideshow, but still we can't control it from freeshow, but if we control the slideshow directly using powerpoint the view in main freeshow is updated but sadly the display is not following just the black screen. If we up/down and then click another slide then we return to ppt slide, it will show start button to relaunch the POWERPNT.EXE.
  4. On fresshow PPT, when we push left/right arrow has some delay and sometime can jump more than once (i just push left/right arrow one time but it go prev/forward 2 times)
  5. Find another bug when i want to write this comment, the freeshow show this window instead of powerpoint, maybe because this window has PowerPoint Title.
  6. Looks like the POWERPNT.EXE that launch has no right to write to User Folder (blocked by firewall) but if i launch powerpoint normally using shortcut/windows search, it don't produce that firewall warning.
  7. Maybe because i'm using 1 display only, slideshow shown mouse pointer

hope you can understand, maybe a video is more easy to understand. will try to make screenshot video

vassbo commented 2 months ago
  1. Glad that it works!
  2. This should not be a problem, but I'll add a check for that.
  3. If the presentation is active this should work fine, if it's not you need to press "Clear all", then "Start" again.
  4. Can't do anything about the delay. Have not noticed it going multiple slides, not sure what can be done about that.
  5. Again press "Clear all", make sure the window is active and "Start".
  6. If you want to edit you can just launch it manually.
  7. I'm not allowed to hide the cursor so it will show up on the capture if the window is somewhere underneath, this should not be a problem when using multiple monitors. (It also shows a yellow border around the captured screen on Windows that I can't do anything about)

Hope this makes sense! This feature is there to be a help and a one click presentation solution used for streaming, but I can't make it more seamless than it is I think. If you need to display just lyrics or still slides from PowerPoint I recommend importing as text or images.

JelyMe314 commented 2 months ago

Hey, thanks so much for working so hard on this!

I just tried out this feature and the only critique I have is this bug: image

The above "unknown network error" appears usually twice but sometimes only once. This could be due to some socketing or other part of the integration, but I am using powerpoint 2010 lol, so could just be that.

Thanks again,

You're awesome!

vassbo commented 2 months ago

Nice! I don't think I can do anything about that error unfortunately, I guess it's only in the 2010 version.

chanx commented 2 months ago
  1. Glad that it works!
  2. This should not be a problem, but I'll add a check for that.
  3. If the presentation is active this should work fine, if it's not you need to press "Clear all", then "Start" again.
  4. Can't do anything about the delay. Have not noticed it going multiple slides, not sure what can be done about that.
  5. Again press "Clear all", make sure the window is active and "Start".
  6. If you want to edit you can just launch it manually.
  7. I'm not allowed to hide the cursor so it will show up on the capture if the window is somewhere underneath, this should not be a problem when using multiple monitors. (It also shows a yellow border around the captured screen on Windows that I can't do anything about)

Hope this makes sense! This feature is there to be a help and a one click presentation solution used for streaming, but I can't make it more seamless than it is I think. If you need to display just lyrics or still slides from PowerPoint I recommend importing as text or images.

Yes... All this works, but with current condition it will be difficult for non techy user. They will think freeshow has many bug and unuseable.

For the control, is there will be more convenient if we use this? But of course we need to tell user to install this to their pc, https://github.com/leonreucher/powerpoint-remote-websocket

vassbo commented 2 months ago

@chanx If you want to use another controller you can, but I don't see how that makes it easier to set up.

The only issue with the controller I see currently is if the user manually closes the PowerPoint presentation while it's active in FreeShow, because FreeShow still thinks it's active and the window is black, but again it should not be a big problem as the output can be cleared and started again, so I guess I can also add a "Refresh" button in the PowerPoint preview to restart the presentation with one click.

chanx commented 2 months ago

okay, waiting for update...

vassbo commented 2 months ago

https://github.com/ChurchApps/FreeShow/releases/tag/v1.2.7