question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't take user input

See original GitHub issue

Once the initial ffmpeg variables have been initialised I can’t get user terminal input using input() it seems (atleast for me) the problem is with how the ffmpeg verbose prompt interacts with python’s std out. I even tried with and without quiet=True parameter in input() and in output()

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
mritunjaymusalecommented, Mar 5, 2020

I found another solution, where you have to enter stty sane Might try it later on my work pc. https://superuser.com/questions/573853/cant-type-in-cli-after-running-ffmpeg

0reactions
gunjunleecommented, Oct 27, 2021

The problem is when you call ffmpeg.(...).run it create an interactive ffmpeg subprocess that captures user inputs. For this reason, user terminal input using input() is not sent to main process as intended.

The code below create a separate pipe to prevent user terminal inputs from entering to the ffmpeg subprocess so that it make user input can be sent to main process normally. `

stdin_r, stdin_w = os.pipe()  # to make ffmpeg non-interactive

ffmpeg_process = ffmpeg.input("intput.mp4") \
    .filter('fps', fps=24, round='up') \
    .output("output.mp4") \
    .overwrite_output() \
    .run(pipe_stdin=stdin_r, quiet=True)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio Code: Take Input From User - Stack Overflow
Go to settings (ctrl+,) -> Search settings -> : Code-runner : Run in terminal - Check this and you will be able to...
Read more >
User-Input not working in Visual Studio Code for C/C++ ...
User -Input not working in Visual Studio Code for C/C++ (solution) · Click on File >> Preferences >> Settings or Press on Ctrl...
Read more >
Problem with input() in Spyder 5.1.5 (Anaconda) · Issue #17616
Use our Mac installer, which you can find here. ... Too bad that the version provided with Anaconda cannot be updated yet. :-)....
Read more >
Can't get user INPUT function to work!!! - MATLAB Answers
You overwrite the function input with the variable input as the output from your call to wavread on line 6. Thus it sees...
Read more >
Can't input in C++ : r/vscode - Reddit
My code works just fine on any other editor, but whenever I press "run", it asks for the user's number (cin >> faveNum),...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found