1

I'm trying to launch a series of FFMPEG commands over SSH. My SSH client is the native openssh (7.7.2.1) client in Windows Server 2019 (ver 1809 build 17763.2114). The command I am trying to run is this:

C:\Windows\System32\OpenSSH\ssh.exe -v [email protected] -n -t 'nohup /home/user1/ffmpeg/ffmpeg -f lavfi -i testsrc -f null - -nostdin -nostats -hide_banner -loglevel error &'

Other stackexchange answers indicate that using the "nohup" and the "&" command will launch the command and release the console. The problem I'm facing is that the command runs, but the console does not release the session and keep the command running.

If I append " \" to the end of the line, the session releases, but the command stops.

If I force disconnect, then the ffmpeg command continues running, but I need a smooth way to release the process so my powershell script can continue running. I want to keep all these commands on one line. How can I connect, launch this command, disconnect and leave it running?

1 Answer 1

2

I found the answer quickly. I had to modify my own command by redirecting the console output.

C:\Windows\System32\OpenSSH\ssh.exe -v [email protected] -n "nohup /home/user1/ffmpeg/ffmpeg -f lavfi -i testsrc -f null - -nostdin -nostats -hide_banner -loglevel error > /dev/null 2>&1  &  "

I will be able to replace /dev/null with another file to write the output to.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .