node-fluent-ffmpeg: Convert m4a to mp3 gives Error:{}

Here is my code (CoffeScript):

command = new FFmpeg { source: current_track.track_file_stream_url }
          .withNoVideo()
          .withAudioBitrate '128k'
          .withAudioChannels 2
          .withAudioFrequency 48000
          .withAudioQuality 5
          .fromFormat 'm4a'
          .toFormat 'mp3'
          .on 'progress', (progress) ->
            console.log progress.percent
          .on 'error', (err) ->
            console.log err
          .on 'end', () ->
            console.log 'Processing finished successfully'
          .saveToFile "#{current_track.track_file_stream_url}.mp3"

Any ideas?

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 19 (10 by maintainers)

Most upvoted comments

Removing “fromFormat” finally startsrunning, but now I have another error:

25.321100917431195
25.688073394495415
Error: process ran into a timeout (30s)
  at /***/node_modules/fluent-ffmpeg/lib/processor.js:58:30

I’m sorry to waste your time, but hopefully also be of help in the development of the library with this reports…