Convert video to 3GP format.
Now I expected this to be hard. Or at least take a lot of fiddling to get right. However, it seems to be quite easy. This site has all the goodness. It requires three steps. Now assume we have a file called movie.mpeg and we want to convert it to movie.3GP. The steps required would be
mencoder movie.mpeg -nosound -ovc lavc \
-lavcopts vcodec=mpeg4 \
-vop expand=176:144,scale=176:-2 \
-o movie.avi -ofps 12
This will extract the video, scale it and reduce the frame rate. Now we need to extract the sound.
mplayer -vo null -ao pcm -af \
resample=8000,volume=+4db:sc movie.mpeg
An output file called audiodump.wav will be created that has the audio that we require. Finally we need to combine these two files together.
ffmpeg -i movie.avi -i audiodump.wav \
-b 48 -ac 1 -ab 12 -map 0.0 -map 1.0 movie.3GP
And that is that. I suppose I should add this to the HantsLUG wiki. Next I need to bundle this lot up into a script so I can then forget all about how this works
November 21st, 2006 at 10:49 am
thank you for share~~~
November 23rd, 2006 at 8:49 am
You can directly use single command with ffmpeg:
ffmpeg -i movie.mpeg -vcodec mpeg4 -r 15 -b 128k -s qcif -acodec amr_nb -ar 8000 -ac 1 -ab 13 -f 3gp -y output.3gp
November 23rd, 2006 at 5:05 pm
[...]   比尔盖茨的梦想就是让æ¯ä¸€ä¸ªäººçš„æ¡Œå上有一å°PC,所以他设计了Windows,一个é¢å‘用户的,“易用â€çš„æ“ä½œç³»ç»Ÿã€‚ä»–ä»¬è¿˜å–笑Google说,我们的产å“黿€§æ¯”ä½ ä»¬çš„å¼ºï¼Œå› ä¸ºå¦‚æžœæœç´¢å¼•擎å了,å¯ä»¥é©¬ä¸Šæ¢ä¸€ä¸ªï¼›å¦‚æžœWindowså了,用户ä¸ä¼šæ¢ä¸€ä¸ªï¼Œä»–们åªä¼šå¾ˆç€æ€¥ï¼Œæƒ³åŠžæ³•åŽ»ä¿®å¥½å®ƒã€‚ç„¶è€Œï¼ŒçŽ°åœ¨å‡ ä¹Žæ¯ä¸€ä¸ªWindowsç”¨æˆ·éƒ½å¤„åœ¨ç—…æ¯’å’Œæµæ°“软件的å¨èƒä¹‹ä¸â€”—国内刚刚还出å°äº†â€œæµæ°“软件â€çš„æ–°å®šä¹‰â€”â€”å¹¶å› æ¤å…»æ´»äº†ä¸€å¤§æ‰¹çš„安全厂商。Windows下的æ¯ä¸€å¤©ï¼Œéƒ½å¥½åƒåœ¨å’Œç—…毒之类的东西战斗。最近一两个月,å—å¼€çš„æ ¡å›ç½‘络就深å—arp病毒的影å“ï¼Œè’™æ¥¼çš„ç½‘ç»œå‡ ä¹Žæ¯å‘¨éƒ½è¦ç˜«ç—ªä¸€ä¸¤å¤©ã€‚  但是Windows也有很多优点,比如说它的程åºå¾ˆå¤šæ—¶å€™éƒ½æ˜¯ä¸ºç€ç”¨æˆ·è€ƒè™‘的,使用起æ¥å¾ˆé¡ºæ‰‹ã€‚出了微软自己的Office系列,其他第三方软件也大都很好用,下载ï¼å®‰è£…ï¼ä½¿ç”¨æ˜¯é€šå¸¸çš„过程。而Linuxçš„ä¸–ç•Œä¸‹ï¼Œä½ è¦é¢å¯¹çš„就太多了。ä¸ç®¡æ˜¯Debian还是SuSE,或者是Ubuntu,è¦è£…什么软件,ç»å¸¸ä¸èƒ½å¤Ÿä¸€æ¥åˆ°ä½ï¼ˆå°½ç®¡æœ‰aptè¿™æ ·å¦‚æ¤ä¼˜ç§€çš„包管ç†ç³»ç»Ÿï¼‰ï¼Œæ€»æ˜¯æœ‰äº›å¿…è¦çš„东西会游离在系统之外,需è¦ç”¨æˆ·è‡ªå·±å޻处ç†ã€‚这也是caii原æ¥åœ¨blogä¸æåˆ°çš„â€”â€”å…¶å®žæ»¡è¶³ç”¨æˆ·çš„éœ€æ±‚ï¼Œè‡³å°‘èƒ½å¤ŸæŠŠåŸºæœ¬çš„å—体之类的东西弄好了,就是国内LinuxåŽ‚å•†çš„ä¸€ç§æœºä¼šã€‚  最近我在我的Ubuntu 6.10ä¸Šé‡æ–°è£…上了KDE,并转å‘KDE桌é¢ã€‚在SuSE下使用了一个多月KDE桌é¢ä¹‹åŽï¼Œæˆ‘çš„åå¥½æ€»ç®—æ›´åŠ å€¾å‘KDE了。相对于Gnomeæ¥è¯´ï¼ŒKDEæ˜Žæ˜¾æ˜¯ä¸€ä¸ªæ›´åŠ æˆç†Ÿï¼Œæ‹Ÿåˆåº¦æ›´å¥½çš„æ¡Œé¢ç³»ç»Ÿã€‚很多Gnome的程åºï¼Œæ¯”如说tomboy,比如说最近很ç«çƒçš„F-spot,完全没有“帮助â€ï¼Œè€Œåªæœ‰ä¸€ä¸ªâ€œå…³äºŽâ€ï¼Œå¥½åƒæ‘¸ç´¢æ˜¯ç”¨æˆ·åº”该作åšçš„事情,而大部分KDE程åºä¼šæœ‰çŸ¥é“简å•çš„å¸®åŠ©â€”â€”æ˜¯å¦æ˜¯å› 为整个KDE桌é¢çš„基础帮助系统比较完善?Gnome的主èœå•用了三组文å—作为èœå•åï¼Œè€Œä¸æ˜¯ç”¨ä¸€ä¸ªå›¾æ ‡â€”—ä¸å¤ªæ¸…æ¥šä»–ä»¬ä¸ºä»€ä¹ˆè¿™æ ·è®¾è®¡ï¼Œä½†æ˜¯ï¼Œä¸ºä»€ä¹ˆä¸èŠ‚çœç”¨æˆ·çš„æ¡Œé¢ç©ºé—´å‘¢ï¼Ÿè¿˜æœ‰å¾ˆå¤šGnome的桌é¢å°ç¨‹åºéƒ½è¿˜å¤„于å‘展的åˆçº§é˜¶æ®µï¼Œæ¯”如说我最近用到的bluetooth,Gnome下的bluetooth没有任何选项,在接收到任何一个文件的时候就弹出一个æç¤ºè€Œå·²ï¼›ç›¸å¯¹æ¥è¯´ï¼ŒKDEçš„kbluetooth就好用多了。  最近终于找到把avi文件转æˆ3gpæ ¼å¼çš„æ–¹æ³•了,出了mencoder,还需è¦ç”¨åˆ°ffmpeg。 mencoder movie.mpeg -nosound -ovc lavc -lavcopts vcodec=mpeg4 -vop expand=176:144,scale=176:-2 -o movie.avi -ofps 12mplayer -vo null -ao pcm -afresample=8000,volume=+4db:sc movie.mpegffmpeg -i movie.avi -i audiodump.wav -b 48 -ac 1 -ab 12 -map 0.0 -map 1.0 movie.3GP [...]
November 23rd, 2006 at 9:00 pm
Nope, I am note sure what that says. By using Google Language tools, it would appear that it is a comment about Microsoft and Linux. Unfortunately the Chinese to English translation of Google is not that great. All I am sure of is that the first line mentions Bill Gates.
November 24th, 2006 at 4:08 am
Let me help you, hope my translation could bring out the thought of the author precisely
Bill Gates’ dream is to let everybody’s desk to have a PC, therefore he designed Windows, a user based, “easy to use” operating system. They teased Google, “our product is more sticky than yours, because if search engine damaged, it could be switched to another immediately; but if Windows damaged, user doesn’t know how to switch, they would be worried, trying to fix it.” However, almost every Windows user live in the threatening of virus and hoodlum software**, China has just having a new definition for “hoodlum software”, and this has created a bunch of security software companies. Live with Windows is like fighting with virus everyday. Since 1-2 months ago, “Nan Kai” school network is affected by arp virus, “Meng Lou” building’ s network down 1-2 days every week.
However Windows has many advantages, for example its software is designed for user, easy to use. Beside MS Office series, other 3rd party software are easy to use too, download-install-use is the common steps. But you need to face a lot of problem with Linux. No matter Debian or SuSe or Ubuntu, software installation always require more effort (even though there is a good package management system like apt), there will always be something outside the system, that require user to handle by themselves. This is also mentioned by caii in his blog: to satisfy user’s need, at least to make a good work on fundamental stuff like font, is an opportunity to Linux software company in China.
Recently I reinstall KDE on my Ubuntu 6.10, and switched to KDE desktop. After using KDE with SuSe for a month, my preference has gone to KDE. Compare to Gnome, KDE is more mature, well designed desktop system. Many Gnome software, e.g.: tomboy and F-spot, don’t have “Help” at all, there is only an “about”, assuming finding out how to use is the users job. Most KDE software would have a simple help, could it be due to the KDE ‘ fundamental system help is more complete? Gnome main menu uses 3 group of text as menu list, and not using icon, not really understand why they design in such a way, but why don’t they save the desktop space of user? There are also a lot of Gnome desktop application is still in experimental stage, for example bluetooth that I used recently, there is no options of bluetooth in Gnome, when receiving a file, there is only one message box pop up. In the other hand, KDE’s kbluetooth is much better.
I finally found the method to convert avi to 3gp, beside mencoder, ffmpeg is also needed. mencoder movie.mpeg -nosound -ovc lavc -lavcopts vcodec=mpeg4 -vop expand=176:144,scale=176:-2 -o movie.avi -ofps 12mplayer -vo null -ao pcm -afresample=8000,volume=+4db:sc movie.mpegffmpeg -i movie.avi -i audiodump.wav -b 48 -ac 1 -ab 12 -map 0.0 -map 1.0 movie.3GP
**I do not know this term, just direct translate, but it means software like adware, spyware, malicious software …
November 28th, 2006 at 11:42 am
The vop expand=176:144,scale=176:-2 part sets the resolution. Shouldn’t you use 320 x 240 for SE k800i instead of 176 x 144 for better resolution?
November 28th, 2006 at 12:54 pm
I could be wrong, so don’t quote me, but I think that the 3gp specification sets the size and the bandwidth required. So although the K800i has a higher resolution screen, I am not sure you can create a higher resolution file and still be 3gp compliant.
The thing to do is to give it a go. However, please don’t blame me if it turns your phone into a smouldering wreck
If it does work, a post here telling of your success would be appreciated.
January 25th, 2007 at 6:51 pm
Setting resolution to 320×240 works perfectly. It will make the filesize slightly bigger, so try yourself whether it’s worth it or not. You can use a single command to do everything, just like peikfeng already posted. Thanks for these instructions anyway!