-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't spawn with quotes in options. #2542
Comments
Which issues? Can you share the exact full code that your are using to spawn the process? What exactly are you trying to achieve? The ffmpeg configuration you provided cannot be run on windows, since the official ffmpeg installation for windows does not include the |
Added system details and issue link.
Sure, see below. Or my repo
No sure what you are asking? I am trying to reliably run and kill that ffmpeg process like I've done hundreds of times over the past few years. Problem is quotes in the options mess things up and this seems to be a common issue.
I can see the process running from:
It shows the process running but it's something with how node is executing the command because if I just copy and paste the command from |
How is that issue related? That issue is about verbatim arguments for command prompt on windows, and you are using linux...
I am talking about Back to your issue, I think you don't need any quotes at all. Try to change let url = "\'" + "[f=mpegts:select=v]" + videoUrl + "|" + "[f=mpegts:select=a]" + audioUrl + "\'"; to let url = "[f=mpegts:select=v]" + videoUrl + "|" + "[f=mpegts:select=a]" + audioUrl; because |
That worked! Much appreciated. |
System: Ubuntu 19.10, node -v v13.11.0
I need to reliably spawn and kill this process:
ffmpeg -re -i video.avi -f tee -codec:v mpeg1video -map 0:a -map 0:v -r 20
'[f=mpegts:select=v]http://127.0.0.1:8083/video_token/|[f=mpegts:select=a]http://127.0.0.1:8083/audio_token/'
I switched from double to single quotes (as mentioned in previous issues) to no avail.
I tried using
shell: true
but then I can't reliable.kill()
the process. Same with execFile.Also tried more options:
fileStreamProcess = spawn('ffmpeg', options, { shell: true, stdio: ["ignore", "pipe", "inherit"], detached: true });
How do I use spawn without the shell with an option that contains double quotes?
The text was updated successfully, but these errors were encountered: