Page 4 of 4 FirstFirst ... 234
Results 31 to 32 of 32

Thread: Problems converting to mp4 with mencoder and ffmpeg

  1. #31
    Join Date
    Dec 2006
    Beans
    7,349

    Re: Problems converting to mp4 with mencoder and ffmpeg

    Another small thing to consider is that sometimes phones and phone-like devices will baulk at FFmpeg's ffourcc for mpeg4 encoding so perhaps add:

    Code:
    -vtag XVID
    in the video section...
    You think that's air you're breathing now?

  2. #32
    Join Date
    Aug 2009
    Location
    Caracas,Venezuela.
    Beans
    65
    Distro
    Ubuntu 10.04 Lucid Lynx

    Talking Re: Problems converting to mp4 with mencoder and ffmpeg

    Quote Originally Posted by evilsoup View Post
    I would recommend upgrading to a more up-to-date version of fmpeg, according to your terminal your version is from 2009! this PPA is a good one. I think that what I am about to write will not work on the version you have at the moment.

    Once you've done that, the following command should create an output file with the same parameters to your 3gp file that works on your phone:

    Code:
    ##  convert 16:9 video
    ffmpeg -i input.avi -map 0:a -map 0:v -filter:v 'scale=176:-1,pad=176:144:(ow-iw)/2:(oh-ih)/2' \
    -c:v mpeg4 -q:v 4 -c:a aac -b:a 96k -ac 1 -ar 22050 -strict experimental output.3gp
    
    ##  convert 4:3 video
    ffmpeg -i input.avi -map 0:a -map 0:v -filter:v 'scale=-1:144,pad=176:144:(ow-iw)/2:(oh-ih)/2' \
    -c:v mpeg4 -q:v 4 -c:a aac -b:a 96k -ac 1 -ar 22050 -strict experimental output.3gp
    The scale video filter... well, scales the video down - the 16:9 does so width-wise, scaling the height to keep in ratio with the width, and the 4:3 one does it height-wise. This is then fed to the pad, which puts the scaled video over the centre of a black box with a size of 176x144.

    -ac 1 -ar 22050 makes the audio mono and gives it a sample rate of 22050 Hz. These are probably not strictly necessary. -map 0:a -map 0:v tells ffmpeg to make the audio be the first stream (stream 0) and the video be after the audio. Again, probably not necessary. The rest of the options are standard ffmpeg encoder things.
    Thank you very much man...for your time and your explanation. I will try it. And all of you guys...I will try and if it works, I'll let you know.

Page 4 of 4 FirstFirst ... 234

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •