Spoonfeed me ples?

If you’d be so kind, could you just spoonfeed me some FFMPEG template for twitch using node.js?


Video

If that’s not that you wanted, I’m just trying to say, that you are not banned on Google and you always can search here an answer for your questions way faster than here! :grinning:

Woaah dude, you’re smart.
Ty

1 Like

After 2 hours of searching, i’ve found nothing…
This is what I’ve got and I don’t know wtf I’m doing lol

var ffmpeg = require('fluent-ffmpeg');
var path = require('path');
var fs = require('fs');

var proc = new ffmpeg();

proc.input('\"D:/img.png\"')
.on('start', function(ffmpegCommand) {
    console.log(ffmpegCommand+'\n');
})
.on('progress', function(data) {
    /// do stuff with progress data if you want
})
.on('end', function() {
    /// encoding is complete, so callback or move on at this point
})
.on('error', function(error) {
    console.log(error);
})
.addInputOption('-loop -1')
.addInputOption('-r 60')
.addInputOption('-s "1280x720"')
.outputOptions(['-f flv', '-ac 2', '-ar 44100', '-vcodec libx264', '-g 120', '-keyint_min 60', '-b:v 2500k', '-minrate 2500k', '-maxrate 2500k', '-s "1920x1080"', '-preset ultrafast', '-threads 0', '-strict normal', '-bufsize 2500k'])
.output('rtmp://live-cph.twitch.tv/app/live_key')
.run();

You don’t learn very much being spoonfed :confused: . Why don’t you work on strengthening your Node.js skills and learning how to read documentation. It’ll be worth it in the end and you’ll understand the code your writing. We’re always here if you get stuck along the way.

I’m pretty experienced with Node.js and spoonfeeding actually helps me understand it more, but I don’t know a lot about this library and the documentation is more confusing that helpful.

Figured it out, used child processs’s spawn thing isntead.

1 Like