You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added the value "libx265" to the return array of the "X264" class and it was possible to convert to X265. Is there any reason why this functionality is not present?
The text was updated successfully, but these errors were encountered:
<?php
namespace YOURNAMESPACE;
use FFMpeg\Format\Video\X264;
/**
* A custom class for encoding videos with the H.265 (x265) codec, based on the X264 class.
*/
class X265 extends X264
{
/**
* Constructor to set audio and video codecs.
*
* @param string $audioCodec The audio codec to use. Defaults to 'aac'.
* @param string $videoCodec The video codec to use. Defaults to 'libx265' for H.265 encoding.
*/
public function __construct($audioCodec = 'aac', $videoCodec = 'libx265')
{
parent::__construct($audioCodec, $videoCodec);
}
/**
* Get the available video codecs, in this case, only 'libx265'.
*
* @return array An array containing the available video codecs.
*/
public function getAvailableVideoCodecs()
{
return array('libx265');
}
}
Now, to use this custom class, you can instantiate it with the desired codecs like so: new X265('aac','libx265');
I added the value "libx265" to the return array of the "X264" class and it was possible to convert to X265. Is there any reason why this functionality is not present?
The text was updated successfully, but these errors were encountered: