h2non / audioconcat

Tiny node.js module to concat multiple audio files using ffmpeg
45 stars 12 forks source link

ffmpeg invalid audio stream #12

Open Proxtx opened 3 years ago

Proxtx commented 3 years ago

this is my code : ` var audioconcat = require("audioconcat");

var songs = ["mp3/0.mp3", "mp3/1.mp3", "mp3/2.mp3"];

audioconcat(songs) .concat("all.mp3") .on("start", function (command) { console.log("ffmpeg process started:", command); }) .on("error", function (err, stdout, stderr) { console.error("Error:", err); console.error("ffmpeg stderr:", stderr); }) .on("end", function (output) { console.error("Audio created in:", output); }); this is the error: ffmpeg stderr: ffmpeg version N-100082-g81503ac58a Copyright (c) 2000-2020 the FFmpeg developers built with gcc 9.3-win32 (GCC) 20200320 configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-zlib --enable-libxml2 --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-opencl --enable-libvmaf --disable-vulkan --enable-libvorbis --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --disable-libglslang --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-libs=-lgomp libavutil 56. 61.100 / 56. 61.100 libavcodec 58.114.100 / 58.114.100 libavformat 58. 64.100 / 58. 64.100 libavdevice 58. 11.103 / 58. 11.103 libavfilter 7. 91.100 / 7. 91.100 libswscale 5. 8.100 / 5. 8.100 libswresample 3. 8.100 / 3. 8.100 libpostproc 55. 8.100 / 55. 8.100 Guessed Channel Layout for Input Stream #0.0 : mono Input #0, wav, from 'concat:0.mp3|mp3/1.mp3|mp3/2.mp3': Duration: 00:00:04.87, bitrate: 835 kb/s Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 22050 Hz, mono, s16, 352 kb/s [mp3 @ 00000258a936be00] Invalid audio stream. Exactly one MP3 audio stream is required. Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Error initializing output stream 0:0 -- Stream mapping: Stream #0:0 -> #0:0 (copy) Last message repeated 1 times i already changed mp3/0.mp3 to -> ./mp3/0.mp3 and /mp3/0.mp3 . I also moved the file and tried 0.mp3 `. Still the same error. thx for any help