Download the PHP package hn/video without Composer
On this page you can find all versions of the php package hn/video. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package video
Short Description TYPO3 extension that compresses videos during upload to 720p H.264 MP4 using ffmpeg.wasm for optimal compatibility and reduced storage. Additionally generates embedded poster images for improved video previews.
License GPL-2.0-or-later
Informations about the package video
what does this extension do
- It compresses videos during the upload process to 720p h264 mp4 file using a web assembly version of ffmpeg.
This means there are no server dependencies for video compression.
- This allows you to serve well compressed videos in a universally compatible format
- It save storage space on your server by not uploading the original files
- It potentially helps users upload videos that have a slow internet connection
- It automatically generates and embeds poster images (thumbnails) in MP4 files
- Extracts a frame from the video and embeds it as cover art in the MP4
- TYPO3's file processing system can extract these thumbnails for preview purposes
- Automatically adds poster attributes to
<video>tags in frontend output - Provides better video file overview in the fileadmin and improved user experience
installation
Running multithreaded WebAssembly comes with certain security requirements. To address these, browser vendors enforce the use of specific cross-origin protections.
For this extension to function correctly, the backend and JavaScript files require the following HTTP headers:
These headers can be configured in your .htaccess file or Apache server configuration as shown below:
Adding these headers globally to your frontend might introduce unintended side effects. If you try to set it only for specific folders, make sure that all resources either have the header or don't have the header. Mixing them within a document leads to errors.
If the required headers are not properly configured, the extension will display a warning when accessing views containing the file uploader (e.g., the file list view).
PHP Upload Size Configuration
When working with video uploads, you should adjust your PHP configuration to accommodate larger file sizes. You can expect up to 30MB per minute of video, so set your upload limits accordingly. Add or modify the following settings in your PHP configuration (php.ini) or .htaccess file:
known issues
- Empty folders in the Filelist have an upload button that avoids the drag-uploader in TYPO3 13.
testing thumbnail extraction
You can test the thumbnail extraction functionality using the built-in commands:
The test commands will:
- Analyze the video file to check for embedded poster images
- Extract the embedded poster image using pure PHP (no server-side FFmpeg required)
- Generate thumbnails in various sizes like the TYPO3 backend
- Test frontend video tag generation with automatic poster attributes
- Display detailed information about the extraction and rendering process
automated testing
The extension includes comprehensive PHPUnit tests that verify:
- JPEG detection and extraction from MP4 files
- Data validation and image integrity
- Performance and consistency
- Error handling for edge cases
Run tests with: docker compose exec php bash -c "cd packages/video && ../../vendor/bin/phpunit --testdox"
future plans
- allow for quality configuration
- the 720p default is a pretty good compromise between quality, compatibility and file size, but you might have different requirements
- hook into the file upload process to create HLS video fragments
- reliably serve your videos to clients with a bad connection by offering different resolutions
- can improve upload speeds with slow internet connections
- avoid max upload size limits on your hoster
- Cut videos by just modifying the playlist file. e.g. cut out the audio etc. Maybe even a tiny video editor in the backend.
- implement some form of optional server side video conversion
- allows to use more complex video formats like av1 (which would take forever in wasm)
- reduces requirements on the client computer (although increases internet bandwith requirement)
v1 vs v2
The old v1 video extension did work completely differently. It assumed that you upload original video files and that you want to exactly specify what format to use every time you embed a video. It therefore had to use server side video conversion or an api service. It was way too complicated for most use cases.
v2 is a completely different extension with a much simpler approach that will likely fit more users.
All versions of video with dependencies
typo3/cms-backend Version ^13.4 || ^14.3
typo3/cms-core Version ^13.4 || ^14.3