const mergeProc = ffmpeg()
.on('start', () => {
console.log('Start merging' );
})
.on('end', () => {
streams.forEach(({recordPath}) => {
fs.unlinkSync(recordPath);
})
console.log('Merge end. You can play ' );
});
audioPathArr.forEach((recordPath) => {
mergeProc.addInput(recordPath)
});
mergeProc.mergeToFile(VIDEO_OUTPUT_FILE)
.on('error', function(err) {
console.log('Error ' + err.message);
})
.on('end', function() {
console.log('Finished!');
});
bot.on('message', msg => {
let url = `https://api.telegram.org/bot${token}/getFile?file_id=${msg.photo.file_id}`;
// Получение данных о файле
"ok" : true,
"result" : {
"file_id" : "XXXX",
"file_size" : 27935,
"file_path" : "photo\/file_1.jpg"
}