Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

Convert your videos to 3gp format

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
lordkur
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 105
Joined: Fri Feb 13, 2004 9:17 pm
Location: Venezuela

Convert your videos to 3gp format

  • Quote

Post by lordkur » Fri Nov 02, 2007 4:49 pm

I just did a couple of things to get my own videos on 3gp format so I can watch them on my cellphone :D !!!.


1- Install ffmpeg

Code: Select all

 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: Select all

  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: Select all

#!/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: Select all

./nokia-encoder.sh Filein.avi Fileout.3gp 

It would be enough, enjoy!!! :D
Top
nixnut
Bodhisattva
Bodhisattva
User avatar
Posts: 10974
Joined: Fri Apr 09, 2004 1:43 pm
Location: the dutch mountains

  • Quote

Post by nixnut » Fri Nov 02, 2007 5:27 pm

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
Top
Lowspirit
Apprentice
Apprentice
User avatar
Posts: 258
Joined: Wed Jul 31, 2002 10:50 pm
Location: Northern Sweden

  • Quote

Post by Lowspirit » Sat Nov 03, 2007 5:40 pm

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: Select all

#!/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"
Top
lordkur
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 105
Joined: Fri Feb 13, 2004 9:17 pm
Location: Venezuela

  • Quote

Post by lordkur » Sun Nov 04, 2007 5:41 pm

:D 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: Select all

#!/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
Top
diegoto
Guru
Guru
Posts: 305
Joined: Sat Jun 10, 2006 7:56 pm
Location: Argentina
Contact:
Contact diegoto
Website

  • Quote

Post by diegoto » Tue Nov 27, 2007 6:41 pm

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
Top
zietbukuel
l33t
l33t
User avatar
Posts: 607
Joined: Fri Dec 30, 2005 9:45 pm

  • Quote

Post by zietbukuel » Mon Jan 07, 2008 4:44 am

Thanks a lot for the tip :)
Top
lazy_bum
l33t
l33t
User avatar
Posts: 691
Joined: Wed Feb 16, 2005 8:55 am

  • Quote

Post by lazy_bum » Thu Jan 10, 2008 9:16 pm

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
Top
micro_mx
n00b
n00b
User avatar
Posts: 29
Joined: Thu Nov 11, 2004 2:01 am

  • Quote

Post by micro_mx » Tue Jun 09, 2009 11:38 pm

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
Top
Post Reply

8 posts • Page 1 of 1

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy