All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Allow PHP 8 in composer.json, in #25
- [Minor] Composer 2 support, fix captainhook for development, in #25
- [Minor] PHP 8 named parameters support, in #24
- [Minor] Missing logger in VideoAnalyzer, in #24
- [Minor] phpdoc covariance issue in NullCache, in #21
- [Minor] process-exception possible covariance issue when extending, in #21
- [Q&A] Updated phpstan/psalm and few dev deps, in #21
- [Q&A] Allow phpunit v9 and remove deprecations, in #22
- [Q&A] Create mini polyfill for phpunit 7/8/9, in #23
- Support for symfony/process ^5.0
- [ci] added PHP 7.4 to travis
- [minor] phpdoc, phpstan ^0.12 generics annotations
- [minor] Psalm, default error code for ProcessException enforced to 1.
- [minor] Psalm, VideoStream unnecessary test for null duration.
VideoThumbParams
throwsInvalidParamException
instead of InvalidArgumentExceptionVideoConvertParams
throwsInvalidParamException
instead of InvalidArgumentException
- Fixed exception message for VideoInfo when file does not exists.
- Minor:
ProcessException
supports unknown exit error texts.
- Cache key generation includes
__METHOD__
inVideoInfoReader
.
- Stream collections now properly document 'NoStreamException'.
- Improved documentation for VideoInfoReader.
- Fail earlier is input file is a directory for all services (not a regular file)
ConfigProvider::getBaseDir()
to allow base class extend.
- Missing
final
keywords for classes that are not supposed to be extended to enforce possible bc issues later. Upgrade to 2.0 is fine if you're not extending base classes.
- Minor, aspect ratio __toString(), return with separator from constructor instead of default.
- Minor, use alias for psr interfaces in logger and cache to prevent accidental collisions.
- Improved exception and logging messages for VideoInfoReader, VideoThumbGenerator and VideoConverter.
- Support for AspectRatio in VideoStreams:
VideoInfo::getVideoStreams()->getFirst()->getAspectRatio()
- ConfigProvider includes
Video\Logger\LoggerInterface
andVideo\Cache\CacheInterface
.
-
VideoInfo::getVideoBitRate(): int
-> UseVideoInfo::getVideoStreams()->getFirst()->getBitRate()
instead. -
VideoInfo::getAudioBitRate(): int
-> UseVideoInfo::getAudioStreams()->getFirst()->getBitRate()
instead. -
VideoInfo::getVideoCodecName(): ?string
-> UseVideoInfo::getVideoStreams()->getFirst()->getCodecName()
instead. -
VideoInfo::getAudioCodecName(): ?string
-> UseVideoInfo::getAudioStreams()->getFirst()->getCodecName()
instead. -
Removed undocumented
Video\Config\LoggerConfigInterface
from container specs, replaced by standard factoriesVideo\Logger\LoggerInterface::class
;
- Ensure input files are not empty (instead of relying on ffmpeg cli failure - speedup)
VideoInfoReader
now accepts a psr-16 / simple-cache implementation in the constructorVideoInfoReader::getInfo($file, CacheInterface $cache=null)
to allow using a specific psr-16 cache implementaton.- Specific
InvalidFFProbeJsonException
inVideoInfoReader::getInfo()
to improve debug. VideoStream::getFps(?int $decimals=null)
to get the stream framerate.
VideoStream::getFps(?int $decimals=null)
to get the stream framerate.
- Do not require 'duration', 'duration_ts' and 'bitrate' for SubtitleStreamInterface
- Added support for Subtitle streams in VideoInfo.
- VideoInfo now supports getting multiple audio and video streams.
- Added
MissingFFMpegBinaryException
andMissingFFProbeBinaryException
(ProcessFailedException).
- Missing deprecation in VideoInfoInterface
- Missing new
VideoInfoInterface::getVideoStreams()
andVideoInfoInterface::getAudioStreams()
- Some issues with type requirements in VideoInfo
- Removal of webmozart/assert dependency.
- VideoInfo now supports getting multiple audio and video streams.
VideoInfo::getVideoBitRate(): int
-> UseVideoInfo::getVideoStreams()->getFirst()->getBitRate()
instead.VideoInfo::getAudioBitRate(): int
-> UseVideoInfo::getAudioStreams()->getFirst()->getBitRate()
instead.VideoInfo::getVideoCodecName(): ?string
-> UseVideoInfo::getVideoStreams()->getFirst()->getCodecName()
instead.VideoInfo::getAudioCodecName(): ?string
-> UseVideoInfo::getAudioStreams()->getFirst()->getCodecName()
instead.
- Missing phpdoc typehints for
VideoInfoInterface
VideoInfo::countStreams(): int
VideoInfo::getFileSize(): int
VideoInfo::getVideoBitRate(): int
VideoInfo::getAudioBitRate(): int
VideoInfo::getVideoCodecName(): ?string
VideoInfo::getAudioCodecName(): ?string
VideoInfo::getFormatName(): string
VideoInfo::getMetadata()
VideoInfo::getAudioStreamsMetadata()
VideoInfo::getVideoStreamsMetadata()
VideoInfo::getStreamsMetadataByType(string $streamType)
- Minor bug when not specifying crf in conversions
- [Breaking Change]
VideoInfoInterface::getBitrate()
renamed toVideoInfoInterface::getVideoBitrate()
- Minor fix:
ConverterAdapterInterface
allowednull
input file.
- Minor phpdoc typehints tuning
- Added psalm to Q&A checks
symfony/process
3.3 supported in addition to 3.4, 4.0, 4.1 and 4.2 ! (^3.3 || ^4.0)- Removed dead code in ProcessFactory
symfony/process
3.4 allowed and tested ! (^3.4 || ^4.0)
- [Major] Recently introduced for
symfony/process 4.2
broke older versions.
- Now relies on arguments escaping offered by
symfony/process
. - Tested on PHP 7.3 final !
- Q&A: travis now tests with lowest supported deps !
- Support for
symfony/process 4.2
.
VideoThumbGenerator::makeThumbnail()
now checks that output file exists and eventually throwsNoOutputGeneratedException
. 17VideoThumbParams::withFrame()
allows to make a thumbnail of a specific frame.SelectFilter
added for frame selections.VideoFilterChain::count()
method added, implementsCountable
VideoThumbgenerator
did not honour default number of threads (minor)VideoFilterChain
prevent recursive chaining (merge chains)
- Added
ext-pcre
to required deps - Minor, added
UnexpectedValueException
to handle case when ffmpeg cli command cannot be generated.
- Added built-in video filter:
CropFilter
. - Added more params to
ScaleFilter
. - Improved error reporting with initial support for ffmpeg parameters validation
FFMpegParamValidator
. In order to fail earlier, a validation class now checks for some parameters values (currently CRF). ActionParamInterface::getParam($name, $default=null)
, now allows to set a $default instead of always throwing exception.
- [BC-Break] Minor ->
InvalidReaderParamException
renamed intoInvalidParamException
. - [BC-Break] Minor ->
UnsetParamReaderException
renamed intoUnsetParamException
.
- Added recipe for conversion with interlace detection
- Added chapter about compression (cbr, vbr)
- A lot of fixes and additions
- Added
ScaleFilter
for scaling videos.
- Thumbnail generation is now more performant (seek time
-ss
is now before the-i input file
option)
- Internal:
FFmpegAdapter
now uses-filter:v
instead of-vf
for clarity.
VideoConvertParams::withAutoAltRef()
andwithLagInFrames()
to optimize vp9.
UnescapedFileInterface
to allow setting outputfile without escaping.PlatformNullFile()
can be set as$outputFile
inVideoConvert
.
VideoConvertParams::withPass(int $passNumber)
to indicate ffmpeg pass number
- Added multipass params, example fixed using
VideoConvertParams::withPass()
.
VideoConvertParams::withConvertParams(VideoConvertParamsInterface $extraParams)
convenience method to add/merge new params.
- Added doc for
VideoConvertParams::withConvertParams(VideoConvertParamsInterface $extraParams)
.
VideoConvertParams::setPassLogFile(string $file)
to permit multipass encoding.VideoInfo::getFileSize()
to get the filesize in bytes.Common\Exception\IOException
andIOExceptionInterface
for generic file/io exception
FileNotFoundException
,FileNotReadableException
now extendsIOException
- Added example recipe for multipass transcoding
VideoInfo::getFormatName()
to get the format name(s).VideoInfo::countStreams()
to get the number of available streams.
- Better error reporting when video file is not readable.
ext-json
added as requirement in composer.json
WARNING THIS IS BC-BREAK RELEASE
Search and replace
ConversionService
toVideoConverter
. Search and replaceConversionParams
toVideoConvertParams
.
- [BC-BREAK] Renamed
ConversionService
toVideoConverter
, #1 - [BC-BREAK] Renamed
ConversionParams
toVideoConvertParams
, #1 - [BC-BREAK] Renamed
ConversionServiceInterface
toVideoConverterInterface
, #1 - [BC-BREAK] Renamed
ConversionServiceFactory
toVideoConverterFactory
, #1
Search and replace
InfoService
toVideoInfoReader
. Search and replaceInfo
toVideoInfo
.
- [BC-BREAK] Renamed
InfoService
toVideoInfoReader
, #2 - [BC-BREAK] Renamed
InfoServiceInterface
toVideoInfoReaderInterface
, #2 - [BC-BREAK] Renamed
InfoServiceFactory
toVideoInfoReaderFactory
, #2 - [BC-BREAK] Renamed
Info
toVideoInfo
, #2 - [BC-BREAK] Renamed
InfoInterface
toVideoInfoInterface
, #2
Search and replace
ThumbService
toVideoThumbGenerator
.
- [BC-BREAK] Renamed
ThumbService
toVideoThumbGenerator
, #3 - [BC-BREAK] Renamed
ThumbParams
toVideoThumbParams
, #3 - [BC-BREAK] Renamed
ThumbServiceInterface
toVideoThumbGeneratorInterface
, #3 - [BC-BREAK] Renamed
ThumbServiceFactory
toVideoThumbGeneratorFactory
, #3
Search and replace
DetectionService
toVideoAnalyzer
.
- [BC-BREAK] Renamed
DetectionService
toVideoAnalyzer
, #4 - [BC-BREAK] Renamed
DetectionServiceInterface
toVideoAnalyzerInterface
, #4 - [BC-BREAK] Renamed
DetectionServiceFactory
toVideoAnalyzerFactory
, #4
- Requirement of
symfony/polyfill-mbstring
to allow install on system without mbstring extension.
- Missing requirement of 'ext-mbstring' in composer.json.
- Minor null file (
PlatformNullFile
) test when not autodetected.
- Convenience method:
ThumbParams::withTime(float $time)
(will set to SeekTime). - New methods for video info :
Info::getWidth()
,Info:getHeight()
- A lot of missing documentation
ConversionParams::getParam()
now throws anUnsetParamException
when the parameter was not set.ThumbParams::getParam()
now throws anUnsetParamException
when the parameter was not set.
- New method for video conversion params
ConvertParams::withoutParam(string $paramName)
. - New method for video thumbnail params
ThumbParams::withoutParam(string $paramName)
.
- Internal
AdapterInterface
becomesConverterAdapterInterface
. - Internal
FFMpegConverterAdapter
becomesFFMpegAdapter
.
- Documentation site !!!
- Fixed exception
MissingTimeException
, that was missing ;)
- [BC-Break]
ThumbServiceInterface::makeThumbnail()
now requiresThumbParamsInterface
.
- Support for psr/log in video conversion, thumbnail and info services.
- Added
VideoFilterChain::__construct(array $filters = [])
- Added
VideoFilterChain::addFilters(array $filters = [])
- Separation of concern for
ProcessParamInterface
- [BC-Break] Moved
[Conversion|Thumb|Detection|Info]Service
one level up inVideo\[Conversion|Thumb|Detection|Info]Service
. As wellVideoConversionParams
becomesVideo\ConversionParams
. Search/replace should be sufficient. (This change makes possible a future split of this repo (audio-video-subtitles...) without sacrificing BC). - [BC-Break]
ProcessTimeOutException
renamed toProcessTimedOutException
for coherence. - [BC-Break] Moved
Config\*
toVideo\Config\*
, update FFMpegConfig, FFProbeConfig, ConfigProvider locations.
The following changes concerns internal classes (less possible bc-break):
- Possible bc-break moved base exception into
MediaTools\Common
namespace. - Possible bc-break some internal util classes moved into
MediaTools\Common
namespace. - Possible bc-break
PlatformNullFile
moved intoMediaTools\Common\IO
namespace.
- Consumption of
ConversionParamsInterface
instead of concrete implementation inconvert()
.
- Possibility to set timeout per conversion: see
ProcessParamsInterface
inconvert()
ormakeThumbnail()
- Q&A Testing timed-out behaviour (functional tests working)
- [BC-Break] Renamed params in global configuration file
- [BC-Break] Renamed
VideoInfoService::getMediaInfo()
inVideoInfoService::getInfo()
- [BC-Break] Renamed
VideoConversionService::getConversionProcess()
ingetSymfonyProcess()
- Moved internal class
VideoInfo
inVideo\Info
namespace. VideoConversionService
setwithOverwrite()
by default.
ConversionParamsInterface::withBuiltInParam()
to set a built-in (supported) param.ConversionParamsInterface::withNoOverwrite()
to ensure a file is never overwritten
- Uniform Exceptions for conversion, thumbnailing and infos (doc coming).
VideoInfoServices
now relies onsymfony/process
- Improved config params separation for
FFProbeConfig
andFFMpegConfig
. - Improved customization of config factories
FFProbeConfigFactory
andFFMpegConfigFactory
- Improved error reporting using config factories.
- Factories for
FFProbeConfigFactory
andFFMpegConfigFactory
uses interfaces.
- Added missing interface methods in
AdapterInterface
- Added missing interface methods in
ConversionParamsInterface
AbstractProcess
family internal classes, no use exclusivelysymfony/process
- [BC-Break]
Video\ProbeService
renamed toVideo\InfoService
. - [BC-Break] Concrete services instances moved to top level directory.
- Support for
withSeekStart
andwithSeekEnd
methods. - Support for
withOverwrite
.
- [BC-Break] Complete class re-organisation, this kind of refactoring will tend to be avoided in subsequent releases.
- Configuration: Idle and regular timeouts for conversions.
- Q&A: Travis tests, unit and functional/integration tests (a start).
- Interlacing detection in
VideoConvert
service