Thursday, August 2, 2018
convert MTS video files into DV for iMovie editing
convert MTS video files into DV for iMovie editing
After using my sony cam I discovered that MTS files are not imported into iMovie for editing which was needed for a quick project today. After a bit of google-ing to understand if the version was the problem or what else I decided to go use a workaround as simple as a 1 line shell ffmpeg command:
ls -R /path | awk
/:$/&&f{s=$0;f=0}
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next}
NF&&f{ print s"/"$0 }|grep *.MTS|while read i;
/do bitrate=`ffmpeg -i "$i" 2>&1 |grep bitrate|
/sed s/.*bitrate: // |sed s/kb/s/k/`;ffmpeg -i "$i" -f avi -b $bitrate -ab 192k "$i".mov; done
Just discovered that a simple replacement of the container is faster and as much effective as the prev:
ls -R /path | awk
/:$/&&f{s=$0;f=0}
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next}
NF&&f{ print s"/"$0 }|grep *.MTS|while read i;
do ffmpeg -i "$i" -vcodec copy -acodec copy "$i".mov; done
hope this will be helpful to someone (for sure itll be for me so to paste the command each time needed :p)
Alex
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.