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

John Doe jdmls at yahoo.com
Fri Mar 18 11:20:50 CET 2011


From: Dagfinn Stangeland <jodgipost at gmail.com>

> 2011/3/18 John Doe <jdmls at yahoo.com>
> > From: Dagfinn  Stangeland <jodgipost at gmail.com>
> >  > find   music/flac/ -iname *.flac -print0 | xargs -0 -I sourcefile  ffmpeg 
>-i
> > > >  sourcefile -acodec alac -map_meta_data  0:0,s0 "`basename "sourcefile"
> > > >   .flac`.m4a"
> > By example, if you use bash:
> >  $  toto=/a/b/c/toto.abc
> >  $ echo ${toto%%.abc}.def
> >   /a/b/c/toto.def
> > Is that what you needed?
> I'm afraid I need to be spoonfed;) or at least see your  example in  context.

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...

JD


      


More information about the ffmpeg-user mailing list