Closed truongbo17 closed 1 year ago
Hi @truongbo17 i use its as follows
FFMpeg::fromDisk(env('FROM_DISK', ''))
->open($data['array'])
->export()
->addFilter($data['filter'], 'concat=n=' . $data['countVideos'], ':v=1[v]') // $in, $parameters, $out
->addFormatOutputMapping(
$videoFormat->getInstanceObject(),
Media::make('local', $data['file']),
['[v]', '0:a']
)->save();
where
$data['array'] = ['sound.mp3', 'video1.mp4','video2.mp4']
$data['filter'] = "[1:v],[2:v]"
$data['countVideos'] = 2
$data['file'] = 'newVideo.mp4'
in ['[v]', '0:a'] 0:a received the index 0 object array that represent sound.mp3
I hope to help you. Have a nice day!
ohh , thank you , i will try it
I have some ffpmeg commands to join videos together :
How can i convert to code using laravel-ffmpeg functions ?
I tried :
It created new videos based on existing videos but the problem is that it has a lot of errors where it can't watch videos,