MantisBT - VCMI
View Issue Details
0001256VCMISound, music, videospublic2013-04-22 18:052013-10-26 21:26
asgraf 
Ivan 
normalminorhave not tried
closednot fixable 
LinuxMageia 2
 
 
0001256: Mp3 files don't work under rpm versions of VCMI
All mp3 files need to be converted to ogg in order to work in Fedora-like linux distributions.

Currently every time i download/upgrade any town mod to his never version i have to manually convert his mp3 files to ogg to hear music of that town in the game.

Please add mp3 support for rpm version of VCMI or let VCMI do some automatic conversions from mp3 to ogg on startup.
No tags attached.
Issue History
2013-04-22 18:05asgrafNew Issue
2013-04-22 18:43IvanNote Added: 0003508
2013-04-22 18:43IvanAssigned To => beegee
2013-04-22 18:43IvanStatusnew => assigned
2013-04-23 11:15IvanNote Added: 0003513
2013-04-23 12:37asgrafNote Added: 0003514
2013-04-23 13:07beegeeNote Added: 0003515
2013-04-23 18:41IvanNote Added: 0003518
2013-04-23 18:47IvanNote Edited: 0003518bug_revision_view_page.php?bugnote_id=3518#r2175
2013-04-24 14:13beegeeNote Added: 0003523
2013-04-25 14:04IvanNote Added: 0003524
2013-04-25 14:04IvanAssigned Tobeegee => Ivan
2013-04-25 16:57TowNote Added: 0003525
2013-04-25 17:04beegeeNote Added: 0003527
2013-10-26 21:26IvanNote Added: 0004096
2013-10-26 21:26IvanStatusassigned => closed
2013-10-26 21:26IvanResolutionopen => not fixable

Notes
(0003508)
Ivan   
2013-04-22 18:43   
IIRC problem is not vcmi but SDL_mixer library that was compiled without Mp3 support. Not much we can do here apart from providing alternative SDL_mixer.

I'll assign this to beegee - he handles all RPM stuff.
(0003513)
Ivan   
2013-04-23 11:15   
Does ffmpeg has support for mp3 decoding in Fedora builds? Try "ffplay someMusicFile.mp3"

If yes - we can do this:
1) use ffmpeg to convert everything into .ogg during install (as vcmibuilder option)
2) add support for ogg on Windows side (e.g. add ogg libraries to package)
3) ask modders to use ogg instead of mp3 (Most difficult part :) )

OR
See if it is possible to use ffmpeg instead of SDL_Mixer at least for decoding and use SDL_Mixer only to control playback.
(0003514)
asgraf   
2013-04-23 12:37   
Yes "ffplay theme.mp3" plays music for me
(0003515)
beegee   
2013-04-23 13:07   
It would be good if modders use OGG instead of MP3. MP3 is not patent-free. I don't want to support MP3 if possible, so it's better not to try start using ffmpeg for decoding it. Many open-source GPL licensed projects use OGG for music/sound like Battle of Wesnoth or FreeCiv. Perhaps we can improve and ease the process of converting MP3 to OGG with vcmibuilder and ask modders to use OGG.
(0003518)
Ivan   
2013-04-23 18:41   
(edited on: 2013-04-23 18:47)
Implementing convert option into vcmibuilder is easy - no problems here.

But most modders use Windows. FFmpeg provides prebuilt .exe but this can't be called user-friendly. Any ideas?

(0003523)
beegee   
2013-04-24 14:13   
Do you mean a converter software for modders that use windows? Perhaps that one: http://www.freeaudiovideosoft.com/freeaudioconvertwizard/ [^]

I don't know how modders record and edit their music, but if they use Audacity they can import/export from/to OGG vorbis natively. For MP3 export you even have to download and install the Lame encoder separately. The LAME project only provides the source-code and no final product(no binaries) to not violate any patents. BTW, Audacity uses libmad to decode MP3(only available in in-official RPM repo) and libsndfile for encoding/decoding WAVE, AIFF, FLAC, OGG,...(available in official standard repo) To summarize on linux and even on windows it's easier to use OGG compared to MP3.
(0003524)
Ivan   
2013-04-25 14:04   
The problem is that mp3 on Windows is a default way to share music. Will see if I can do something with this.

I've implemented convertMP3 option for vcmibuilder. It will convert *all* mp3's in data directory using ffmpeg (including mp3's from mods, if any).
(0003525)
Tow   
2013-04-25 16:57   
While I agree that free formats like ogg should be supported and can even be encouraged, it would be quite troublesome to not support mp3 when it is present everywhere.

By the way… Why it is possible on Fedora to convert mp3 to ogg during VCMI install but it is not possible to play them from VCMI? Shouldn't converting mp3 be patent-endangered as well?
(0003527)
beegee   
2013-04-25 17:04   
Convert is possible with ffmpeg provided by secondary Fedora RPM repo. Playing MP3 files from VCMI is not possible due to missing MP3 functionality in SDL_mixer for Fedora. Converting is patent-endangered as well.
(0004096)
Ivan   
2013-10-26 21:26   
Closing, I did all I could from our side. Will keep an eye on mods in our repository to make sure that everyone uses .ogg but that's all I can do.