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.

AttachmentSize
convert_to_mp3.patch4.87 KB

#1

colan - August 27, 2007 - 20:09

Needed to change the name of the codec from "mp3" to "libmp3lame".

AttachmentSize
convert.patch5.1 KB

#2

c_kais - April 7, 2008 - 19:52

My installation of ffmpeg required that I actually use the name "mp3" for codec instead of "libmp3lame". It would not work with "libmp3lame".

#3

lainel - May 15, 2008 - 08:12

Where do I insert the code?

Somewhere inside the audio.module?

#4

VeryMisunderstood - May 28, 2008 - 23:54
Category:feature request» task

multimedia.inc though I suggest using a patching program and not doing this by hand.

#5

VeryMisunderstood - May 28, 2008 - 23:55
Category:task» feature request

accidentally altered category

#6

a_c_m - June 26, 2008 - 10:02
Status:patch (code needs review)» active (needs more info)

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

colan - June 26, 2008 - 19:33

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

a_c_m - June 26, 2008 - 20:50
Status:active (needs more info)» closed

Ok, closing - Mediamover rocks !

 
 

Drupal is a registered trademark of Dries Buytaert.