{"id":78,"date":"2007-03-23T21:32:39","date_gmt":"2007-03-24T02:32:39","guid":{"rendered":"http:\/\/www.summet.com\/blog\/2007\/03\/23\/converting-a-movie-avi-to-play-on-a-cell-phone-3gp\/"},"modified":"2007-11-08T17:56:31","modified_gmt":"2007-11-08T22:56:31","slug":"converting-a-movie-avi-to-play-on-a-cell-phone-3gp","status":"publish","type":"post","link":"https:\/\/www.summet.com\/blog\/2007\/03\/23\/converting-a-movie-avi-to-play-on-a-cell-phone-3gp\/","title":{"rendered":"Converting a movie (.avi) to play on a cell phone (.3gp) on Mandriva Linux"},"content":{"rendered":"<p>I created this script which will convert a movie to play on a cell phone (.3gp format). It works on Mandriva linux, and uses ffmpeg (because my version of mp4creator didn&#39;t work).<\/p>\n<p><!--more--> <\/p>\n<p><font>#!\/bin\/bash<\/font><\/p>\n<p><font>INPUT=YOUR_MOVIE_NAME_HERE.avi<br \/> OUTPUT=movie.3gp<br \/> VBITRATE=50<br \/> ABITRATE=16<\/font><\/p>\n<p><font><br \/> # No user servicable parts beyond this point!<br \/> rm $OUTPUT  #Remove any previously made movies with the same output name.<br \/> #Encode the video to MPEG4, using 2 passes, 2nd pass could be removed for speed<br \/> mencoder $INPUT  -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=200:vpass=1 -zoom -vf scale=176:144 -nosound -ofps 14.985 -ffourcc DIVX -o tmp_out.avi<\/font><\/p>\n<p><font>mencoder $INPUT  -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=200:vpass=2 -zoom -vf scale=176:144 -nosound -ofps 14.985 -ffourcc DIVX -o tmp_out.avi<\/font><\/p>\n<p><font>#seperate the audio from the original video.<br \/> mplayer $INPUT -vo null -ao pcm:file=tmp_out.wav -af resample=16000,volume=3<\/font><\/p>\n<p><font>#Use ffmpeg to create the .3gp file and do AMR encoding.<br \/> ffmpeg -i tmp_out.avi -i tmp_out.wav -b $VBITRATE -ac 1 -ar 8000 -ab $ABITRATE $OUTPUT<\/font><\/p>\n<p><font>#Remove some temp files&#8230;<br \/> rm tmp_out.avi<br \/> rm tmp_out.wav<br \/> rm divx2pass.log<\/font><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I created this script which will convert a movie to play on a cell phone (.3gp format). It works on Mandriva linux, and uses ffmpeg (because my version of mp4creator didn&#39;t work).<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,7],"tags":[],"class_list":["post-78","post","type-post","status-publish","format-standard","hentry","category-linux","category-phones"],"_links":{"self":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts\/78","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/comments?post=78"}],"version-history":[{"count":0,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/posts\/78\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/media?parent=78"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/categories?post=78"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.summet.com\/blog\/wp-json\/wp\/v2\/tags?post=78"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}