[Solved] Convert .mp4 file to .3gp

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
User avatar
laplume
Donor
Posts: 348
Joined: 4. Sep 2010, 07:40
Location: (VI) Italy

[Solved] Convert .mp4 file to .3gp

Post by laplume »

Hello, I was trying to convert a mp4 file to .3p using the following script:

#!/bin/bash
for f in *.mp4
do
name=`echo "$f" | sed -e "s/.mp4$//g"`
ffmpeg -i "$f" -vcodec h263 -s qcif -r 15 -b 100k -acodec libfaac -ac 1 -ar 32000 -ab 64k -f 3gp "$name.3gp"
done

but the conversion didn't even start as the output was
Unknown encoder 'libfaac'

I have taken a look at the ffmpeg package installed by default in Salix and found that libfaac is disabled. I assume that by enabling it the script should work but which is the command that makes ffmpeg enable libfaac?
Thanks in advance for support.
Antonio
Last edited by laplume on 1. Dec 2012, 14:05, edited 1 time in total.
User avatar
gapan
Salix Wizard
Posts: 6366
Joined: 6. Jun 2009, 17:40

Re: Convert .mp4 file to .3gp

Post by gapan »

What if you use -acodec aac ?
Image
Image
User avatar
laplume
Donor
Posts: 348
Joined: 4. Sep 2010, 07:40
Location: (VI) Italy

Re: Convert .mp4 file to .3gp

Post by laplume »

gapan wrote:What if you use -acodec aac ?
Thanks for the info gapan, tried to run with aac but output gave me
Unknown encoder 'aac'

Seems the ffmpeg package provided with Salix 13.0.2 is not containing the aac encoder. Any means to add it? Or if I set it to Vorbis what parameters should I choose?
The output I had with vorbis was following:
Error while opening encoder for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height

Thanks for advice
Rgds
Antonio
User avatar
gapan
Salix Wizard
Posts: 6366
Joined: 6. Jun 2009, 17:40

Re: Convert .mp4 file to .3gp

Post by gapan »

You should have stated in your post that you are running Salix 13.0.

The ffmpeg version in salix 13.0 does not have encoding support for aac audio. However it has support for 3gp and 3g2 audio formats, which, if you want to make a 3gp file, would work for you.

Type

Code: Select all

ffmpeg -formats
to view a list of all available formats.
Image
Image
User avatar
laplume
Donor
Posts: 348
Joined: 4. Sep 2010, 07:40
Location: (VI) Italy

Re: Convert .mp4 file to .3gp

Post by laplume »

gapan wrote:You should have stated in your post that you are running Salix 13.0.
Sorry gapan I forgot to mention that. :oops:
Anyway I tried the script on another desktop running 13.37 and it eventually did the job. :D

Just for info the script looks now like this:

Code: Select all

#!/bin/bash
for f in *.mp4
do
    name=`echo "$f" | sed -e "s/.mp4$//g"`
    ffmpeg -i "$f" -vcodec h263 -s qcif -r 15 -b 100k -acodec aac -strict experimental -ac 1 -ar 32000 -ab 64k -f 3gp "$name.3gp"
done
Thanks for support, I'll mark the thread as solved.
Antonio
Post Reply