linux - ffmpeg to convert .avi, .mp4, .mp3, .flv, .mkv to mp4 -
i searching script contains of attributes title.
i have done 1 simple 1 attribute far , not want 1 script each of attributes not confused.
like this, running script 10 minutes see if there file consist .flv , automatic doing convert file mp4 attribute.
#!/bin/bash # convert flv mp4 ext=.mp4 file in *.flv; currmov=$file$ext ffmpeg -r 15 -i $file -b 296k -s 640x320 -vcodec mpeg4 -acodec aac $currmov done
thanks help! /m
for extensions:
for file in *.{flv,avi,mp3,mkv}; target="${file%.*}.mp4" [[ -f "$target" ]] && { echo "skipping $file - $target exists" ; continue; } echo ffmpeg -r 15 -i "$file" -b 296k -s 640x320 -vcodec mpeg4 -acodec aac "$target" done
remove echo
before ffmpeg
if satisfied
Comments
Post a Comment