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.
- 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.
VideoThumbParamsthrowsInvalidParamExceptioninstead of InvalidArgumentExceptionVideoConvertParamsthrowsInvalidParamExceptioninstead of InvalidArgumentException
- Fixed exception message for VideoInfo when file does not exists.
- Minor:
ProcessExceptionsupports 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
finalkeywords 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\LoggerInterfaceandVideo\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\LoggerConfigInterfacefrom container specs, replaced by standard factoriesVideo\Logger\LoggerInterface::class;
- Ensure input files are not empty (instead of relying on ffmpeg cli failure - speedup)
VideoInfoReadernow 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
InvalidFFProbeJsonExceptioninVideoInfoReader::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
MissingFFMpegBinaryExceptionandMissingFFProbeBinaryException(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(): intVideoInfo::getFileSize(): intVideoInfo::getVideoBitRate(): intVideoInfo::getAudioBitRate(): intVideoInfo::getVideoCodecName(): ?stringVideoInfo::getAudioCodecName(): ?stringVideoInfo::getFormatName(): stringVideoInfo::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:
ConverterAdapterInterfaceallowednullinput file.
- Minor phpdoc typehints tuning
- Added psalm to Q&A checks
symfony/process3.3 supported in addition to 3.4, 4.0, 4.1 and 4.2 ! (^3.3 || ^4.0)- Removed dead code in ProcessFactory
symfony/process3.4 allowed and tested ! (^3.4 || ^4.0)
- [Major] Recently introduced for
symfony/process 4.2broke 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.SelectFilteradded for frame selections.VideoFilterChain::count()method added, implementsCountable
VideoThumbgeneratordid not honour default number of threads (minor)VideoFilterChainprevent recursive chaining (merge chains)
- Added
ext-pcreto required deps - Minor, added
UnexpectedValueExceptionto 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 ->
InvalidReaderParamExceptionrenamed intoInvalidParamException. - [BC-Break] Minor ->
UnsetParamReaderExceptionrenamed intoUnsetParamException.
- Added recipe for conversion with interlace detection
- Added chapter about compression (cbr, vbr)
- A lot of fixes and additions
- Added
ScaleFilterfor scaling videos.
- Thumbnail generation is now more performant (seek time
-ssis now before the-i input fileoption)
- Internal:
FFmpegAdapternow uses-filter:vinstead of-vffor clarity.
VideoConvertParams::withAutoAltRef()andwithLagInFrames()to optimize vp9.
UnescapedFileInterfaceto allow setting outputfile without escaping.PlatformNullFile()can be set as$outputFileinVideoConvert.
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\IOExceptionandIOExceptionInterfacefor generic file/io exception
FileNotFoundException,FileNotReadableExceptionnow 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-jsonadded as requirement in composer.json
WARNING THIS IS BC-BREAK RELEASE
Search and replace
ConversionServicetoVideoConverter. Search and replaceConversionParamstoVideoConvertParams.
- [BC-BREAK] Renamed
ConversionServicetoVideoConverter, #1 - [BC-BREAK] Renamed
ConversionParamstoVideoConvertParams, #1 - [BC-BREAK] Renamed
ConversionServiceInterfacetoVideoConverterInterface, #1 - [BC-BREAK] Renamed
ConversionServiceFactorytoVideoConverterFactory, #1
Search and replace
InfoServicetoVideoInfoReader. Search and replaceInfotoVideoInfo.
- [BC-BREAK] Renamed
InfoServicetoVideoInfoReader, #2 - [BC-BREAK] Renamed
InfoServiceInterfacetoVideoInfoReaderInterface, #2 - [BC-BREAK] Renamed
InfoServiceFactorytoVideoInfoReaderFactory, #2 - [BC-BREAK] Renamed
InfotoVideoInfo, #2 - [BC-BREAK] Renamed
InfoInterfacetoVideoInfoInterface, #2
Search and replace
ThumbServicetoVideoThumbGenerator.
- [BC-BREAK] Renamed
ThumbServicetoVideoThumbGenerator, #3 - [BC-BREAK] Renamed
ThumbParamstoVideoThumbParams, #3 - [BC-BREAK] Renamed
ThumbServiceInterfacetoVideoThumbGeneratorInterface, #3 - [BC-BREAK] Renamed
ThumbServiceFactorytoVideoThumbGeneratorFactory, #3
Search and replace
DetectionServicetoVideoAnalyzer.
- [BC-BREAK] Renamed
DetectionServicetoVideoAnalyzer, #4 - [BC-BREAK] Renamed
DetectionServiceInterfacetoVideoAnalyzerInterface, #4 - [BC-BREAK] Renamed
DetectionServiceFactorytoVideoAnalyzerFactory, #4
- Requirement of
symfony/polyfill-mbstringto 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 anUnsetParamExceptionwhen the parameter was not set.ThumbParams::getParam()now throws anUnsetParamExceptionwhen 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
AdapterInterfacebecomesConverterAdapterInterface. - Internal
FFMpegConverterAdapterbecomesFFMpegAdapter.
- 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]Serviceone level up inVideo\[Conversion|Thumb|Detection|Info]Service. As wellVideoConversionParamsbecomesVideo\ConversionParams. Search/replace should be sufficient. (This change makes possible a future split of this repo (audio-video-subtitles...) without sacrificing BC). - [BC-Break]
ProcessTimeOutExceptionrenamed toProcessTimedOutExceptionfor 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\Commonnamespace. - Possible bc-break some internal util classes moved into
MediaTools\Commonnamespace. - Possible bc-break
PlatformNullFilemoved intoMediaTools\Common\IOnamespace.
- Consumption of
ConversionParamsInterfaceinstead of concrete implementation inconvert().
- Possibility to set timeout per conversion: see
ProcessParamsInterfaceinconvert()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
VideoInfoinVideo\Infonamespace. VideoConversionServicesetwithOverwrite()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).
VideoInfoServicesnow relies onsymfony/process- Improved config params separation for
FFProbeConfigandFFMpegConfig. - Improved customization of config factories
FFProbeConfigFactoryandFFMpegConfigFactory - Improved error reporting using config factories.
- Factories for
FFProbeConfigFactoryandFFMpegConfigFactoryuses interfaces.
- Added missing interface methods in
AdapterInterface - Added missing interface methods in
ConversionParamsInterface
AbstractProcessfamily internal classes, no use exclusivelysymfony/process
- [BC-Break]
Video\ProbeServicerenamed toVideo\InfoService. - [BC-Break] Concrete services instances moved to top level directory.
- Support for
withSeekStartandwithSeekEndmethods. - 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
VideoConvertservice