Question

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?

Was it helpful?

Solution

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:

  1. ffmpeg -formats to see all formats and

  2. ffmpeg -codecs to see all supported codecs

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top