find command fails in jenkins, but not in terminal












0















I want to export all frames from a lot of video files, automatically in a jenkins build job using ffmpeg.



This script is running fine when I ssh into the slave and execute it in the same folder:



find . -name "*.mp4" -exec ffmpeg -i {} -qscale:v 1 -vf fps=6 {}_exportedFrame_%d.jpg ;


It should find all mp4 files and run ffmpeg on them.



It fails with this message when jenkins is running it (execute shell plugin):



08:51:32 find: ffmpeg: No such file or directory
08:51:32 find: ffmpeg: No such file or directory
08:51:32 find: ffmpeg: No such file or directory
08:51:32 find: ffmpeg: No such file or directory
...many more lines of the same error


Output from terminal (it's running fine):



bash-3.2$ find . -name "*.mp4" -exec ffmpeg -i {} -qscale:v 1 -vf fps=6 {}_exportedFrame_%d.jpg ;
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-opencl --enable-videotoolbox
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
...


Build slave is running the latest version of mac os.
ffmpeg is installed.



edit:
I've added ffmpeg to the paths file



bash-3.2$ cat /etc/paths
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin/ffmpeg
bash-3.2$ type ffmpeg
ffmpeg is /usr/local/bin/ffmpeg


I'm still getting the same error.










share|improve this question

























  • For reference, this question has been derived from unix.stackexchange.com/a/453805/100397

    – roaima
    Jan 17 at 17:00
















0















I want to export all frames from a lot of video files, automatically in a jenkins build job using ffmpeg.



This script is running fine when I ssh into the slave and execute it in the same folder:



find . -name "*.mp4" -exec ffmpeg -i {} -qscale:v 1 -vf fps=6 {}_exportedFrame_%d.jpg ;


It should find all mp4 files and run ffmpeg on them.



It fails with this message when jenkins is running it (execute shell plugin):



08:51:32 find: ffmpeg: No such file or directory
08:51:32 find: ffmpeg: No such file or directory
08:51:32 find: ffmpeg: No such file or directory
08:51:32 find: ffmpeg: No such file or directory
...many more lines of the same error


Output from terminal (it's running fine):



bash-3.2$ find . -name "*.mp4" -exec ffmpeg -i {} -qscale:v 1 -vf fps=6 {}_exportedFrame_%d.jpg ;
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-opencl --enable-videotoolbox
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
...


Build slave is running the latest version of mac os.
ffmpeg is installed.



edit:
I've added ffmpeg to the paths file



bash-3.2$ cat /etc/paths
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin/ffmpeg
bash-3.2$ type ffmpeg
ffmpeg is /usr/local/bin/ffmpeg


I'm still getting the same error.










share|improve this question

























  • For reference, this question has been derived from unix.stackexchange.com/a/453805/100397

    – roaima
    Jan 17 at 17:00














0












0








0








I want to export all frames from a lot of video files, automatically in a jenkins build job using ffmpeg.



This script is running fine when I ssh into the slave and execute it in the same folder:



find . -name "*.mp4" -exec ffmpeg -i {} -qscale:v 1 -vf fps=6 {}_exportedFrame_%d.jpg ;


It should find all mp4 files and run ffmpeg on them.



It fails with this message when jenkins is running it (execute shell plugin):



08:51:32 find: ffmpeg: No such file or directory
08:51:32 find: ffmpeg: No such file or directory
08:51:32 find: ffmpeg: No such file or directory
08:51:32 find: ffmpeg: No such file or directory
...many more lines of the same error


Output from terminal (it's running fine):



bash-3.2$ find . -name "*.mp4" -exec ffmpeg -i {} -qscale:v 1 -vf fps=6 {}_exportedFrame_%d.jpg ;
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-opencl --enable-videotoolbox
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
...


Build slave is running the latest version of mac os.
ffmpeg is installed.



edit:
I've added ffmpeg to the paths file



bash-3.2$ cat /etc/paths
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin/ffmpeg
bash-3.2$ type ffmpeg
ffmpeg is /usr/local/bin/ffmpeg


I'm still getting the same error.










share|improve this question
















I want to export all frames from a lot of video files, automatically in a jenkins build job using ffmpeg.



This script is running fine when I ssh into the slave and execute it in the same folder:



find . -name "*.mp4" -exec ffmpeg -i {} -qscale:v 1 -vf fps=6 {}_exportedFrame_%d.jpg ;


It should find all mp4 files and run ffmpeg on them.



It fails with this message when jenkins is running it (execute shell plugin):



08:51:32 find: ffmpeg: No such file or directory
08:51:32 find: ffmpeg: No such file or directory
08:51:32 find: ffmpeg: No such file or directory
08:51:32 find: ffmpeg: No such file or directory
...many more lines of the same error


Output from terminal (it's running fine):



bash-3.2$ find . -name "*.mp4" -exec ffmpeg -i {} -qscale:v 1 -vf fps=6 {}_exportedFrame_%d.jpg ;
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gpl --enable-libmp3lame --enable-libopus --enable-libsnappy --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-lzma --enable-opencl --enable-videotoolbox
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
...


Build slave is running the latest version of mac os.
ffmpeg is installed.



edit:
I've added ffmpeg to the paths file



bash-3.2$ cat /etc/paths
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin/ffmpeg
bash-3.2$ type ffmpeg
ffmpeg is /usr/local/bin/ffmpeg


I'm still getting the same error.







find ffmpeg jenkins






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago







Tamás

















asked Jan 17 at 14:42









TamásTamás

255




255













  • For reference, this question has been derived from unix.stackexchange.com/a/453805/100397

    – roaima
    Jan 17 at 17:00



















  • For reference, this question has been derived from unix.stackexchange.com/a/453805/100397

    – roaima
    Jan 17 at 17:00

















For reference, this question has been derived from unix.stackexchange.com/a/453805/100397

– roaima
Jan 17 at 17:00





For reference, this question has been derived from unix.stackexchange.com/a/453805/100397

– roaima
Jan 17 at 17:00










1 Answer
1






active

oldest

votes


















4














Probably ffmpeg is not in the PATH of the jenkins job.



Run type ffmpeg in your terminal to see where ffmpeg is located and echo $PATH in your jenkins job and compare.






share|improve this answer
























  • I've added ffmpeg to paths, it still fails with the same error. See my edit in the question.

    – Tamás
    2 days ago











  • And what does echo $PATH print when you add it to your jenkins job script?

    – Bodo
    2 days ago











  • I guess adding ffmpeg to /etc/paths did not help. Output of echo $PATH: /usr/bin:/bin:/usr/sbin:/sbin

    – Tamás
    2 days ago











  • I don't know when /etc/paths is used to construct the PATH variable. Maybe you have to restart jenkins.

    – Bodo
    2 days ago













  • Yeah jenkins was the problem, I'm using now the explicit path (/usr/local/bin/ffmpeg) to ffmpeg in my scripts instead, and it works. It's lame, but changing the path variable did not work somehow. I guess some plugin or some setting somewhere overwrites my jenkins slave environment settings.

    – Tamás
    yesterday











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f495076%2ffind-command-fails-in-jenkins-but-not-in-terminal%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









4














Probably ffmpeg is not in the PATH of the jenkins job.



Run type ffmpeg in your terminal to see where ffmpeg is located and echo $PATH in your jenkins job and compare.






share|improve this answer
























  • I've added ffmpeg to paths, it still fails with the same error. See my edit in the question.

    – Tamás
    2 days ago











  • And what does echo $PATH print when you add it to your jenkins job script?

    – Bodo
    2 days ago











  • I guess adding ffmpeg to /etc/paths did not help. Output of echo $PATH: /usr/bin:/bin:/usr/sbin:/sbin

    – Tamás
    2 days ago











  • I don't know when /etc/paths is used to construct the PATH variable. Maybe you have to restart jenkins.

    – Bodo
    2 days ago













  • Yeah jenkins was the problem, I'm using now the explicit path (/usr/local/bin/ffmpeg) to ffmpeg in my scripts instead, and it works. It's lame, but changing the path variable did not work somehow. I guess some plugin or some setting somewhere overwrites my jenkins slave environment settings.

    – Tamás
    yesterday
















4














Probably ffmpeg is not in the PATH of the jenkins job.



Run type ffmpeg in your terminal to see where ffmpeg is located and echo $PATH in your jenkins job and compare.






share|improve this answer
























  • I've added ffmpeg to paths, it still fails with the same error. See my edit in the question.

    – Tamás
    2 days ago











  • And what does echo $PATH print when you add it to your jenkins job script?

    – Bodo
    2 days ago











  • I guess adding ffmpeg to /etc/paths did not help. Output of echo $PATH: /usr/bin:/bin:/usr/sbin:/sbin

    – Tamás
    2 days ago











  • I don't know when /etc/paths is used to construct the PATH variable. Maybe you have to restart jenkins.

    – Bodo
    2 days ago













  • Yeah jenkins was the problem, I'm using now the explicit path (/usr/local/bin/ffmpeg) to ffmpeg in my scripts instead, and it works. It's lame, but changing the path variable did not work somehow. I guess some plugin or some setting somewhere overwrites my jenkins slave environment settings.

    – Tamás
    yesterday














4












4








4







Probably ffmpeg is not in the PATH of the jenkins job.



Run type ffmpeg in your terminal to see where ffmpeg is located and echo $PATH in your jenkins job and compare.






share|improve this answer













Probably ffmpeg is not in the PATH of the jenkins job.



Run type ffmpeg in your terminal to see where ffmpeg is located and echo $PATH in your jenkins job and compare.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 17 at 14:49









BodoBodo

5637




5637













  • I've added ffmpeg to paths, it still fails with the same error. See my edit in the question.

    – Tamás
    2 days ago











  • And what does echo $PATH print when you add it to your jenkins job script?

    – Bodo
    2 days ago











  • I guess adding ffmpeg to /etc/paths did not help. Output of echo $PATH: /usr/bin:/bin:/usr/sbin:/sbin

    – Tamás
    2 days ago











  • I don't know when /etc/paths is used to construct the PATH variable. Maybe you have to restart jenkins.

    – Bodo
    2 days ago













  • Yeah jenkins was the problem, I'm using now the explicit path (/usr/local/bin/ffmpeg) to ffmpeg in my scripts instead, and it works. It's lame, but changing the path variable did not work somehow. I guess some plugin or some setting somewhere overwrites my jenkins slave environment settings.

    – Tamás
    yesterday



















  • I've added ffmpeg to paths, it still fails with the same error. See my edit in the question.

    – Tamás
    2 days ago











  • And what does echo $PATH print when you add it to your jenkins job script?

    – Bodo
    2 days ago











  • I guess adding ffmpeg to /etc/paths did not help. Output of echo $PATH: /usr/bin:/bin:/usr/sbin:/sbin

    – Tamás
    2 days ago











  • I don't know when /etc/paths is used to construct the PATH variable. Maybe you have to restart jenkins.

    – Bodo
    2 days ago













  • Yeah jenkins was the problem, I'm using now the explicit path (/usr/local/bin/ffmpeg) to ffmpeg in my scripts instead, and it works. It's lame, but changing the path variable did not work somehow. I guess some plugin or some setting somewhere overwrites my jenkins slave environment settings.

    – Tamás
    yesterday

















I've added ffmpeg to paths, it still fails with the same error. See my edit in the question.

– Tamás
2 days ago





I've added ffmpeg to paths, it still fails with the same error. See my edit in the question.

– Tamás
2 days ago













And what does echo $PATH print when you add it to your jenkins job script?

– Bodo
2 days ago





And what does echo $PATH print when you add it to your jenkins job script?

– Bodo
2 days ago













I guess adding ffmpeg to /etc/paths did not help. Output of echo $PATH: /usr/bin:/bin:/usr/sbin:/sbin

– Tamás
2 days ago





I guess adding ffmpeg to /etc/paths did not help. Output of echo $PATH: /usr/bin:/bin:/usr/sbin:/sbin

– Tamás
2 days ago













I don't know when /etc/paths is used to construct the PATH variable. Maybe you have to restart jenkins.

– Bodo
2 days ago







I don't know when /etc/paths is used to construct the PATH variable. Maybe you have to restart jenkins.

– Bodo
2 days ago















Yeah jenkins was the problem, I'm using now the explicit path (/usr/local/bin/ffmpeg) to ffmpeg in my scripts instead, and it works. It's lame, but changing the path variable did not work somehow. I guess some plugin or some setting somewhere overwrites my jenkins slave environment settings.

– Tamás
yesterday





Yeah jenkins was the problem, I'm using now the explicit path (/usr/local/bin/ffmpeg) to ffmpeg in my scripts instead, and it works. It's lame, but changing the path variable did not work somehow. I guess some plugin or some setting somewhere overwrites my jenkins slave environment settings.

– Tamás
yesterday


















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f495076%2ffind-command-fails-in-jenkins-but-not-in-terminal%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to make a Squid Proxy server?

Is this a new Fibonacci Identity?

19世紀