Trouble with ffmpeg and find

The name of the pictureThe name of the pictureThe name of the pictureClash 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?







share|improve this question



















  • May be relevant: Why doesn't the tilde (~) expand inside double quotes?
    – steeldriver
    May 16 at 17:41














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?







share|improve this question



















  • May be relevant: Why doesn't the tilde (~) expand inside double quotes?
    – steeldriver
    May 16 at 17:41












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?







share|improve this question











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?









share|improve this question










share|improve this question




share|improve this question









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
















  • 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










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.






share|improve this answer





















  • 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










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',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
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%2f444185%2ftrouble-with-ffmpeg-and-find%23new-answer', 'question_page');

);

Post as a guest






























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.






share|improve this answer





















  • 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














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.






share|improve this answer





















  • 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












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.






share|improve this answer













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.







share|improve this answer













share|improve this answer



share|improve this answer











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
















  • 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












 

draft saved


draft discarded


























 


draft saved


draft discarded














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













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?