Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HOW-TO] converting videos to .3gp for phones/pda support
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
mrgamer
Apprentice
Apprentice


Joined: 09 Dec 2003
Posts: 151
Location: Italy, near Rome

PostPosted: Fri Feb 06, 2004 12:43 am    Post subject: [HOW-TO] converting videos to .3gp for phones/pda support Reply with quote

does anybody need this how-to ? :wink: :?:
Back to top
View user's profile Send private message
tageiru
n00b
n00b


Joined: 26 Oct 2002
Posts: 46

PostPosted: Sun Feb 08, 2004 11:20 am    Post subject: Reply with quote

yes

:)
Back to top
View user's profile Send private message
rincewind
Apprentice
Apprentice


Joined: 16 Aug 2002
Posts: 172
Location: Essen, Germany

PostPosted: Fri Mar 19, 2004 8:33 am    Post subject: Reply with quote

yes, when do you post it ? :D
Back to top
View user's profile Send private message
Razzle
n00b
n00b


Joined: 12 Jan 2004
Posts: 50
Location: Berlin, Germany

PostPosted: Tue Apr 27, 2004 4:16 pm    Post subject: Reply with quote

I could need that one, too.
Back to top
View user's profile Send private message
BudgetDedicated
n00b
n00b


Joined: 26 Apr 2004
Posts: 12
Location: NL

PostPosted: Thu Apr 29, 2004 7:17 pm    Post subject: Reply with quote

Please share it :)
_________________
Grt, Erik
[ My commercial Ad.: Europe's top quality Gentoo VPS provider: BudgetDedicated (starting at 20 euro/month) ]
Back to top
View user's profile Send private message
Soulprayer
n00b
n00b


Joined: 29 Apr 2004
Posts: 11
Location: Germany

PostPosted: Thu Apr 29, 2004 10:24 pm    Post subject: Reply with quote

I want this tut, too ! :D
_________________
Greetz
Soulprayer
__
Someone told me to get a PC. When i got one, it was boring. Then i switched to Linux.
Someone told me to get a life, so I bought Quake.
Someone told me to get hobbies. Well, i had fun with my PC, so i became programmer.
Back to top
View user's profile Send private message
Soulprayer
n00b
n00b


Joined: 29 Apr 2004
Posts: 11
Location: Germany

PostPosted: Sun May 02, 2004 10:58 pm    Post subject: Tip: Styles can be applied quickly to selected text. Reply with quote

do we have to post our e-mails ? ;-)
plz mail 2 plz.send.to.me@gmx.de

thx. ^___^
_________________
Greetz
Soulprayer
__
Someone told me to get a PC. When i got one, it was boring. Then i switched to Linux.
Someone told me to get a life, so I bought Quake.
Someone told me to get hobbies. Well, i had fun with my PC, so i became programmer.
Back to top
View user's profile Send private message
berkano
n00b
n00b


Joined: 06 May 2003
Posts: 11
Location: Zweibruecken/Germany

PostPosted: Fri Jul 23, 2004 10:06 am    Post subject: Reply with quote

Yes! I need it too! Could you please post it here?
Back to top
View user's profile Send private message
Zidge
Tux's lil' helper
Tux's lil' helper


Joined: 20 Aug 2003
Posts: 86

PostPosted: Fri Jul 23, 2004 3:38 pm    Post subject: Reply with quote

ho yes that could be fantastic !!
post it please :-)
Back to top
View user's profile Send private message
Epcylon
n00b
n00b


Joined: 24 Nov 2002
Posts: 34
Location: Oslo, Norway

PostPosted: Thu Aug 05, 2004 11:57 am    Post subject: .o/ Reply with quote

Yup!

And if you include how to go the other way (to mpg or avi) aswell, that'd be great. :)
_________________
Epcylon
Back to top
View user's profile Send private message
Lowspirit
Apprentice
Apprentice


Joined: 31 Jul 2002
Posts: 258
Location: Northern Sweden

PostPosted: Mon Aug 23, 2004 10:28 pm    Post subject: Reply with quote

Why is this posted as a HOWTO when all it contains is a question? And yes, i'd be much interested in a tutorial to do this.
_________________
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
View user's profile Send private message
phranzee
Guru
Guru


Joined: 22 Nov 2003
Posts: 397
Location: katowice/pl

PostPosted: Tue Aug 24, 2004 3:58 pm    Post subject: Reply with quote

great how-to.......
yes, i need it.
_________________
signature fault
post dumped ;]
Back to top
View user's profile Send private message
kurppa
Tux's lil' helper
Tux's lil' helper


Joined: 21 Mar 2003
Posts: 97

PostPosted: Thu Oct 21, 2004 4:54 pm    Post subject: HOW-TO Reply with quote

Here's a brief HOW-TO to 3gp and Gentoo.

Playing 3gp files

Helix player plays 3gp-files without a problem, at least with Real-codecs. I'm not sure if they are needed.

Helix Player is in portage (helixplayer and helixplayer-bin):
Code:
emerge helixplayer


You can make mplayer play 3gp files too, but sound won't work. Mplayer doesn't recognize all 3gp files by default. You need to add a line to: /usr/share/mplayer/codecs.conf

ADD:
format 0x33363273

AFTER:
videocodec ffh263


Coverting other formats to 3gp

If you wan't to convert videos to 3gp to watch them on your phone, you need to emerge the latest ffmpeg (0.4.9_pre1). If you wan't the sound to work, you need to download the AMR-sound sources and make some changes to the ebuild.

As root, first you need to download the amr sources to /usr/portage/distfiles:
Code:
cd /usr/portage/distfiles

wget http://www.3gpp.org/ftp/Specs/archive/26_series/26.104/26104-510.zip


Then you need to edit the ffmpeg-ebuild:
Code:
nano -w /usr/portage/media-video/ffmpeg/ffmpeg-0.4.9_pre1.ebuild

ADD:

mkdir ./libavcodec/amr_float
cd ./libavcodec/amr_float
unzip /usr/portage/distfiles/26104-510.zip
unzip 26104-510_ANSI_C_source_code.zip
cd ../


AFTER these lines:

src_unpack() {
unpack${A} || die
cd ${S}



Then REPLACE this line:
myconf="${myconf} --disable-opts --enable-pp --enable-gpl"

with this one:
myconf="${myconf} --disable-opts --enable-pp --enable-gpl --enable-amr_nb"


Then you can emerge ffmpeg-0.4.9_pre1:
Code:
emerge /usr/portage/media-video/ffmpeg/ffmpeg-0.4.9_pre1.ebuild


You can check if AMR-sound is enabled with:
Code:
ffmpeg -formats


Now you can convert videos to 3gp with ffmpeg. Ffmpeg doesn't do as many input-formats and can't handle erroneous files as wells as mplayer, so it might be a good idea to convert files to a lossless format first with mencoder and then to 3gp with ffmpeg. You can also run different output filters with mencoder, such as crop, brightness etc, check the mencoder man page. You can also resize the file allready in mencoder.

Code:

mencoder original_file.avi -oac pcm -ovc lavc -lavcopts vcodec=mjpeg -sws 2 -vf scale=176:144:2:100 -o small_file.avi

ffmpeg -i small_file.avi -ar 8000 -ac 1 -acodec amr_nb -vcodec h263 -s 176x144 -r 12 -b 30 -ab 12 new_file.3gp


acknowledgements:
http://www.cdavies.org/permalink/towardsmobiletivo.php
http://excamera.com/articles/24/movie.html


Last edited by kurppa on Tue Jun 14, 2005 10:20 am; edited 1 time in total
Back to top
View user's profile Send private message
kevinlevin
n00b
n00b


Joined: 01 Oct 2003
Posts: 2
Location: Austria

PostPosted: Sun Nov 28, 2004 10:15 pm    Post subject: Re: HOW-TO Reply with quote

kurppa wrote:

Code:

  mkdir ./libavcodec/amr_float
  cd ./libavcodec/amr_float
  unzip /usr/portage/distfiles/26104-510.zip
  cd ../



Maybe the structure of the archive "26104-510.zip" has changed a little bit since the posting of this HOWTO.

To get the ebuild running I had to unzip "26104-510_ANSI_C_source_code.zip" (it's included in 26104-510.zip) like this:

Code:

  mkdir ./libavcodec/amr_float
  cd ./libavcodec/amr_float
  unzip /usr/portage/distfiles/26104-510.zip
  unzip 26104-510_ANSI_C_source_code.zip
  cd ../
Back to top
View user's profile Send private message
kurppa
Tux's lil' helper
Tux's lil' helper


Joined: 21 Mar 2003
Posts: 97

PostPosted: Tue Nov 30, 2004 4:17 pm    Post subject: Re: HOW-TO Reply with quote

Quote:
To get the ebuild running I had to unzip "26104-510_ANSI_C_source_code.zip" (it's included in 26104-510.zip) like this:


You're right, that file needs to be unzipped as well. It worked like that before, I just forgot that line. :oops:
Back to top
View user's profile Send private message
djm
Arch/Herd Tester
Arch/Herd Tester


Joined: 12 Apr 2004
Posts: 690
Location: Wadham College, Oxford

PostPosted: Sun Jan 02, 2005 5:37 pm    Post subject: Reply with quote

Ok so I can make 3gp files using ffmpeg, but...

I can't get any sound when playing 3gp files on my computer, even though they have sound when played on a phone. I've tried xine, mplayer and realplayer 10 (and a few other things that don't even play the video part right), but I get the same results with all of them.

Has anyone managed to get these to play on their computer with audio working?
_________________
the forums.gentoo.org poster formally known as metal leper
Back to top
View user's profile Send private message
NaN
Tux's lil' helper
Tux's lil' helper


Joined: 02 Feb 2003
Posts: 93
Location: England

PostPosted: Sun Jan 09, 2005 7:16 pm    Post subject: Reply with quote

Not quite ... but some observations that my help someone else take a step forward.

I can also encode 3gp files now. I have installed ffmpeg 0.4.9_pre1 along with the 3GPP code for the amr_nb floating point codec. Although ffservser no longer works, encoding 3gp files seems better.

I also tried the amr_nb fixed point code and also the amr_wb code from 3GPP but could not get either to build with ffmpeg 0.4.9_pre1. I have not yet tried to find out why...

I still cannot play back the 3gp encoded files with audio. I get video but no sound. Mplayer comes closest to succeeding. ffplay crashes on any 3gp files that have audio - I have not spent any time exploring why yet.

Mplayer seems to be almost there, and I read of at least one person who has succeeded with it on the mplayer email lists. What I did was add the following to the codecs.conf file:
Code:
audiocodec ffamr
  info "3GPP amr codec"
  status untested
  format 0x726D6173
  driver ffmpeg

Now when I try to play a 3gp file with audio MPLayer dies with the following message:
Code:
MPlayer interrupted by signal 11 in module: init_audio_codec
- MPlayer crashed by bad usage of CPU/FPU/RAM.
  Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and
  disassembly. Details in DOCS/HTML/en/bugreports_what.html#bugreports_crash.
- MPlayer crashed. This shouldn't happen.
  It can be a bug in the MPlayer code _or_ in your drivers _or_ in your
  gcc version. If you think it's MPlayer's fault, please read
  DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and
  won't help unless you provide this information when reporting a possible bug.

However, it has detected the audio stream as follows:
Code:
Audio bits: 16  chans: 2  rate: 8000
MOV: Found unknown audio atom damr (17)!
Fourcc: samr

and then says
Code:
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders

just before it dies.

"ffmpeg -formats" reports the amr_nb codec as being present.

If I invoke Mplayer with the switch "-ac amr_nb" codec it reports:
Code:
Forced audio codec: amr_nb
Cannot find codec for audio format 0x726D6173.
Read DOCS/HTML/en/codecs.html!


The person who reported it working compiled libavcodec as part of Mplayer rather than using the ffmpeg shared library. I have not tried doing this yet. :roll:

If anyone makes further progress with this I'd be keen to hear.
Back to top
View user's profile Send private message
NaN
Tux's lil' helper
Tux's lil' helper


Joined: 02 Feb 2003
Posts: 93
Location: England

PostPosted: Tue Jan 11, 2005 1:33 pm    Post subject: Reply with quote

I've been able to get the fixed point code from 3GPP to build with ffmpeg now, but it seems to make no difference and I still can't get MPlayer to play the audio of 3gp encoded files. Still unable to get the amr_wb version to build ...
Back to top
View user's profile Send private message
NaN
Tux's lil' helper
Tux's lil' helper


Joined: 02 Feb 2003
Posts: 93
Location: England

PostPosted: Thu Jan 13, 2005 6:05 pm    Post subject: Audio works now for 3gp media files using the amr_nb codec Reply with quote

OK I've got MPlayer to play back my 3gp files using the amr_nb codec.

I downloaded the latest source for MPlayer from CVS and also for ffmpeg, copying the libavcodec stuff into MPlayer. I extracted the 3GPP codec as directed in amr.c and then built MPlayer with all the defaults except with --prefix pointing to a local user space installation directory.

It plays the 3gp encoded files with the amr_nb codec fine. :D

Perhaps there is something about the way the MPlayer ebuild is configured that is a problem? I haven't yet looked.

There is also another way you can play them back. Install Quicktime 6. It runs fine under wine (I use CodeWeavers) and the audio for the 3gp encoded files also works.

So now I have two ways of playing then on my linux box. :o
Back to top
View user's profile Send private message
latz-twn
Tux's lil' helper
Tux's lil' helper


Joined: 08 Nov 2003
Posts: 95
Location: Luxembourg

PostPosted: Thu Jan 13, 2005 7:50 pm    Post subject: Reply with quote

excellent job ! 8)

Thx for the HowTO :) I needed that aswell cause I have a Sony Ericson Z1010 ! Does anybody know btw if there is any way of synchronizing the phonebook contacts with kontact with that kind of phones? :roll:
Back to top
View user's profile Send private message
NaN
Tux's lil' helper
Tux's lil' helper


Joined: 02 Feb 2003
Posts: 93
Location: England

PostPosted: Fri Jan 14, 2005 7:53 am    Post subject: Reply with quote

Not offhand but here are a few projects you might take a look at:

KSyncML
MultiSync http://www.multisync.org/
syncml server in php http://nicolas.bougues.net/syncml/

I'd be interested to hear if you succeed, and also of any other projects people know of.
Back to top
View user's profile Send private message
kurppa
Tux's lil' helper
Tux's lil' helper


Joined: 21 Mar 2003
Posts: 97

PostPosted: Thu Jan 27, 2005 4:12 pm    Post subject: Re: Audio works now for 3gp media files using the amr_nb cod Reply with quote

NaN wrote:
OK I've got MPlayer to play back my 3gp files using the amr_nb codec.

There is also another way you can play them back. Install Quicktime 6. It runs fine under wine (I use CodeWeavers) and the audio for the 3gp encoded files also works.


Did you try Helix? At least I had sound on .3gp working right away with it. I'm using v. 0.3.0.116

I'm not sure if I installed some extra codecs but I don't think so. You should give Helix a try, it probably plays 3gp-files with sound out of the box.
Code:
emerge helixplayer-bin
Back to top
View user's profile Send private message
amne
Bodhisattva
Bodhisattva


Joined: 17 Nov 2002
Posts: 6378
Location: Graz / EU

PostPosted: Thu Jan 27, 2005 6:40 pm    Post subject: Reply with quote

Moved from GC.
_________________
Dinosaur week! (Ok, this thread is so last week)
Back to top
View user's profile Send private message
kurppa
Tux's lil' helper
Tux's lil' helper


Joined: 21 Mar 2003
Posts: 97

PostPosted: Wed Mar 02, 2005 11:23 am    Post subject: Re: Audio works now for 3gp media files using the amr_nb cod Reply with quote

kurppa wrote:

Did you try Helix? At least I had sound on .3gp working right away with it. I'm using v. 0.3.0.116


Actually, Helix seems to play some 3gp-files fine with working sound, but some files it doesn't play at all and just reports:

The following components are required:
video/X-RN-MP4
Back to top
View user's profile Send private message
cmroddy
n00b
n00b


Joined: 03 Apr 2005
Posts: 3
Location: atlanta, ga

PostPosted: Sun Apr 03, 2005 1:25 am    Post subject: Reply with quote

thank you. this is just the thing i've been looking for!

now start watching star trek on the bus again :-p
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum