Convert audio files to mp3 on upload
colan - August 12, 2007 - 22:48
| Project: | Media Field |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | colan |
| Status: | closed |
Description
It would be nice if Media Field had an option to automatically convert a non-mp3 audio file to mp3 after it has been uploaded. This functionality would be similar to what the FlashVideo module does for videos.
The two new configuration options are:
- a checkbox for automatic conversion
- a text field for specifying the path to the FFMPEG executable on your system
I've got a patch here that takes care of this.
| Attachment | Size |
|---|---|
| convert_to_mp3.patch | 4.87 KB |

#1
Needed to change the name of the codec from "mp3" to "libmp3lame".
#2
My installation of ffmpeg required that I actually use the name "mp3" for codec instead of "libmp3lame". It would not work with "libmp3lame".
#3
Where do I insert the code?
Somewhere inside the audio.module?
#4
multimedia.inc though I suggest using a patching program and not doing this by hand.
#5
accidentally altered category
#6
To my mind this is expanding the scope of the module out a little far, things like this are better left to modules designed to do it e.g. media mover. However i think it might make a nice add on module?
I am however open to persuasive argument :)
#7
a_c_m: I'm going to have to agree with you on this one. I set it up this way originally because other options (Media Mover) weren't ready for prime time yet.
#8
Ok, closing - Mediamover rocks !