Page 1 of 4 123 ... LastLast
Results 1 to 10 of 32

Thread: Problems converting to mp4 with mencoder and ffmpeg

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

    Unhappy Problems converting to mp4 with mencoder and ffmpeg

    Hello guys.

    This time I request some help because I'm trying to convert some avi files into mp4, but once i do it with mencoder, ubuntu cannot play the mp4 file (although i can play other mp4). It doesn't play ONLY the mp4 files a made with mencoder.
    On the other hand, when I try to use ffmpeg, it says "Unsupported codec for output stream #0.1", not allowing me to convert them.

    What should I do right now?

    In previous releases of Ubuntu I did this kind of conversions so easily with no problems, what's wrong this time?

    I'm using Ubuntu 10.04

    Please, give me a solution as easy as you can, like apt-get install whatever, etc

  2. #2
    Join Date
    Feb 2011
    Beans
    150
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Problems converting to mp4 with mencoder and ffmpeg

    The command for mencoder is
    Code:
    mencoder (input).avi -o (output).mp4 -oac copy -ovc lavc -lavcopts vcodec=mpeg1video -of mpeg
    Then test it with
    Code:
    mplayer (filename).mp4
    And the command for ffmpeg is
    Code:
    ffmpeg -i (input).avi -acodec libfaac -b:a 128k -vcodec mpeg4 -b:v 1200k -flags +aic+mv4 (output).mp4
    If you want to know how it works here:
    Code:
    -acodec libfaac
    This uses the faac codec to encode the audio to aac.
    Code:
    -b:a 128k and -b:v 1200k
    These are the audio and video (respectively) bitrates of 128kb and 1200kb
    Code:
    -flags +aic+mv4
    mv4 - Affects: Encoding, Video
    use four motion vector by macroblock (mpeg4)
    aic -
    Affects: Encoding, Video
    h263 advanced intra coding / mpeg4 ac prediction
    Last edited by linuxsyst; February 10th, 2013 at 07:50 PM.

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

    Re: Problems converting to mp4 with mencoder and ffmpeg

    Thank you very much..but it's not working yet. I think the problem is related to some codecs restriction or anything, because I used the same commands as you do.
    Thank you again for trying to help

  4. #4
    Join Date
    Feb 2011
    Beans
    150
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Problems converting to mp4 with mencoder and ffmpeg

    What application did you open it with?
    Edit: Ok I probably know what the problem is... Add the Motumedia repository
    Code:
    sudo add-apt-repository ppa:motumedia/mplayer-daily
    And install -
    Code:
    sudo apt-get install x264
    Or you can do this...
    Code:
    git clone --depth 1 
    git://git.videolan.org/x264.git
    cd x264
    ./configure --enable-static
    make
    sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | \
      awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes \
      --fstrans=no --default
    Last edited by linuxsyst; February 10th, 2013 at 10:53 PM.

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

    Re: Problems converting to mp4 with mencoder and ffmpeg

    Still the same: Unsupported codec.

    I can play other mp4 files, but not those I created with ffmpeg, neither on my computer nor my cellphone.

  6. #6
    Join Date
    Feb 2006
    Beans
    1,086
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Problems converting to mp4 with mencoder and ffmpeg

    The x264 package is in the ubuntu universe repository. There is no need to enable a third party repository for it.

    Also, installing the x264 encoder package will not help at all with the mencoder and ffmpeg commands posted above because they do not use the x264 codec.

    What player are you trying to use to play the files back on your computer? Also, what operating system does your phone have on it?

  7. #7
    Join Date
    Feb 2006
    Beans
    1,086
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Problems converting to mp4 with mencoder and ffmpeg

    Try the following modified ffmpeg command and see if it works better for you.
    Code:
    avconv -i (input).avi -strict experimental -acodec aac -b:a 128k -vcodec mpeg4 -b:v 1200k -flags +aic+mv4 (output).mp4
    Not that ffmpeg is deprecated and avconv is its replacement. That command may not help, but the libfaac encoder codec is not available in the default ubuntu packages for avconv. The aac encoder is, but you have to enable experimental standards to use it.

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

    Re: Problems converting to mp4 with mencoder and ffmpeg

    Thank you very much. I use mplayer to play the files. My Ubuntu is 10.04 64bit.

    I tried your modified command and still no success with it.
    I tried installing avconv and could be read "Couldn't find package avconv".

    I think the problem is not related to my cell, because I can play mp4 files on it. My computer also is able to play mp4 files...the only files my computer doesn't play are those I've created with mencoder or ffmpeg.

    I read in another post one command that worked fine...mencoder <input.avi> -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video -oac copy -o <output.mpg>

    but, as you may see, it's not in mp4 format, so I can't play it on my cellphone...but I ran this command and later played the file in my computer and everything was ok.

    Thank you for your help...any other suggestions for me?

  9. #9
    Join Date
    Dec 2006
    Beans
    6,930

    Re: Problems converting to mp4 with mencoder and ffmpeg

    Quote Originally Posted by Johann-1.0 View Post
    On the other hand, when I try to use ffmpeg, it says "Unsupported codec for output stream #0.1", not allowing me to convert them.

    [...]

    I'm using Ubuntu 10.04
    Perhaps if you are using Lucid Lynx 10.04 you could run the following:

    Code:
    sudo apt-get install ffmpeg libavcodec-extra-52
    and then run your conversion as previously but copy and paste the entire terminal output into a forum post. This will give a few hints as to what is going on...
    You think that's air you're breathing now?

  10. #10
    Join Date
    Dec 2006
    Beans
    6,930

    Re: Problems converting to mp4 with mencoder and ffmpeg

    Quote Originally Posted by glennric View Post
    Note that ffmpeg is deprecated and avconv is its replacement.
    FFmpeg development is actually thriving at the moment as is development of the fork avconv. The 'deprecated' message was yet another arrow fired in a highly regrettable war .
    You think that's air you're breathing now?

Page 1 of 4 123 ... LastLast

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
  •