How does PHP cut audio files by time?

Source: Internet
Author: User
How does PHP cut audio files by time? My website needs to process user-uploaded audio files (in pcm or wav format) cyclically every 60 s.
Using PHP in the background of the website, how does one cut user-uploaded audio files by 60 s?


Reply to discussion (solution)

Ffmpeg

Ffmpeg



Can I explain in detail how to implement ffmpeg? Thank you!

Ffmpeg-I Audio file name-t duration seconds-ss start seconds output file name

Ffmpeg-I Audio file name-t duration seconds-ss start seconds output file name


Thank you! It seems that you still need to know the total duration of the audio file to determine when to end cutting. how can I write this command?

Reference: http://www.cnblogs.com/wainiwann/p/4031129.html

Reference: http://www.cnblogs.com/wainiwann/p/4031129.html


Thanks to the moderator, but I didn't find the command T for obtaining the audio duration.

(Video bit rate + audio bit rate) * Duration/8 = file size K
I don't know about the anti-calculation.

(Video bit rate + audio bit rate) * Duration/8 = file size K
I don't know about the anti-calculation.


Thanks to the moderator. it seems that the article only describes how to set, adjust the bit rate, and file size, but does not explain how to view the original bit rate and size of the file ..

Reference: http://www.thinksaas.cn/group/topic/346522/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.