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

Thread: [SOLVED] ffmpeg convert .avi to .mpg error

  1. #1
    Join Date
    Jun 2008
    Location
    Colorado
    Beans
    151
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Question [SOLVED] ffmpeg convert .avi to .mpg error

    hi, im trying to convert an .avi movie to .mpg so i can use dvdauthor and then burn it to a dvdplayer compatible dvd. i just upgraded from Hardy Heron to Intrepid and before this, ffmpeg worked wonderfully. now it doens't work at all.... here is the code and error i get:

    Code:
    ffmpeg -i movie.avi -target dvd /media/disk/SAFE/movie.mpg
    FFmpeg version r11872+debian_3:0.svn20080206-12ubuntu3, Copyright (c) 2000-2008 Fabrice Bellard, et al.
      configuration: --enable-gpl --enable-pp --enable-swscaler --enable-x11grab --prefix=/usr --enable-libgsm --enable-libtheora --enable-libvorbis --enable-pthreads --disable-strip --enable-libfaad --enable-libfaadbin --enable-liba52 --enable-liba52bin --enable-libdc1394 --disable-armv5te --disable-armv6 --disable-altivec --disable-vis --enable-shared --disable-static
      libavutil version: 49.6.0
      libavcodec version: 51.50.0
      libavformat version: 52.7.0
      libavdevice version: 52.0.0
      built on Oct  3 2008 22:40:31, gcc: 4.3.2
    Input #0, avi, from 'movie.avi':
      Duration: 01:32:15.2, start: 0.000000, bitrate: 1063 kb/s
        Stream #0.0: Video: mpeg4, yuv420p, 692x284 [PAR 1:1 DAR 173:71], 23.98 tb(r)
        Stream #0.1: Audio: mp3, 48000 Hz, stereo, 128 kb/s
    Assuming NTSC for target.
    Unknown encoder 'mpeg2video'
    how can i fix this?

  2. #2
    Join Date
    Jun 2007
    Beans
    379

    Re: ffmpeg convert .avi to .mpg error

    In Intrepid (as in previous versions) the ffmpeg shipped in the repos is gimped to be totally legal. Which basically means many of the more popular formats (such as MP3 and, as you've seen, many video formats) are not supported. In previous versions, a relatively recent and ungimped ffmpeg was provided in the Medibuntu repos, but for Intrepid it has not yet been placed in the repo. Some speculate it may not be in the pipeline.

    I'd suggest following this HOWTO to compile your own ffmpeg. I've contributed a bit more to the process, on page 22 I believe, but the thread starter's HOWTO will do everything you need.

    HINT: Google is your friend with errors like this.

  3. #3
    Join Date
    Sep 2006
    Beans
    3,713

    Re: ffmpeg convert .avi to .mpg error

    The Ubuntu multiverse repository has "unstripped" libraries available and should provide mpeg2video encoding ability (and many others) to ffmpeg:
    Code:
    sudo apt-get purge ffmpeg
    sudo apt-get update
    sudo apt-get install libavcodec-unstripped-51 libavdevice-unstripped-52 libavformat-unstripped-52 libavutil-unstripped-49 libpostproc-unstripped-51 libswscale-unstripped-0 ffmpeg
    Or, as Ng Oon-Ee mentioned, you can compile the latest ffmpeg yourself.

  4. #4
    Join Date
    Jun 2007
    Beans
    379

    Re: ffmpeg convert .avi to .mpg error

    Quote Originally Posted by FakeOutdoorsman View Post
    The Ubuntu multiverse repository has "unstripped" libraries available and should provide mpeg2video encoding ability (and many others) to ffmpeg:
    Code:
    sudo apt-get purge ffmpeg
    sudo apt-get update
    sudo apt-get install libavcodec-unstripped-51 libavdevice-unstripped-52 libavformat-unstripped-52 libavutil-unstripped-49 libpostproc-unstripped-51 libswscale-unstripped-0 ffmpeg
    Or, as Ng Oon-Ee mentioned, you can compile the latest ffmpeg yourself.
    Ah, I saw that on another thread, but never worked with me. Nobody mentioned the need to purge ffmpeg prior to installing the unstripped though. Oh well, I now have the latest ffmpeg compiled and running thanks to you, good sir, so its all good

  5. #5
    Join Date
    Nov 2007
    Location
    Buenos Aires, Argentina
    Beans
    3
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: [SOLVED] ffmpeg convert .avi to .mpg error

    Yes, Yes, Yes, it works a lot!
    Thank you very much.

  6. #6
    Join Date
    Mar 2008
    Location
    Canada
    Beans
    257
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: ffmpeg convert .avi to .mpg error

    Quote Originally Posted by FakeOutdoorsman View Post
    The Ubuntu multiverse repository has "unstripped" libraries available and should provide mpeg2video encoding ability (and many others) to ffmpeg:
    Code:
    sudo apt-get purge ffmpeg
    sudo apt-get update
    sudo apt-get install libavcodec-unstripped-51 libavdevice-unstripped-52 libavformat-unstripped-52 libavutil-unstripped-49 libpostproc-unstripped-51 libswscale-unstripped-0 ffmpeg
    Or, as Ng Oon-Ee mentioned, you can compile the latest ffmpeg yourself.
    I am getting:
    Code:
    E: Couldn't find package libavcodec-unstripped-51

  7. #7
    Join Date
    Sep 2006
    Beans
    3,713

    Re: ffmpeg convert .avi to .mpg error

    Quote Originally Posted by alecz20 View Post
    I am getting:
    Code:
    E: Couldn't find package libavcodec-unstripped-51
    My last post on this tread was from 2008 and this command is targeted towards Ubuntu Intrepid Ibex 8.10. See this thread:

    HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoders in FFmpeg

  8. #8
    Join Date
    Mar 2008
    Location
    Canada
    Beans
    257
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: ffmpeg convert .avi to .mpg error

    Quote Originally Posted by FakeOutdoorsman View Post
    My last post on this tread was from 2008 and this command is targeted towards Ubuntu Intrepid Ibex 8.10. See this thread:

    HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoders in FFmpeg
    Thanks alot for the very quick reply!

    I eventually installed ffmpeg from source, and it all works well, except it complains about threads option.

    Do I really need two threads on a core 2 Duo when transcoding HD movies on the fly?

  9. #9
    Join Date
    Sep 2006
    Beans
    3,713

    Re: ffmpeg convert .avi to .mpg error

    Quote Originally Posted by alecz20 View Post
    Thanks alot for the very quick reply!

    I eventually installed ffmpeg from source, and it all works well, except it complains about threads option.
    What does it say about threads? Show your FFmpeg command and the complete FFmpeg output.
    Quote Originally Posted by alecz20 View Post
    Do I really need two threads on a core 2 Duo when transcoding HD movies on the fly?
    It depends on the encoder you're using. Only libx264 can currently support -threads 0, which automatically chooses an appropriate value.

  10. #10
    Join Date
    Mar 2008
    Location
    Canada
    Beans
    257
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: [SOLVED] ffmpeg convert .avi to .mpg error

    I'm using a script for mediatomb.

    The relevant command in the script is:

    Code:
    exec /usr/local/bin/ffmpeg -threads 2 -i "${INPUT}" -vcodec ${VIDEO_CODEC} -b ${VIDEO_BITRATE} \
    -acodec ${AUDIO_CODEC} -ab ${AUDIO_BITRATE} -ar ${AUDIO_SAMPLERATE} -ac ${AUDIO_CHANNELS} \
    -f ${FORMAT} - > "${OUTPUT}" 2>/tmp/mediatomb-ffmpeg.log
    as you can see I give it the parameter "-threads 2"

    in the log I get this:

    Code:
    FFmpeg version 0.6, Copyright (c) 2000-2010 the FFmpeg developers
      built on Jul 23 2010 14:09:43 with gcc 4.3.3
      configuration:
      libavutil     50.15. 1 / 50.15. 1
      libavcodec    52.72. 2 / 52.72. 2
      libavformat   52.64. 2 / 52.64. 2
      libavdevice   52. 2. 0 / 52. 2. 0
      libswscale     0.11. 0 /  0.11. 0
    Warning: not compiled with thread support, using thread emulation


    Also I am using mpeg2video as the video codec
    Last edited by alecz20; July 23rd, 2010 at 09:05 PM.

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
  •