简体   繁体   中英

ffmpeg - how to make a video to have no audio in laravel

ffmpeg -i input_file.mp4 -an -vcodec copy output_file.mp4

How can I change it to something like this below?

FFMpeg::fromDisk('local')
->open($filePath.$fileName)
->export()
->toDisk('local')
->inFormat(new \FFMpeg\Format\Video\X264('libmp3lame', 'libx264'))
->save($converted);

Its seems the package had 'Audio Mute' added to it in 2017 HERE

Although it's not documented well (as far as I can see).

Having looked at the Class ( PR HERE ) you should be able to mute the audio by adding

->mute()

before

->save();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM