Hello,
I'm kinda weird I know but I'm trying to encode my mp3 to a lower quality (for my mobile phone) with one line of shell (with bash). I'm wasting some more time as I would do by hand but I'm very interested. Here is my not-working line :
find -iname "*.mp3" | xargs -n1 -I{} -P5 -0 -p --delimiter='\n' lame -q1 --vbr-new -V6 -b 32 -B 128 {} /mnt/sda1/tmp-zik/\`basename {}\`
So the main problem in my command line is the way I would like to use basename but it isn't working as my expectation. The reason I use it is that I have as input (of xargs) the relative path of the files (let's say I'm in /mnt/mp3) and there are artist and album folders in it (example: /mnt/mp3/artist/album/file blabla 01 title.mp3). So xargs receive as input: ./artist/album/file blabla 01 title.mp3 in this case.
So the first parameter of lame (the input file) is correct but not the second one (the output file). So here I am: my basename is removed at runtime and won't have any effect. Moreover I have prepared a folder for the output files but without any folder tree: so all the files would be in one folder: /mnt/sda1/tmp-zik.
Can you share your experience or your idea to bypass this little problem ? I will greatly appreciate your help ! Thank you in advance.