Use Ffmpeg To Create Videos On You Ipod, In Linux..


Recommended Posts

ok this is simple but it will also demonstrate how to make commads out of complex CLI stuff so you don't have to always type it..

here is the script before you edit it..

ffmpeg -vcodec xvid -i RUSH_r30-001.avi -b 375 -qmax 10 -bufsize 8192 -g 300 -acodec aac -ab 96 -ac 2 -s 320×192 /tmp/RUSH_R30.mp4

this is great if you want to take your video (home movies, DVD you own,freevo video ect..)

but you have to type it in each time or search history and edit.

if you do this

cat << EOF >> /usr/bin/avi2mp4
>ffmpeg -vcodec xvid -i $1 -b 375 -qmax 10 -bufsize 8192 -g 300 -acodec aac -ab 96 -ac 2 -s 320×192 $2
>EOF

su -
<enter Password>
chmod+x /usr/bin/avi2mp4

exit

if you look you will see the $1 and $2 inplace of file names.. this will allow you to make this run with arguments..

ie now you would type

avi2mp4 /media/cdrecorder/RUSH.avi /tmp/RUSH.mp4

and it will place the first in $1 and second at $2 and so on.. you can do this with your awk or sed scripts or what ever you do a lot of..

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...