Page 1 of 2 12 LastLast
Results 1 to 10 of 32

Thread: Problems converting to mp4 with mencoder and ffmpeg

Hybrid View

  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
    Location
    Europe
    Beans
    153
    Distro
    Ubuntu 14.04 Trusty Tahr

    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
    Location
    Europe
    Beans
    153
    Distro
    Ubuntu 14.04 Trusty Tahr

    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
    Dec 2006
    Beans
    7,303

    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?

  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

    Quote Originally Posted by andrew.46 View Post
    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...
    Thank you...I had already done that but again, no success

    Here is the error message if anyone finds it useful:

    Code:
    Forzadeldestino1-1.avi
    
    FFmpeg version SVN-r0.5.9-4:0.5.9-0ubuntu0.10.04.3, Copyright (c) 2000-2009 Fabrice Bellard, et al.
      configuration: --extra-version=4:0.5.9-0ubuntu0.10.04.3 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
      libavutil     49.15. 0 / 49.15. 0
      libavcodec    52.20. 1 / 52.20. 1
      libavformat   52.31. 0 / 52.31. 0
      libavdevice   52. 1. 0 / 52. 1. 0
      libavfilter    0. 4. 0 /  0. 4. 0
      libswscale     0. 7. 1 /  0. 7. 1
      libpostproc   51. 2. 0 / 51. 2. 0
      built on Jan 24 2013 19:42:59, gcc: 4.4.3
    
    Seems stream 0 codec frame rate differs from container frame rate: 30000.00 (30000/1) -> 29.97 (30000/1001)
    Input #0, avi, from 'Forzadeldestino1-1.avi':
      Duration: 00:26:17.59, start: 0.000000, bitrate: 2364 kb/s
        Stream #0.0: Video: mpeg4, yuv420p, 480x360 [PAR 1:1 DAR 4:3], 29.97 tbr, 29.97 tbn, 30k tbc
        Stream #0.1: Audio: mp3, 48000 Hz, stereo, s16, 112 kb/s
    File 'Forzadeldestino1-1.mp4' already exists. Overwrite ? [y/N] y
    Output #0, mp4, to 'Forzadeldestino1-1.mp4':
        Stream #0.0: Video: mpeg4, yuv420p, 480x360 [PAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 90k tbn, 29.97 tbc
        Stream #0.1: Audio: 0x0000, 48000 Hz, stereo, s16, 64 kb/s
    Stream mapping:
      Stream #0.0 -> #0.0
      Stream #0.1 -> #0.1
    Unsupported codec for output stream #0.1

  9. #9
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    4,270
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Problems converting to mp4 with mencoder and ffmpeg

    Shot in the dark here, but have you installed the ubuntu-restricted-extras package?
    Full Circle Magazine :: Cheap Linux stickers :: Problems with WINE?
    In my day, we had outdoors in which to run, play, and socialise. Now we have computers to do those.

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

    Re: Problems converting to mp4 with mencoder and ffmpeg

    Quote Originally Posted by Paddy Landau View Post
    Shot in the dark here, but have you installed the ubuntu-restricted-extras package?
    Yes Paddy, I have already installed that package

    Code:
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    ubuntu-restricted-extras is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

Page 1 of 2 12 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
  •