Difference between revisions of "Ffmpeg/Cheatsheet"

From braindump
Jump to navigation Jump to search
(Created page with "== Converting from m4a to ogg == Converting a bunch of file from <tt>.m4a</tt> to <tt>.ogg</tt> under ksh or bash. for file in *m4a; do [[ -f ${file%.m4a}.ogg ]] || ff...")
 
 
Line 1: Line 1:
== Converting from m4a to ogg ==
== Converting from m4a to ogg ==
Converting a bunch of file from <tt>.m4a</tt> to <tt>.ogg</tt> under ksh or bash.
Converting a bunch of file from <tt>.m4a</tt> to <tt>.ogg</tt> under ksh or bash.
After the work has been completed delet the orignial. File deletion can be commented out if required.
<pre>
for file in *m4a; do
for file in *m4a; do
[[ -f ${file%.m4a}.ogg ]] || ffmpeg -i "$file" -acodec libvorbis "${file%.m4a}.ogg";
[[ -f ${file%.m4a}.ogg ]] || ffmpeg -i "${file}" -acodec libvorbis "${file%.m4a}.ogg";
## [[ $? -eq 0 ]] && rm "${file}"
done
done
</pre>
[[Category:ffmpeg]]
[[Category:ffmpeg]]

Latest revision as of 21:53, 20 June 2014

Converting from m4a to ogg

Converting a bunch of file from .m4a to .ogg under ksh or bash. After the work has been completed delet the orignial. File deletion can be commented out if required.

 for file in *m4a; do 
     [[ -f  ${file%.m4a}.ogg ]] || ffmpeg -i "${file}" -acodec libvorbis "${file%.m4a}.ogg";
     ## [[ $? -eq 0 ]]            && rm "${file}"
 done