Hi! 2011/9/18 Roger Burton West <[email protected]>: > On Sun, Sep 18, 2011 at 01:44:44AM +0100, Romain Beauxis wrote: > >>If you want to stick to 0.9.2, I think the following steps could help you: >> * First check what mime is actually detected by libmagic for your file: >> file -i /path/to/musepackfile.mpc >>My guess here is that it will be one of the generic one that are also >>sometimes returned for mp3 -- "application/octet-stream" ? > > Exactly that: "application/octet-stream; charset=binary". > > Unfortunately that's just the same as file -i returns for some of my > MP3 files, so removing it from mad.mime_types breaks other things. > > (Just to make things more frustrating, file without -i is quite capable > of identifying the former as MusePack and the latter as MP3 files - it > just doesn't have a mime-type set in the default magic.mgc.) > > However, putting > > 0 long =0x072b504d MusePack audio file > !:mime audio/musepack > > into /etc/mime.magic allows accurate identification of MusePack files - > at least all the ones I have. At that point, all I need is the decoder, > modelled directly on the flac decoder example: > > # set up mpc decoder > if test_process("which mpcdec") then > def mpc_p(file)= > "mpcdec #{quote(file)} - 2>/dev/null" > end > add_decoder("MUSEPACK",mpc_p) > else > log(level=3,"mpcdec binary not found: \ > mpc decoder disabled.") > end > > and it works! (Metadata parsing to follow later.) Thanks for the > pointer.
Excellent news and great work! For the record, file type detection in 1.0.0 is also done using file extension, so these issues should be fixed there provided your files have the correct extension. >>By the way, which binary do you use to decode musepack files? We >>currently have no builtin decoder -- and honnestly no time to prepare >>one at the moment -- however, we could perhaps include a predefined >>external musepack decoder.. > > The Debian musepack-tools package includes the mpcdec binary, which can > output to stdout. Thanks for this! Sam already submitted a feature request for musepack external decoder support and I plan on adding it for the next stable release. Romain ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerry® mobile platform with sessions, labs & more. See new tools and technologies. Register for BlackBerry® DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 _______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
