clip an uploaded song? |
[eluser]newbie boy[/eluser]
my upload function works perfectly... but my problem is how to clip an uploaded song in a particular time duration... hope you can help me again guys... thanks...
[eluser]TheFuzzy0ne[/eluser]
http://stackoverflow.com/questions/43890...30-seconds
[eluser]newbie boy[/eluser]
is there a way to do it php? like the file uploading class maybe?
[eluser]TheFuzzy0ne[/eluser]
No, not to my knowledge. PHP is not an MP3/media player - that's what ffmpeg is for. ![]()
[eluser]Dam1an[/eluser]
[quote author="newbie boy" date="1247067409"]is there a way to do it php? like the file uploading class maybe?[/quote] But even in the file uploading class, it uses a graphics library (normally GD2) for image manipulation So you would just use PHP as a wrapper for something such as ffmpeg like fuzzy suggested @Fuzz: I might not use notepad for DVD editing, but Notepad++ makes it so easy ![]()
[eluser]newbie boy[/eluser]
got ffmpeg now, i found this code for cropping a mp3 file down to 30secs... ffmpeg -t 30 -acodec copy -i inputfile.mp3 outputfile.mp3 i just don't know how am i incorporate it with php... i hope there someone who could help... thanks guys...
[eluser]Colin Williams[/eluser]
Never a bad time to brush up on your PHP functions... Code: exec('ffmpeg -t 30 -acodec copy -i inputfile.mp3 outputfile.mp3'); More info at http://us.php.net/exec
[eluser]newbie boy[/eluser]
Colin Williams, like how am i gonna pass my mp3 file to that code?
[eluser]Colin Williams[/eluser]
That's what the "inputfile.mp3" part of the command is for. Consider this after your upload Code: $info = $this->upload->data();
[eluser]newbie boy[/eluser]
Colin Williams, have done this before? mine, doesn't save it into another filename... it's blank... maybe the code for this audio clipping in ffmpeg is not right or something? |
Welcome Guest, Not a member yet? Register Sign In |