Pasting a block of commands, handling delayed programs (ffmpeg)
I'm not sure how to search for this. I've tried some stuff off the top of my head but without any luck.
I have some medium sized scripts which I want to be able to paste in bulk into a terminal.
However, these scripts will halt when ffmpeg is run. Nothing after that pasted command is used. This is because ffmpeg sits there and spins its wheels.
- If put into a script, everything would work fine.
- If the copy-and-paste did each ffmpeg in turn it would be ok.
- But is there a sensible way for me to modify my code so that it's more paste friendly?
Something like this non-functioning code perhaps?:
Why not paste it into a script?
<PRESS PASTE HERE>
<THEN PRESS CTRL-D>
I did some thinking, and I realised that ffmpeg is running in an interactive mode (q to quit). This explains things. So ffmpeg is trying to be smart and it sees that I'm at a commandline.
This message from Aug 2006 says that there is no way to force non-interactive mode. So far I haven't been able to confirm or deny that.
I'll check with the ffmpeg people about this. (link / thread)
So I guess the only solution would be to have some kind of cat helper-prompt thing which will accept pasted input and will run that script.
Appending this to the end of an interactive program will force it back into non-interactivity.
|All times are GMT -5. The time now is 06:50 AM.|