View previous topic :: View next topic |
Author |
Message |
lordkur Tux's lil' helper
Joined: 13 Feb 2004 Posts: 105 Location: Venezuela
|
Posted: Fri Nov 02, 2007 4:49 pm Post subject: Convert your videos to 3gp format |
|
|
I just did a couple of things to get my own videos on 3gp format so I can watch them on my cellphone !!!.
1- Install ffmpeg
Code: |
USE='amr encode imlib v4l x264' emerge -v /usr/portage/media-video/ffmpeg/ffmpeg-0.4.9_p20070616-r2.ebuild |
2- Check if the libamr_nb and libamr_nw flags are available after install
Code: |
ffmpeg -formats |grep amr
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --enable-static --enable-shared --cc=i686-pc-linux-gnu-gcc --disable-mmx --disable-altivec --disable-debug --disable-dv1394 --disable-ffplay --disable-network --disable-opts --enable-libmp3lame --enable-libvorbis --enable-libogg --enable-liba52 --enable-libxvid --enable-x11grab --enable-libogg --enable-libx264 --enable-libfaad --enable-libfaac --enable-libamr-nb --enable-libamr-wb --enable-gpl --enable-pp --enable-swscaler --disable-strip
libavutil version: 49.4.0
libavcodec version: 51.40.4
libavformat version: 51.12.1
built on Nov 2 2007 11:55:15, gcc: 4.1.2 (Gentoo 4.1.2)
DE amr 3gpp amr file format
DEA libamr_nb
DEA libamr_wb
|
If you dont see those babies (libamr_nb and libamr_wb) there is something wrong
3- I just made a little script to try to make easier the job
Code: | #!/bin/bash
#nokia-encoder.sh file
filein=$1
fileout=$2
#Check ffmpeg's compilation flags before using this script
ffmpeg -i "${filein}" -f 3gp -vcodec h263 -qmin 3 -qmax 5 -b 120 -acodec libamr_nb -ar 8000 -ab 10.2k -ac 1 -s 128x96 "${fileout}.3gp"
|
Usage:
Code: | ./nokia-encoder.sh Filein.avi Fileout.3gp |
It would be enough, enjoy!!! |
|
Back to top |
|
|
nixnut Bodhisattva
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
Posted: Fri Nov 02, 2007 5:27 pm Post subject: |
|
|
Moved from Multimedia to Documentation, Tips & Tricks. _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
talk is cheap. supply exceeds demand |
|
Back to top |
|
|
Lowspirit Apprentice
Joined: 31 Jul 2002 Posts: 258 Location: Northern Sweden
|
Posted: Sat Nov 03, 2007 5:40 pm Post subject: |
|
|
Here is same script basically but for my Sony Ericsson k700i, posting here incase I loose my script again :
You get roughly 1 minute per MB with these settings, slightly better, your standard 20-22min series episode takes around 15MB.
Code: |
#!/bin/sh
# File : to3gp.sh script for Sony Ericsson with screensize 176x144 (such as k700i).
# Usage : to3gp.sh filename.avi
# Generates a .3gp file with same name as the .avi
FILE=$1
shift
rm -f "$FILE".3gp
ffmpeg \
-i "$FILE" \
-qmin 5 \
-qmax 8 \
-ar 8000 \
-ac 1 \
-acodec libamr_nb \
-vcodec h263 \
-s 176x144 \
-r 12 \
-b 120 \
-ab 12200 \
"$FILE".3gp
|
_________________ Gentoo | AMD X2 3800+ 2GB RAM | Kernel 2.6.30 . ReiserFS . CFQ . GCC4.3.3 | Firefox 3.5 | Gnome 2.26 w/ Compiz-Fusion
"Penguins are the only fish that can fly" |
|
Back to top |
|
|
lordkur Tux's lil' helper
Joined: 13 Feb 2004 Posts: 105 Location: Venezuela
|
Posted: Sun Nov 04, 2007 5:41 pm Post subject: |
|
|
Excelent! I have a Sony Ericsson K550i and goes fine....
Thanks!
Lowspirit wrote: | Here is same script basically but for my Sony Ericsson k700i, posting here incase I loose my script again :
You get roughly 1 minute per MB with these settings, slightly better, your standard 20-22min series episode takes around 15MB.
Code: |
#!/bin/sh
# File : to3gp.sh script for Sony Ericsson with screensize 176x144 (such as k700i).
# Usage : to3gp.sh filename.avi
# Generates a .3gp file with same name as the .avi
FILE=$1
shift
rm -f "$FILE".3gp
ffmpeg \
-i "$FILE" \
-qmin 5 \
-qmax 8 \
-ar 8000 \
-ac 1 \
-acodec libamr_nb \
-vcodec h263 \
-s 176x144 \
-r 12 \
-b 120 \
-ab 12200 \
"$FILE".3gp
|
|
|
|
Back to top |
|
|
diegoto Guru
Joined: 10 Jun 2006 Posts: 305 Location: Argentina
|
Posted: Tue Nov 27, 2007 6:41 pm Post subject: |
|
|
How to use this script with my Motorola z6, my screen is 240x320, and the h263 not support this size.
thanks _________________ Diego Najar
http://www.muser.com.ar <-- Blog Personal |
|
Back to top |
|
|
zietbukuel l33t
Joined: 30 Dec 2005 Posts: 607
|
Posted: Mon Jan 07, 2008 4:44 am Post subject: |
|
|
Thanks a lot for the tip |
|
Back to top |
|
|
lazy_bum l33t
Joined: 16 Feb 2005 Posts: 691
|
Posted: Thu Jan 10, 2008 9:16 pm Post subject: |
|
|
I've made a little script for my girlfriend, so she can easly convert video for her SE k750i. Also used h263 for video as mentioned before. The script also uses mplayer/mencoder before ffmpeg and (thanks to that) it supports more codecs.
There's also a little "TODO", but I don't know when it would be done. (-; _________________ roslin uberlay | grubelek |
|
Back to top |
|
|
micro_mx n00b
Joined: 11 Nov 2004 Posts: 29
|
Posted: Tue Jun 09, 2009 11:38 pm Post subject: |
|
|
diegoto wrote: | How to use this script with my Motorola z6, my screen is 240x320, and the h263 not support this size.
thanks |
for the z6 you could use mp4 instead of 3gp, more quality for sure |
|
Back to top |
|
|
|