fluent-ffmpeg/node-fluent-ffmpeg

How to add cover image to audio on the "fly" (stream) ?

websharik opened this issue · 0 comments

I was try:

//add cover image to stream
ffmpeg(audioStream)
  //.addInput("./tmp.jpg") //also no attach to streams
  .addInput(coverImageUrl)
  .addOption('-map', '0:a')
  .addOption('-map', '1')
  .addOption('-codec', 'copy')
  .addOption('-disposition:v', 'attached_pic')
  .outputFormat('mp3') //required for streams
  /*.output(
    filePath, //cover image fine
    writeStream //no cover image
  )*/
  //.run()
  .pipe(writeStream) //no cover image

Working with flac and wav.