Skip to content

Commit e42a866

Browse files
authored
Update README.md
1 parent cd814a2 commit e42a866

1 file changed

Lines changed: 85 additions & 0 deletions

File tree

README.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,86 @@
11
# obs-ghostscript
2+
3+
## Introduction
4+
5+
The obs-ghostscript plugin is intended to allow an easy way to include a specific PDF document (or other type
6+
supported by the [Ghostscript](https://ghostscript.com/) library) in your [OBS Studio](https://obsproject.com/)
7+
scenes. It should be a simpler alternative to using a window capture source to show the contents of an Acrobat
8+
window.
9+
10+
The document is shown one page at a time, and the current page can be updated real-time through an interaction
11+
window to scroll through a document live during a capture session.
12+
13+
## Installation
14+
15+
The binary package mirrors the structure of the OBS Studio installation directory, so you should be able to
16+
just drop its contents alongside an OBS Studio install (usually at C:\Program Files (x86)\obs-studio\). The
17+
necessary files should look like this:
18+
19+
obs-studio
20+
|---data
21+
| |---obs-plugins
22+
| |---obs-ghostscript
23+
| |---locale
24+
| |---en-US.ini
25+
|---obs-plugins
26+
|---32bit
27+
| |---gsdll32.dll
28+
| |---obs-ghostscript.dll
29+
|---64bit
30+
|---gsdll64.dll
31+
|---obs-ghostscript.dlll
32+
33+
## Usage
34+
35+
The source is called "PDF Document (Ghostscript)" in OBS Studio's source creation menu. The properties to set
36+
on it are the path to the document file and the page from the document which should be shown.
37+
38+
By right-clicking on the source and choosing "Interact", you can manipulate the current page more quickly while
39+
recording/streaming than the source properties dialog allows. With the source displayed in an interaction window,
40+
you can scroll your mouse wheel and change the displayed page. (Note that the source will only receive mouse
41+
events if the mouse is hovered over the image shown in the intraction window.)
42+
43+
## Building
44+
45+
If you wish to build the obs-ghostscript plugin from source, you should just need [CMake](https://cmake.org/),
46+
the OBS Studio libraries and headers, and the Ghostscript libraries and headers.
47+
48+
* [obs-ghostscript source repository](https://github.com/nleseul/obs-ghostscript)
49+
* [OBS studio source repository](https://github.com/jp9000/obs-studio)
50+
* [Ghostscript source repository](http://git.ghostscript.com/?p=ghostpdl.git;a=summary)
51+
52+
I don't believe that the OBS project provides prebuilt libraries; you're probably going to have the best luck
53+
building your own OBS binaries from the source. Refer to the OBS repository for more information on that.
54+
55+
The [standard Ghostscript installers](https://www.ghostscript.com/download/gsdnld.html) do provide binary
56+
libraries for linking, but they don't provide the Ghostscript header files. You may have the best luck
57+
downloading the binary release for the library, and then harvesting the headers from the source release.
58+
You might also be okay just harvesting the necessary headers from Ghostscript's web documentation;
59+
obs-ghostscript only uses two headers—[psi/api.h](https://www.ghostscript.com/doc/psi/iapi.h) and
60+
[devices/gdevdsp.h](https://www.ghostscript.com/doc/devices/gdevdsp.h). If you download those individually,
61+
ensure that they are arranged in the proper folders.
62+
63+
When building in CMake, you will probably need to set three configuration values so your environment can be
64+
properly set up:
65+
66+
* OBSSourcePath should refer to the libobs subfolder in the OBS source release. The build pipeline will look
67+
for headers in this location, and for libraries in a "build" folder relative to that path (where the OBS
68+
build process puts them).
69+
* GSSourcePath should refer to the root folder of a Ghostscript source distribution (or a subset thereof
70+
containing the two aforementioned headers).
71+
* GSLibraryPath should refer to a folder containing the gsdll[32|64].lib binary libraries.
72+
73+
Note that the build pipeline will not copy the generated DLLs to an OBS Studio installation; you will need
74+
to do that manually, to the locations described above. Make sure to copy the gsdll[32|64].dll from the
75+
Ghostscript binary folder as well.
76+
77+
## License
78+
79+
This project is licensed under the "[Unlicense](http://unlicense.org/)", because copy[right|left] is a hideous
80+
mess to deal with and I don't like it.
81+
82+
The Ghostscript binaries included in binary distributions of this project are copyright [Artifex Software,
83+
Inc.](https://www.ghostscript.com/Licensing.html) and licensed under the GNU Affero General
84+
Public License (AGPL). The source code is available from locations previously listed in this document.
85+
Refer to the Ghostscript project's [licensing information](https://www.ghostscript.com/Licensing.html)
86+
for more details.

0 commit comments

Comments
 (0)