Stirling-PDF/testing
Ludy 7f7d6fd1c9
feat(convert): add PDF to Video converter (FFmpeg) with MP4/WebM support (#4704)
# Description of Changes

This pull request introduces support for FFmpeg as a new external tool
in the application. It adds configuration options for FFmpeg session
limits and timeouts, updates the process execution and tool-checking
utilities to handle FFmpeg, and expands endpoint configuration to
include FFmpeg-dependent features. Corresponding unit tests have also
been added to ensure FFmpeg detection works as expected.

**FFmpeg Integration and Configuration:**

* Added FFmpeg session limit and timeout configuration options to
`ApplicationProperties`, with default values and getter methods.
[[1]](diffhunk://#diff-1c357db0a3e88cf5bedd4a5852415fadad83b8b3b9eb56e67059d8b9d8b10702R631)
[[2]](diffhunk://#diff-1c357db0a3e88cf5bedd4a5852415fadad83b8b3b9eb56e67059d8b9d8b10702R672-R675)
[[3]](diffhunk://#diff-1c357db0a3e88cf5bedd4a5852415fadad83b8b3b9eb56e67059d8b9d8b10702R702)
[[4]](diffhunk://#diff-1c357db0a3e88cf5bedd4a5852415fadad83b8b3b9eb56e67059d8b9d8b10702R743-R746)
* Updated `ProcessExecutor` to recognize FFmpeg as a process type, and
to use the new session limit and timeout configuration for FFmpeg
processes.
[[1]](diffhunk://#diff-8424a11112fff55cc28467c4d531e451a485911ed1aeb0aea772c9fa7dc3aa6aL305-R316)
[[2]](diffhunk://#diff-8424a11112fff55cc28467c4d531e451a485911ed1aeb0aea772c9fa7dc3aa6aR74-R78)
[[3]](diffhunk://#diff-8424a11112fff55cc28467c4d531e451a485911ed1aeb0aea772c9fa7dc3aa6aR133-R137)

**Tool Detection and Exception Handling:**

* Implemented `isFfmpegAvailable()` in `CheckProgramInstall` to detect
FFmpeg installation, with caching for efficiency.
[[1]](diffhunk://#diff-7b61807107c689e3824a5f8fd42c27ab072a67a5666f24445bd6895937351690R14)
[[2]](diffhunk://#diff-7b61807107c689e3824a5f8fd42c27ab072a67a5666f24445bd6895937351690R60-R78)
* Added a specific exception factory method for missing FFmpeg in
`ExceptionUtils`.

**Endpoint Configuration:**

* Registered the new `pdf-to-video` endpoint under the "Convert",
"Java", and "FFmpeg" groups, and updated the tool group logic to include
"FFmpeg".
[[1]](diffhunk://#diff-3cddb66d1cf93eeb8103ccd17cee8ed006e0c0ee006d0ee1cf42d512f177e437R265)
[[2]](diffhunk://#diff-3cddb66d1cf93eeb8103ccd17cee8ed006e0c0ee006d0ee1cf42d512f177e437R395)
[[3]](diffhunk://#diff-3cddb66d1cf93eeb8103ccd17cee8ed006e0c0ee006d0ee1cf42d512f177e437R452-R454)
[[4]](diffhunk://#diff-3cddb66d1cf93eeb8103ccd17cee8ed006e0c0ee006d0ee1cf42d512f177e437L496-R502)

**Testing Enhancements:**

* Added and updated unit tests in `CheckProgramInstallTest` to verify
FFmpeg detection, including scenarios for installed, not installed, and
caching behavior.
[[1]](diffhunk://#diff-0eaf917d935710f0f5e18f12db600be47b8439d628d65a97a3db34133231790eR29)
[[2]](diffhunk://#diff-0eaf917d935710f0f5e18f12db600be47b8439d628d65a97a3db34133231790eR38-R45)
[[3]](diffhunk://#diff-0eaf917d935710f0f5e18f12db600be47b8439d628d65a97a3db34133231790eR67-R75)
[[4]](diffhunk://#diff-0eaf917d935710f0f5e18f12db600be47b8439d628d65a97a3db34133231790eR222-R262)

---

## Checklist

### General

- [x] I have read the [Contribution
Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
- [x] I have read the [Stirling-PDF Developer
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md)
(if applicable)
- [ ] I have read the [How to add new languages to
Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md)
(if applicable)
- [x] I have performed a self-review of my own code
- [x] My changes generate no new warnings

### Documentation

- [ ] I have updated relevant docs on [Stirling-PDF's doc
repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/)
(if functionality has heavily changed)
- [ ] I have read the section [Add New Translation
Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags)
(for new translation tags only)

### UI Changes (if applicable)

- [ ] Screenshots or videos demonstrating the UI changes are attached
(e.g., as comments or direct attachments in the PR)

### Testing (if applicable)

- [ ] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing)
for more details.
2025-10-30 22:54:33 +00:00
..
cucumber build(deps): bump pypdf from 6.1.1 to 6.1.3 in /testing/cucumber in the pip group across 1 directory (#4725) 2025-10-29 19:40:45 +00:00
testdriver Test cleanup, JVM GC and api (#2787) 2025-01-26 13:10:16 +00:00
allEndpointsRemovedSettings.yml feat(convert): add PDF to Video converter (FFmpeg) with MP4/WebM support (#4704) 2025-10-30 22:54:33 +00:00
endpoints.txt Add Attachments Feature (#3781) 2025-06-24 23:52:17 +01:00
test2.sh Test cleanup, JVM GC and api (#2787) 2025-01-26 13:10:16 +00:00
test_disabledEndpoints.sh Pipeline shows disabled endpoints fix (#2881) (#3282) 2025-04-09 11:03:40 +01:00
test_webpages.sh Upgrade Gradle to 8.14 in CI Workflows and Gradle Wrapper (#3425) 2025-04-27 16:17:07 +01:00
test.sh refactor: move modules under app/ directory and update file paths (#3938) 2025-07-14 20:53:11 +01:00
webpage_urls_full.txt Security fixes, enterprise stuff and more (#3241) 2025-03-25 17:57:17 +00:00
webpage_urls.txt feat(crop): Crop remove outside text (#4499) 2025-10-11 18:35:24 +01:00