[FFmpeg-user] [FFMpeg user] scripting help: find > xargs ffmpeg

John Doe jdmls at yahoo.com
Fri Mar 18 13:45:44 CET 2011


From: Dagfinn Stangeland <jodgipost at gmail.com>

> 2011/3/18 John Doe <jdmls at yahoo.com>
> > You  want to convert /path/to/filename.flac to /path/to/filename.m4a, right?
> >  If sourcefile = /path/to/filename.flac,
> > ${sourcefile%%.flac}.m4a =  /path/to/filename.m4a
> > But again, that's if you use the bash  shell...
> Yes, I use bash and I want to  take the files in /path/a/somefile.flac, run
> them though ffmpeg and put the  output files in /path/b/somefile.m4a.
> How would what you're suggesting work  with what I already have?:
> find  music/flac/ -iname *.flac -print0 |  xargs -0 -I source ffmpeg -i
> > source -acodec alac -map_meta_data 0:0,s0  "`basename "source"  .flac`.m4a"

Hum... why not just put the destination path in front of the basename?
"music/m4a/`basename "source"  .flac`.m4a"

JD


      


More information about the ffmpeg-user mailing list