Skip to main content
resize image, edited tags
Source Link
grg
  • 208.3k
  • 46
  • 373
  • 504

How to adjust a script that works in the Terminal but fails in Automator?

I have been piecing together a shell script to use FFmpeg to validate video files in a folder and create a log file.

When run in the terminal from that folder, it works fine. When I incorporate it into Automator to use as a service, it fails to create the log file correctly.

It looks like the syntax I'm using causes an issue in Automator, and it's failing as it invokes FFmpeg. How do I adjust my script in Automator to give me the same result as I got in the Terminal?

Here is the script in Automator:

for f in "$@" do echo "$f" cd $f pwd find -E ./ -regex '.*(.MOV|.MXF|.mp4|.MTS)$' -exec ffmpeg -v error -i {} -map 0:1 -f null - 2>error4.log \; done 

And the output from the log file:

find: ffmpeg: No such file or directory

Automator Screenshot

Error Log

How to adjust a script that works in the Terminal but fails in Automator

I have been piecing together a shell script to use FFmpeg to validate video files in a folder and create a log file.

When run in the terminal from that folder, it works fine. When I incorporate it into Automator to use as a service, it fails to create the log file correctly.

It looks like the syntax I'm using causes an issue in Automator, and it's failing as it invokes FFmpeg. How do I adjust my script in Automator to give me the same result as I got in the Terminal?

Here is the script in Automator:

for f in "$@" do echo "$f" cd $f pwd find -E ./ -regex '.*(.MOV|.MXF|.mp4|.MTS)$' -exec ffmpeg -v error -i {} -map 0:1 -f null - 2>error4.log \; done 

And the output from the log file:

find: ffmpeg: No such file or directory

Automator Screenshot

Error Log

How to adjust a script that works in the Terminal but fails in Automator?

I have been piecing together a shell script to use FFmpeg to validate video files in a folder and create a log file.

When run in the terminal from that folder, it works fine. When I incorporate it into Automator to use as a service, it fails to create the log file correctly.

It looks like the syntax I'm using causes an issue in Automator, and it's failing as it invokes FFmpeg. How do I adjust my script in Automator to give me the same result as I got in the Terminal?

Here is the script in Automator:

for f in "$@" do echo "$f" cd $f pwd find -E ./ -regex '.*(.MOV|.MXF|.mp4|.MTS)$' -exec ffmpeg -v error -i {} -map 0:1 -f null - 2>error4.log \; done 

And the output from the log file:

find: ffmpeg: No such file or directory

Automator Screenshot

added 33 characters in body
Source Link
klanomath
  • 67.4k
  • 10
  • 140
  • 209

How to adjust a script that works in the terminalTerminal but fails in automatorAutomator

I have been piecing together a shell script to use FFmpeg to validate video files in a folder and create a log file.

When run in the terminal from that folder, it works fine. When I incorporate it into Automator to use as a service, it fails to create the log file correctly. 

It looks like the syntax I'm using causes an issue in Automator, and it's failing as it invokes FFmpeg. How do I adjust my script in Automator to give me the same result as I got in the Terminal?

Here is the script in Automator:

for f in "$@" do echo "$f" cd $f pwd find -E ./ -regex '.(.MOV|.MXF|.mp4|.MTS)$' -exec ffmpeg -v error -i {} -map 0:1 -f null - 2>error4.log ; done*

for f in "$@" do echo "$f" cd $f pwd find -E ./ -regex '.*(.MOV|.MXF|.mp4|.MTS)$' -exec ffmpeg -v error -i {} -map 0:1 -f null - 2>error4.log \; done 

And the output from the log file:

find: ffmpeg: No such file or directory

find: ffmpeg: No such file or directory Automator Screenshot   

Error Log

How to adjust a script that works in the terminal but fails in automator

I have been piecing together a shell script to use FFmpeg to validate video files in a folder and create a log file.

When run in the terminal from that folder, it works fine. When I incorporate it into Automator to use as a service, it fails to create the log file correctly. It looks like the syntax I'm using causes an issue in Automator, and it's failing as it invokes FFmpeg. How do I adjust my script in Automator to give me the same result as I got in the Terminal?

Here is the script in Automator:

for f in "$@" do echo "$f" cd $f pwd find -E ./ -regex '.(.MOV|.MXF|.mp4|.MTS)$' -exec ffmpeg -v error -i {} -map 0:1 -f null - 2>error4.log ; done*

And the output from the log file:

find: ffmpeg: No such file or directory Automator Screenshot  Error Log

How to adjust a script that works in the Terminal but fails in Automator

I have been piecing together a shell script to use FFmpeg to validate video files in a folder and create a log file.

When run in the terminal from that folder, it works fine. When I incorporate it into Automator to use as a service, it fails to create the log file correctly. 

It looks like the syntax I'm using causes an issue in Automator, and it's failing as it invokes FFmpeg. How do I adjust my script in Automator to give me the same result as I got in the Terminal?

Here is the script in Automator:

for f in "$@" do echo "$f" cd $f pwd find -E ./ -regex '.*(.MOV|.MXF|.mp4|.MTS)$' -exec ffmpeg -v error -i {} -map 0:1 -f null - 2>error4.log \; done 

And the output from the log file:

find: ffmpeg: No such file or directory

Automator Screenshot 

Error Log

Source Link
Johng
  • 33
  • 2

How to adjust a script that works in the terminal but fails in automator

I have been piecing together a shell script to use FFmpeg to validate video files in a folder and create a log file.

When run in the terminal from that folder, it works fine. When I incorporate it into Automator to use as a service, it fails to create the log file correctly. It looks like the syntax I'm using causes an issue in Automator, and it's failing as it invokes FFmpeg. How do I adjust my script in Automator to give me the same result as I got in the Terminal?

Here is the script in Automator:

for f in "$@" do echo "$f" cd $f pwd find -E ./ -regex '.(.MOV|.MXF|.mp4|.MTS)$' -exec ffmpeg -v error -i {} -map 0:1 -f null - 2>error4.log ; done*

And the output from the log file:

find: ffmpeg: No such file or directory Automator Screenshot Error Log