laravel-ffmpeg icon indicating copy to clipboard operation
laravel-ffmpeg copied to clipboard

How to add multiple subtitles?

Open irakan opened this issue 2 years ago • 0 comments

I am using this to add a subtitle which if working fine:

FFMpeg::openUrl($videoUrl)
    ->addFilter(function (VideoFilters $filters) use ($subtitleFilePath) {
            $filters->custom("subtitles={$subtitleFilePath}");
    })
    ->export()
    ->inFormat(new X264())
    ->toDisk('s3')
    ->save($savePath);

I tried to add another filter for the second subtitle file but they get on top of each other.. How can I add a multiple subtitles, so that the user can select which one to display on the video player..

irakan avatar Feb 02 '23 09:02 irakan