Monday, 11 May 2009

Tips : How to convert flv to 3gp in Ubuntu

If you have a flv video format in your computer and want to convert it to 3gp so you can play this video in your cellphone, you can go to this tutorial step by step:

first you need ffmpeg, but in ubuntu it needs more some libraries to complete it. Try this command in your terminal :

sudo apt-get install ffmpeg

then add this command after it :
sudo aptitude install libavcodec-unstripped-51 libavdevice-unstripped-52 libavformat-unstripped-52 libavutil-unstripped-49 libpostproc-unstripped-51 libswscale-unstripped-0

After this installation complete, then you can use it to convert by this command :
ffmpeg -i fileInput.flv -s 176×144 -vcodec h263 -r 25 -b 200 -ab 64 -acodec mp3 -ac 1 -ar 8000 fileOutput.3gp



NB:
1. -i means input and -o is output, you can see the configuration of resolution in this file
2. change the fileInput and fileOutput to the name of your target and destination file

5 comments:

Unknown said...

anandan@anandan-laptop:~/dwhelper$ ffmpeg -i Nuvvunte.flv -s 294×240 -vcodec h263 -r 25 -b 200 -ab 64 -acodec mp3 -ac 1 -ar 8000 Nuvvunte.3gp
FFmpeg version SVN-r19352-4:0.5+svn20090706-2ubuntu2, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --extra-version=4:0.5+svn20090706-2ubuntu2 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --extra-cflags=-I/build/buildd/ffmpeg-0.5+svn20090706/debian/include --enable-shared --disable-static
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Oct 13 2009 22:15:16, gcc: 4.4.1

Seems stream 0 codec frame rate differs from container frame rate: 2000.00 (2000/1) -> 25.00 (25/1)
Input #0, flv, from 'Nuvvunte.flv':
Duration: 00:04:58.60, start: 0.000000, bitrate: 202 kb/s
Stream #0.0: Video: h264, yuv420p, 294x240 [PAR 1:1 DAR 49:40], 202 kb/s, 25 tbr, 1k tbn, 2k tbc
Stream #0.1: Audio: aac, 22050 Hz, stereo, s16
Incorrect frame size

Anonymous said...

"Incorrect frame size"
Maybe it's caused by the typo..
I changed the 'x' that was copied from this blog and write it by myself..

The second problem is that it can't find the 'mp3' encoder..
So then I'm looking for other encoder..
I found "libopencore_amrnb" and using it..
It works, although not very nice..

MuthuSelvan said...

how to uninstall it

muhammad said...

it's failed

first answer sudo: aptitude: command not found
second answer fileInput.flv: No such file or directory

muhammad said...

it's failed

first answer sudo: aptitude: command not found
second answer fileInput.flv: No such file or directory

Post a Comment