{"id":23,"date":"2006-08-27T01:16:59","date_gmt":"2006-08-27T00:16:59","guid":{"rendered":"http:\/\/stuphi.co.uk\/wordpress\/?p=23"},"modified":"2006-10-04T11:02:42","modified_gmt":"2006-10-04T10:02:42","slug":"create-and-play-3gp-files-in-ubuntu","status":"publish","type":"post","link":"https:\/\/stuphi.co.uk\/wordpress\/?p=23","title":{"rendered":"Create and Play 3gp files in Ubuntu"},"content":{"rendered":"<p>OK, so I have a nice new Video phone. I want to be able to play, edit and create the videos. The format that the Sony Ericsson phone uses is 3gp. It turns out that ffmpeg can handle these, but no sound with the version that comes with ubuntu. Here is how I went about fixing this. Please remember that a lot of of this was discovered by Google, and not really my own work.<\/p>\n<p>The first thing to do is make sure that universe and multiverse are available. I used <a href=\"http:\/\/ubuntuguide.org\/wiki\/Dapper#Repositories\">these<\/a> ones.<\/p>\n<p>Now we need to get the software that we want. The following commands should do that for us.<\/p>\n<p><code>sudo apt-get build-dep ffmpeg<br \/>\nsudo apt-get install liblame-dev libfaad2-dev \\<br \/>\nlibfaac-dev libxvidcore4-dev checkinstall fakeroot<br \/>\napt-get source ffmpeg<br \/>\ncd ffmpeg-0.cvs20050918<br \/>\nless libavcodec\/amr.c<br \/>\n<\/code><\/p>\n<p>You now need to read the instructions in that source file. I decided to use the floating point versions of both, so I executed the following commands.<\/p>\n<p><code> mkdir libavcodec\/amr_float<br \/>\ncd libavcodec\/amr_float<br \/>\nwget http:\/\/www.3gpp.org\/ftp\/Specs\/archive\/26_series\/26.104\/26104-510.zip<br \/>\nunzip 26104-510.zip<br \/>\nunzip 26104-510_ANSI_C_source_code.zip<br \/>\nmkdir ..\/amrwb_float<br \/>\ncd ..\/amrwb_float<br \/>\nwget http:\/\/www.3gpp.org\/ftp\/Specs\/archive\/26_series\/26.204\/26204-510.zip<br \/>\nunzip 26204-510.zip<br \/>\nunzip 26204-510_ANSI-C_source_code.zip<br \/>\ncd ..\/..\/ <\/code><\/p>\n<p>Now we need to make sure that all the correct bits get built. This is done by editing the rules file as follows.<br \/>\nAdd the following lines to <code>debian\/rules<\/code>, under the other <code>confflags<\/code> lines:<\/p>\n<p><code>confflags += --enable-mp3lame --enable-faad<br \/>\nconfflags += --enable-faac --enable-xvid<br \/>\nconfflags += --enable-amr_nb --enable-amr_wb<\/code><\/p>\n<p>We only really need the last line, but while we are at it, we may as well add the other ones as well. Continuing in the terminal:<\/p>\n<p><code>fakeroot debian\/rules binary<br \/>\nsudo checkinstall<\/code><\/p>\n<p>When running the final command, most of the default options can be accepted. However, it may be worth changing the name to ffmpeg and setting the version to something that will keep it from getting overwritten on an update. Alternatively just set the package on hold once it is installed.<\/p>\n<p>That will do for now. Later I will have a play, and come up with some recipes. The main thing that I would like to be able to do is convert from the phone to a format that plays on the computer. Then I would like to come up with some good settings for converting a saved DVBT stream for viewing on the phone.<\/p>\n<p>I thought that I should admit I got most of my help from <a href=\"http:\/\/po-ru.com\/diary\/fixing-ffmpeg-on-ubuntu\/\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OK, so I have a nice new Video phone. I want to be able to play, edit and create the videos. The format that the Sony Ericsson phone uses is 3gp. It turns out that ffmpeg can handle these, but &hellip; <a href=\"https:\/\/stuphi.co.uk\/wordpress\/?p=23\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2,5],"tags":[],"_links":{"self":[{"href":"https:\/\/stuphi.co.uk\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/23"}],"collection":[{"href":"https:\/\/stuphi.co.uk\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/stuphi.co.uk\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/stuphi.co.uk\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/stuphi.co.uk\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=23"}],"version-history":[{"count":0,"href":"https:\/\/stuphi.co.uk\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/23\/revisions"}],"wp:attachment":[{"href":"https:\/\/stuphi.co.uk\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/stuphi.co.uk\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/stuphi.co.uk\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}