Converting 3gp to xvid using Linux and ffmpeg

I recently purchased a new phone, a Samsung S and I’ve been busily taking video clips as you do, only recently have I tried to stream them from my PS3 to my TV, only to find that the 3gp format isn’t supported under DNLA. After a little searching on-line, I’ve found out how to convert the file under linux, so I though I would share (as you do).

I’m having to make the assumption that you have ffmpeg installed, if not, then do so before following the instructions below.

Below show the info of the file that I’m converting.

The command line below seemed to work for me, thanks for for the more esoteric command line that worked best and produced the smallest file-size.

It’s always a good idea to make sure you get the aspect ratio correct “-aspect 3:2” in my case, I would recommend reading the following.

Below are the details of the converted file.

Good luck ๐Ÿ™‚

Article on
HowTo install and use the latest ffmgeg (Ubuntu Forum)
FFMpeg website
H.264/MPEG-4 AVC
Converting Audio and Video file using ffmpeg
FFmpeg Howto

3 thoughts on “Converting 3gp to xvid using Linux and ffmpeg

  1. Your original video has h264 video and AAC audio, both of which are supported by DNLA and the PS3 in particular; it’s only the 3gp container format that is not supported. It’d be much easier, time- CPU- and human memory-wise, to remux the video and audio into an MP4 container with the following ffmpeg command:

    ffmpeg -i input.3gp -c copy output.mp4

    If you’re using a really old version of ffmpeg for any reason:

    ffmpeg -i input.3gp -vcodec copy -acodec copy output.mp4

    Alternatively, 90% of the time (and probably including this case), you can simply rename the *.3gp file to end with .mp4, since they’re very similar formats.

  2. Looks like ffmpeg has been deprecated by avconv, just had a look at the command above and it now works as follows.

    avconv -i file.3gp -c:v copy -c:a copy file.mp4

    Time permitting, I’ll post another blog about using avconv.

Leave a Reply