Hello,
I have a form to upload audio files on server. The name of the file, path and size is stored into a table in database.
The script is working, I can get the size of the uploaded file with: $_FILES['field_name']['size']. But, how can I get the duration of the audio file (MP3 and OGG)?
I want to store in database the duration in seconds.
Thanks.
Get Duration of Audio file when Upload
-
- Posts:107
Get Duration of Audio file when Upload
Admin
Posts:805
Hy,
You can get the duration of an audio /video file with JavaScript. Then, with JS you can add the duration into an input field in the form for upload.
See the code and explanations from this page: https://coursesweb.net/javascript/durati ... -upload_cs
You can get the duration of an audio /video file with JavaScript. Then, with JS you can add the duration into an input field in the form for upload.
See the code and explanations from this page: https://coursesweb.net/javascript/durati ... -upload_cs
Similar Topics
- Change the max upload size in XAMPP
PHP - MySQL First post
Pleassant Marplo, hope all things are okey ?Last post
I have a question, I think I have server problem with uploading maximal upload-file (mb) is to less I...
Marplo in once thanks for the great suport - GET_id not working in UnLink (delete file)
PHP - MySQL First post
I searching for an hour for a solution; unlink seems not to work with GET idLast post
<?php
$id = (int) $_GET ;
echo $_GET ;
$file = fopen( '.$_GET...
Here is an answer `o god after 2 hours shame on me for this one`
<?php
$file_pointer = $_GET .'.txt';
if (!unlink($file_pointer)) {
echo (...