Well, I have such transcoding script:
#!/bin/bash
acodec="vorb"
arate="256"
ext="ogg"
vlc="/usr/bin/vlc"
fmt="mp3"
for a in *$fmt; do
$vlc -I dummy -vvv "$a" --sout "#transcode{acodec=$acodec,ab=$arate,channels=2}:duplicate{dst=std{access=file,mux=ogg,dst=\"${PWD##*/}/${a%%.*}.$ext\"}" vlc://quit
done
But I want to place output files in other separate directory with the same name as source. For example, if I convert all files from folder
/usr/tmp/pop_music
I want to place converted files in directory
/$user/pop_music
I've made all possible variations and always get error. With the current (above) variant I get error:
[0xb500abe0] main stream out debug: destroying chain... (name=(null))
[0xb500abe0] main stream out debug: destroying chain done [0xb5000588] main stream output error: stream chain failed for `transcode{acodec=vorb,ab=256,channels=2}:duplicate{dst=std{access=file,mux=ogg,dst="1/Alabama - If You're Gonna Play in Texas (You Gotta Have a Fiddle in the Band).ogg"}'
[0x95be4f8] main input error: cannot start stream output instance, aborting
[0x96985a8] main playlist debug: finished input
[0x96985a8] main playlist debug: dead input
I tried to specify in dst:
1) 1/XXX.ogg
2) /1/XXX.ogg
3) 1\XXX.ogg
4) \1\XXX.ogg
but with no luck...