75lb / handbrake-js

Video encoding / transcoding / converting for node.js
Other
550 stars 69 forks source link

Queue several video conversions at once? #30

Closed garyking closed 5 years ago

garyking commented 5 years ago

At the moment, if I use spawn in a forEach loop on several video paths, then all the conversions run at the same time. Is it instead possible to add them to a queue so that only one runs at a time?

garyking commented 5 years ago

Okay, so I managed to do it by tracking all video paths I wanted to convert, then I just converted the first video. In the complete event, I checked to see if there were any videos remaining, and if so, then convert those with the same function.