Skip to content
This repository has been archived by the owner on Mar 4, 2023. It is now read-only.

multiple input video, multiple output screenshot #22

Closed
varadig opened this issue Jan 19, 2018 · 4 comments
Closed

multiple input video, multiple output screenshot #22

varadig opened this issue Jan 19, 2018 · 4 comments
Labels

Comments

@varadig
Copy link

varadig commented Jan 19, 2018

I have multiple videofile, and I have to generate screenshots from them.
How can I solve to do in one shot?

Thanks

@varadig
Copy link
Author

varadig commented Jan 19, 2018

I can do it with classic usage like this:

var ffmpeg:AVANE = new AVANE();
ffmpeg.encode("-ss 00:00:00 -i " + file.url + " -vframes 1 -q:v 2 " + folder.resolvePath(file.name).url + ".jpg");

but I cant add multiple input and output.

I wanted to know, how can I do it with AVANE options?

@tuarua
Copy link
Owner

tuarua commented Jan 20, 2018

It's not possible to combine multiple inputs and outputs in a single encode call.
If you want to convert multiple files then you listen for the complete event and then run a new separate encode call

e.g.

ffmpeg.addEventListener(FFmpegEvent.ON_ENCODE_FINISH,onEncodeFinish);
ffmpeg.encode("-ss 00:00:00 -i " + file.url + " -vframes 1 -q:v 2 " + folder.resolvePath(file.name).url + ".jpg");

function onEncodeFinish(event:FFmpegEvent){
    ffmpeg.encode("-ss 00:00:00 -i " + file2.url + " -vframes 1 -q:v 2 " + folder.resolvePath(file2.name).url + ".jpg");
}

@varadig
Copy link
Author

varadig commented Jan 20, 2018

Ohh thanks, thats enough for me!

@varadig varadig closed this as completed Jan 20, 2018
@varadig
Copy link
Author

varadig commented Jan 20, 2018

Maybe would be useful, if could be add queue encoding processes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants