laravel-ffmpeg
laravel-ffmpeg copied to clipboard
How to add multiple subtitles?
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..