0

I have a script where I used a few command-line tools are utilised. However I've hit an issue where I am trying to convert two videos into one video (which I can do) however this is meant to be an idle process and when I run this command with subprocess.call() it prompted me with a 'A file with this name already exists, would you like to overwrite it [y/n]?' and now I am stuck on how to emulate a users input of 'y' + Enter.

It could be a case of running it as admin (somehow) or using pipes or this Stdout stuff I read about but didn't really understand. How would you guys approach this? What do you think the best technique?

Cheers guys, any help is immensely appreciated!

8
  • 1
    What tool are you using to merge the videos? ffmpeg? Most command line utilities have a flag (often -y) to automatically answer yes to all such questions. Commented Mar 13, 2017 at 15:02
  • 1
    I'd advice you to read about Pipes and Stdout stuff again, then come back again and ask about what you specifically do not understand. Currently the question is somewhat too broad. Commented Mar 13, 2017 at 15:03
  • Yes I am using FFMPEG! Is this wonderful feature apart of it? Commented Mar 13, 2017 at 15:03
  • @kazemakase I read it and didn't quite understand, and this led me to believe it might not be the tool for the job. If someone tells me it is what I want for the job then I will go back and read on it until I clock it. Commented Mar 13, 2017 at 15:05
  • 1
    I've added this as an answer. Would be nice if this was accepted then. Commented Mar 13, 2017 at 15:22

1 Answer 1

1

Often, tools you are calling have a -y flag to automatically answer surch questions with yes.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.