Trouble with ffmpeg and find
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I want to convert my entire music library (in the current folder, I'd like to convert the subfolders too) to Opus using FFmpeg. The converted files should go to a folder in ~/Desktop/Opus and keep their hierarchy. I wrote the following command:
find . -name "*.mp3" -exec ffmpeg -i "./" "~/Desktop/Opus/.opus" ;
The problem is that it doesn't work. It seems to have problems parsing the embedded FFmpeg command, as it shows errors like this one for every file:
ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
configuration: --prefix=/Users/Famille_Pintado/brew/Cellar/ffmpeg/4.0 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libcaca --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
[mp3 @ 0x7fa947802600] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '././690885_Zaphkiel.mp3':
Metadata:
TBPM : 128
encoded_by : LAME in FL Studio 12
date : 2016
Duration: 00:04:48.34, start: 0.000000, bitrate: 160 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 160 kb/s
~/Desktop/Opus/./690885_Zaphkiel.mp3.opus: No such file or directory
What am I doing wrong?
find ffmpeg
add a comment |Â
up vote
1
down vote
favorite
I want to convert my entire music library (in the current folder, I'd like to convert the subfolders too) to Opus using FFmpeg. The converted files should go to a folder in ~/Desktop/Opus and keep their hierarchy. I wrote the following command:
find . -name "*.mp3" -exec ffmpeg -i "./" "~/Desktop/Opus/.opus" ;
The problem is that it doesn't work. It seems to have problems parsing the embedded FFmpeg command, as it shows errors like this one for every file:
ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
configuration: --prefix=/Users/Famille_Pintado/brew/Cellar/ffmpeg/4.0 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libcaca --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
[mp3 @ 0x7fa947802600] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '././690885_Zaphkiel.mp3':
Metadata:
TBPM : 128
encoded_by : LAME in FL Studio 12
date : 2016
Duration: 00:04:48.34, start: 0.000000, bitrate: 160 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 160 kb/s
~/Desktop/Opus/./690885_Zaphkiel.mp3.opus: No such file or directory
What am I doing wrong?
find ffmpeg
May be relevant: Why doesn't the tilde (~) expand inside double quotes?
â steeldriver
May 16 at 17:41
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I want to convert my entire music library (in the current folder, I'd like to convert the subfolders too) to Opus using FFmpeg. The converted files should go to a folder in ~/Desktop/Opus and keep their hierarchy. I wrote the following command:
find . -name "*.mp3" -exec ffmpeg -i "./" "~/Desktop/Opus/.opus" ;
The problem is that it doesn't work. It seems to have problems parsing the embedded FFmpeg command, as it shows errors like this one for every file:
ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
configuration: --prefix=/Users/Famille_Pintado/brew/Cellar/ffmpeg/4.0 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libcaca --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
[mp3 @ 0x7fa947802600] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '././690885_Zaphkiel.mp3':
Metadata:
TBPM : 128
encoded_by : LAME in FL Studio 12
date : 2016
Duration: 00:04:48.34, start: 0.000000, bitrate: 160 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 160 kb/s
~/Desktop/Opus/./690885_Zaphkiel.mp3.opus: No such file or directory
What am I doing wrong?
find ffmpeg
I want to convert my entire music library (in the current folder, I'd like to convert the subfolders too) to Opus using FFmpeg. The converted files should go to a folder in ~/Desktop/Opus and keep their hierarchy. I wrote the following command:
find . -name "*.mp3" -exec ffmpeg -i "./" "~/Desktop/Opus/.opus" ;
The problem is that it doesn't work. It seems to have problems parsing the embedded FFmpeg command, as it shows errors like this one for every file:
ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
configuration: --prefix=/Users/Famille_Pintado/brew/Cellar/ffmpeg/4.0 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libcaca --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
[mp3 @ 0x7fa947802600] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from '././690885_Zaphkiel.mp3':
Metadata:
TBPM : 128
encoded_by : LAME in FL Studio 12
date : 2016
Duration: 00:04:48.34, start: 0.000000, bitrate: 160 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 160 kb/s
~/Desktop/Opus/./690885_Zaphkiel.mp3.opus: No such file or directory
What am I doing wrong?
find ffmpeg
asked May 16 at 15:50
Spooikypok_Dev
61
61
May be relevant: Why doesn't the tilde (~) expand inside double quotes?
â steeldriver
May 16 at 17:41
add a comment |Â
May be relevant: Why doesn't the tilde (~) expand inside double quotes?
â steeldriver
May 16 at 17:41
May be relevant: Why doesn't the tilde (~) expand inside double quotes?
â steeldriver
May 16 at 17:41
May be relevant: Why doesn't the tilde (~) expand inside double quotes?
â steeldriver
May 16 at 17:41
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
find [...] -exec
will use the (relative) path to the found files. If you want to use -exec
with the assumption that the found file is in the current directory, you want to instead use -execdir
.
If it uses the relative path, it kinda makes the assumption that the found file is in the current directory, no? It didn't seem to change anything to the output. Any other ideas?
â Spooikypok_Dev
May 16 at 17:16
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
find [...] -exec
will use the (relative) path to the found files. If you want to use -exec
with the assumption that the found file is in the current directory, you want to instead use -execdir
.
If it uses the relative path, it kinda makes the assumption that the found file is in the current directory, no? It didn't seem to change anything to the output. Any other ideas?
â Spooikypok_Dev
May 16 at 17:16
add a comment |Â
up vote
1
down vote
find [...] -exec
will use the (relative) path to the found files. If you want to use -exec
with the assumption that the found file is in the current directory, you want to instead use -execdir
.
If it uses the relative path, it kinda makes the assumption that the found file is in the current directory, no? It didn't seem to change anything to the output. Any other ideas?
â Spooikypok_Dev
May 16 at 17:16
add a comment |Â
up vote
1
down vote
up vote
1
down vote
find [...] -exec
will use the (relative) path to the found files. If you want to use -exec
with the assumption that the found file is in the current directory, you want to instead use -execdir
.
find [...] -exec
will use the (relative) path to the found files. If you want to use -exec
with the assumption that the found file is in the current directory, you want to instead use -execdir
.
answered May 16 at 15:58
DopeGhoti
40k54779
40k54779
If it uses the relative path, it kinda makes the assumption that the found file is in the current directory, no? It didn't seem to change anything to the output. Any other ideas?
â Spooikypok_Dev
May 16 at 17:16
add a comment |Â
If it uses the relative path, it kinda makes the assumption that the found file is in the current directory, no? It didn't seem to change anything to the output. Any other ideas?
â Spooikypok_Dev
May 16 at 17:16
If it uses the relative path, it kinda makes the assumption that the found file is in the current directory, no? It didn't seem to change anything to the output. Any other ideas?
â Spooikypok_Dev
May 16 at 17:16
If it uses the relative path, it kinda makes the assumption that the found file is in the current directory, no? It didn't seem to change anything to the output. Any other ideas?
â Spooikypok_Dev
May 16 at 17:16
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f444185%2ftrouble-with-ffmpeg-and-find%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
May be relevant: Why doesn't the tilde (~) expand inside double quotes?
â steeldriver
May 16 at 17:41