Reputation: 8523
I'm using the fluent-ffmpeg module for Node.js to convert audio files. I have a .mp3 file that I'd like to convert to .wma
Here's what that looks like:
var proc = new ffmpeg({
source: 'file.mp3',
nolog: false
}).toFormat('wma')
.saveToFile('file.wma', function(stdout, stderr)
{
console.log(stderr);
});
Unfortunately, I get the error:
Requested output format 'wma' is not a suitable output format
This is the entire error log:
ffmpeg version 0.8.9-4:0.8.9-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers
built on Nov 9 2013 19:25:10 with gcc 4.6.3
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
Input #0, mp3, from 'song_downloads/You Suffer.mp3':
Metadata:
title : You Suffer
artist : Napalm Death
album : Scum
genre : Death Metal
track : 12
date : 1987
Duration: 00:00:04.98, start: 0.000000, bitrate: 381 kb/s
Stream #0.0: Audio: mp3, 44100 Hz, stereo, s16, 193 kb/s
Requested output format 'wma' is not a suitable output format
I know this isn't an ffmpeg issue because
ffmpeg -i file.mp3 file.wma
Works fine. Any ideas?
Upvotes: 4
Views: 7610
Reputation: 1
this worked for me fine
fluent_ffmpeg('input.mp3').audioCodec("aac").save('output.aac')
when formats was:
D aac raw ADTS AAC (Advanced Audio Coding)
not E = Muxing supported
Upvotes: -1
Reputation: 47993
I think, wma is not a container format. It is an audio codec. WMA file is most commonly contained in ASF (Advanced Systems Format) format. So choose the correct options as given in the fluent-ffmpeg API to set codec and the format. You can run these commands:
ffmpeg -formats
to see all formats and
ffmpeg -codecs
to see all supported codecs
Upvotes: 6