Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: VLC with ffmpeg can't transcode MPEG4.

  1. #1
    Join Date
    May 2009
    Location
    Ft. Leonard Wood
    Beans
    48
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Unhappy VLC with ffmpeg can't transcode MPEG4.

    I have been trying to compile a version of VLC which would correctly stream and transcode media with the settings of MPEG4 + AAC (video/audio). The normal response from package versions is the following:

    Code:
      p, li { white-space: pre-wrap; }  Streaming / Transcoding failed:
     VLC could not open the encoder.
    Ok, so using the a guide constructed by one of the VLC devs I created a script to install and compile everything under the sun necessary for VLC in 9.04.

    Code:
    #!/bin/bash
    #
    # http://juliensimon.blogspot.com/2008/12/howto-compiling-ffmpeg-x264-mp3-xvid.html
    mkdir /opt/build
    cd /opt/build/
    apt-get install subversion git git-core -y
    svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
    wget http://www.medibuntu.org/sources.list.d/jaunty.list --output-document=/etc/apt/sources.list.d/medibuntu.list
    apt-get update
    apt-get install medibuntu-keyring --force-yes -y
    apt-get update
    apt-get install libgpac-dev nasm libfaac-dev libfaac0 libfaad-dev libfaad0 libschroedinger-dev libtheora-dev libtheora0 libvorbis-dev libvorbis0a libvorbisenc2 libvorbisfile3 libxv-dev libxvmc-dev libmp3lame-dev libmp3lame0 libgsm-tools libgsmme-dev libdirac-dev libdirac0c2a libdc1394-13 libdc1394-13-dev libopenjpeg-dev libopenjpeg2 libspeex-dev libspeex1 libspeexdsp-dev libspeexdsp1 libamrnb-dev libamrwb-dev g++ libavc1394-dev libraw1394-dev libdc1394-13-dev libdvdread-dev libdvdnav-dev libdvdcss2 libdvdcss-dev libfaad-dev libtwolame-dev liba52-dev libvcdinfo-dev libiso9660-dev libcddb2-dev libflac-dev libogg-dev libvorbis-dev liblua5.1-0-dev libgnomevfs2-dev libtag1-dev libqt4-dev libfribidi-dev libhal-dev libmtp-dev libshout3-dev libdvbpsi5 libdvbpsi5-dev libv4l-dev zvbi libzvbi-dev libpulse-dev libxcb-keysyms0-dev --force-yes -y
    apt-get upgrade -y
    wget http://transact.dl.sourceforge.net/project/opencore-amr/opencore-amr/0.1.2/opencore-amr-0.1.2.tar.gz
    tar xvf opencore-amr-0.1.2.tar.gz
    rm opencore-amr-0.1.2.tar.gz
    cd opencore-amr-0.1.2
    ./configure
    make
    #checkinstall --fstrans=no --install=yes --pkgname="libopencore-amr" --pkgversion="0.1.2" --backup=no --default
    #ldconfig
    make install
    cd ..
    wget http://www.tortall.net/projects/yasm/releases/yasm-0.7.2.tar.gz
    tar xvfz yasm-0.7.2.tar.gz
    rm yasm-0.7.2.tar.gz
    cd yasm-0.7.2
    ./configure --prefix=/usr/local
    make
    sudo make install
    cd ..
    svn co svn://svn.mplayerhq.hu/nut/src/trunk/ nut
    cd nut
    make
    make install
    cd ..
    git clone git://git.videolan.org/x264.git
    cd x264
    ./configure --prefix=/usr/local --enable-shared
    make
    #checkinstall --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`" --backup=no --default
    make install
    cd ..
    wget http://downloads.xvid.org/downloads/xvidcore-1.2.2.tar.gz
    tar xvfz xvidcore-1.2.2.tar.gz
    rm xvidcore-1.2.2.tar.gz
    cd xvidcore/build/generic
    ./configure --prefix=/usr/local
    make
    make install
    cd ..
    cd ..
    cd ..
    cd ffmpeg
    ./configure --prefix=/usr/local --enable-gpl --enable-nonfree --enable-shared --enable-postproc --enable-avfilter --enable-avfilter-lavf --enable-pthreads --enable-x11grab --enable-bzlib --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-libdc1394 --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libmp3lame --enable-libnut --enable-libschroedinger --enable-libvorbis --enable-libx264 --enable-libxvid --enable-zlib
    #--enable-libtheora
    # --enable-libgsm 
    make
    make install
    cd ..
    LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
    export LD_LIBRARY_PATH
    ldconfig
    # http://juliensimon.blogspot.com/2009/04/howto-compiling-vlc-099-live555-all.html
    cd /opt/build/
    wget http://ovh.dl.sourceforge.net/sourceforge/mad/libmad-0.15.1b.tar.gz
    tar xvfz libmad-0.15.1b.tar.gz
    rm libmad-0.15.1b.tar.gz
    cd libmad-0.15.1b
    ./configure --prefix=/usr/local
    #
    cp /home/edwin/Desktop/Makefile /opt/build/libmad-0.15.1b/Makefile
    #
    make
    make install
    cd ..
    wget http://download.videolan.org/pub/videolan/libdca/0.0.5/libdca-0.0.5.tar.bz2
    bzip2 -d libdca-0.0.5.tar.bz2
    tar xvf libdca-0.0.5.tar
    rm libdca-0.0.5.tar
    cd libdca-0.0.5
    ./configure --prefix=/usr/local
    make
    make install
    cd ..
    wget http://libmpeg2.sourceforge.net/files/libmpeg2-0.5.1.tar.gz
    tar xvfz libmpeg2-0.5.1.tar.gz
    rm libmpeg2-0.5.1.tar.gz
    cd libmpeg2-0.5.1
    ./configure --prefix=/usr/local
    make
    make install
    cd ..
    wget http://developer.kde.org/~wheeler/files/src/taglib-1.5.tar.gz
    tar xvfz taglib-1.5.tar.gz
    rm taglib-1.5.tar.gz
    cd taglib-1.5
    ./configure --prefix=/usr/local
    make
    make install
    cd ..
    wget http://www.live555.com/liveMedia/public/live555-latest.tar.gz
    tar xvfz live555-latest.tar.gz
    rm live555-latest
    cd live
    ./genMakefiles linux
    make
    cd ..
    cp -r live /usr/lib
    wget http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.6.0.tar.gz
    tar xvf qt-everywhere-opensource-src-4.6.0.tar.gz
    rm qt-everywhere-opensource-src-4.6.0.tar.gz
    cd qt-everywhere-opensource-src-4.6.0/
    ./configure
    make
    make install
    cd ..
    wget http://download.videolan.org/pub/videolan/vlc/1.0.4/vlc-1.0.4.tar.bz2
    bzip2 -d vlc-1.0.4.tar.bz2
    tar xvf vlc-1.0.4.tar
    rm vlc-1.0.4.tar
    cd vlc-1.0.4
    cp -r /opt/build/ffmpeg extras
    cp -r /opt/build/x264 extras
    cp -r /usr/lib/live extras
    ls extras
    ./configure --prefix=/usr/local --with-x264-tree=extras/x264 --with-live555-tree=extras/live --enable-release --enable-switcher --enable-shout --enable-dc1394 --enable-dv --enable-dvdread --enable-v4l --enable-pvr --enable-gnomevfs --enable-vcdx --enable-faad --enable-twolame --enable-real --enable-realrtsp --enable-flac --enable-tremor --enable-tarkin --enable-theora --enable-ogg --enable-vorbis --enable-a52 --enable-gnomevfs --enable-dca
    make
    make install
    When I run this script (and come back 8 hours later), VLC is compiled but it crashes on playback of a test .avi.

    Main point and question being, what do I have to do to enable VLC to stream and transcode any media into the MPEG4 + AAC format?

    BTW, I have tried this thread --> http://ubuntuforums.org/showthread.php?t=786095 with a fresh install on 9.10 and still no dice.

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

    Re: VLC with ffmpeg can't transcode MPEG4.

    As an alternative to compiling VLC, did you try the repository VLC with the libavcodec-unstripped-52 package? Although I'm not too familiar with VLC, I believe it will enable encoding to some restricted formats including MPEG-4 and AAC.

  3. #3
    Join Date
    May 2009
    Location
    Ft. Leonard Wood
    Beans
    48
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: VLC with ffmpeg can't transcode MPEG4.

    I have tried it, but that was no dice. What does seem to hold me up is that MPEG works if you change the sound away from AAC. I'll get back to you on if I have AAC support after the latest compile.

  4. #4
    Join Date
    Jul 2007
    Location
    Connecticut USA
    Beans
    1,865
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: VLC with ffmpeg can't transcode MPEG4.

    What version of vlc are you trying to install?

  5. #5
    Join Date
    May 2009
    Location
    Ft. Leonard Wood
    Beans
    48
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: VLC with ffmpeg can't transcode MPEG4.

    Quote Originally Posted by HappyFeet View Post
    What version of vlc are you trying to install?
    1.0.4 was the original intention, but for testing of the script to iron out stability bugs I'm falling back on 1.0.0.

  6. #6
    Join Date
    Jul 2007
    Location
    Connecticut USA
    Beans
    1,865
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: VLC with ffmpeg can't transcode MPEG4.

    Quote Originally Posted by dr_latino999 View Post
    1.0.4 was the original intention, but for testing of the script to iron out stability bugs I'm falling back on 1.0.0.
    I just installed 1.0.4 via PPA, and it works great.

  7. #7
    Join Date
    Jul 2008
    Location
    Birmingham, England
    Beans
    2,400

    Re: VLC with ffmpeg can't transcode MPEG4.

    What happens if you compile with
    Code:
    sudo mkdir /opt/vlc
    Code:
    ./configure  '--prefix=/opt/vlc' '--program-suffix=-git' '--enable-static=x264' '--enable-dbus' '--enable-run-as-root' '--enable-dvdread' '--enable-dvdnav' '--disable-smb' '--enable-pvr' '--enable-cddax' '--enable-libcddb' '--enable-mkv' '--enable-ogg' '--enable-merge-ffmpeg' '--enable-faad' '--disable-twolame' '--enable-real' '--enable-a52' '--enable-flac' '--enable-libmpeg2' '--enable-vorbis' '--enable-theora' '--enable-png' '--enable-x264' '--enable-libass' '--disable-fribidi' '--enable-caca' '--enable-pulse' '--enable-alsa' '--enable-qt4' '--enable-ncurses' '--disable-bonjour' '--enable-udev' '--enable-mtp' '--with-x' 'PKG_CONFIG_PATH=/usr/lib/pkgconfig'
    and then
    Code:
    make
    Code:
    sudo make install
    This will install VLC as vlc-git to /opt/vlc/bin/vlc-git independent of any repo version

  8. #8
    Join Date
    May 2009
    Location
    Croatia
    Beans
    125
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: VLC with ffmpeg can't transcode MPEG4.

    You have to install libavcodec-unstripped-52 but from medibuntu repository, thet works for me

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

    Re: VLC with ffmpeg can't transcode MPEG4.

    Quote Originally Posted by dr_latino999 View Post
    I have tried it, but that was no dice. What does seem to hold me up is that MPEG works if you change the sound away from AAC. I'll get back to you on if I have AAC support after the latest compile.
    I was assuming that you were using 9.04, not 9.10. The libavcodec-unstripped-52 package in the Karmic repository does not support AAC encoding, but the version from Medibuntu that e-Gee mentioned does support AAC encoding (the Medibuntu libavcodec-unstripped-52 package is only available for Karmic users). For more details see option C in:

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

  10. #10
    Join Date
    May 2009
    Location
    Ft. Leonard Wood
    Beans
    48
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: VLC with ffmpeg can't transcode MPEG4.

    Quote Originally Posted by FakeOutdoorsman View Post
    I was assuming that you were using 9.04, not 9.10. The libavcodec-unstripped-52 package in the Karmic repository does not support AAC encoding, but the version from Medibuntu that e-Gee mentioned does support AAC encoding (the Medibuntu libavcodec-unstripped-52 package is only available for Karmic users). For more details see option C in:

    HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoding in FFmpeg
    No dice on the link as I mentioned before, in particular the unstripped-52 package tries to erase my newly compiled ffmpeg.

    Play by Play
    Here is a play by play of exactly what the script is doing when run under 9.04 when attempting to create a complete (all bells and whistles) VLC installation.:


    1. Creates the build directory, which was arbitrary, and declare which version of VLC I would like to try and build. At the same time, the latest ffmpeg is pulled down
      Code:
      vlcver=1.0.0
      mkdir /opt/build
      cd /opt/build/
      svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
    2. I then enable the Medibuntu repository.
      Code:
      wget http://www.medibuntu.org/sources.list.d/jaunty.list --output-document=/etc/apt/sources.list.d/medibuntu.list
      apt-get update
      apt-get install medibuntu-keyring --force-yes -y
      apt-get update
    3. Install ALL the packages that this will require, then checking one last time that I didn't miss anything.
      Code:
      apt-get install subversion git git-core libgpac-dev nasm libfaac-dev libfaac0 libfaad-dev libfaad0 libschroedinger-dev libtheora-dev libtheora0 libvorbis-dev libvorbis0a libvorbisenc2 libvorbisfile3 libxv-dev libxvmc-dev libmp3lame-dev libmp3lame0 libgsm-tools libgsmme-dev libdirac-dev libdirac0c2a libdc1394-13 libdc1394-13-dev libopenjpeg-dev libopenjpeg2 libspeex-dev libspeex1 libspeexdsp-dev libspeexdsp1 libamrnb-dev libamrwb-dev g++ libavc1394-dev libraw1394-dev libdc1394-13-dev libdvdread-dev libdvdnav-dev libdvdcss2 libdvdcss-dev libfaad-dev libtwolame-dev liba52-dev libvcdinfo-dev libiso9660-dev libcddb2-dev libflac-dev libogg-dev libvorbis-dev liblua5.1-0-dev libgnomevfs2-dev libtag1-dev libqt4-dev libfribidi-dev libhal-dev libmtp-dev libshout3-dev libdvbpsi5 libdvbpsi5-dev libv4l-dev zvbi libzvbi-dev libpulse-dev libxcb-keysyms0-dev --force-yes -y
      apt-get upgrade -y
    4. I then install libopencore-amr
    5. Next yasm is compiled to have the almost newest version.
      Code:
      wget http://www.tortall.net/projects/yasm/releases/yasm-0.7.2.tar.gz
      tar xvfz yasm-0.7.2.tar.gz
      rm yasm-0.7.2.tar.gz
      cd yasm-0.7.2
      ./configure --prefix=/usr/local
      make
      sudo make install
      cd ..
    6. Nut is downloaded and installed
      Code:
      svn co svn://svn.mplayerhq.hu/nut/src/trunk/ nut
      cd nut
      make
      make install
      cd ..
    7. x264 is pulled down for installation.
      Code:
      cd ..
      git clone git://git.videolan.org/x264.git
      cd x264
      ./configure --prefix=/usr/local --enable-shared
      make
      make install
      cd ..
    8. Xvid is pulled down and installed.
      Code:
      wget http://downloads.xvid.org/downloads/xvidcore-1.2.2.tar.gz
      tar xvfz xvidcore-1.2.2.tar.gz
      rm xvidcore-1.2.2.tar.gz
      cd xvidcore/build/generic
      ./configure --prefix=/usr/local
      make
      make install
      cd ..
      cd ..
      cd ..
    9. FFmpeg is installed with all the options under the sun.
      Code:
      cd ffmpeg
      ./configure --prefix=/usr/local --enable-gpl --enable-nonfree --enable-shared --enable-postproc --enable-avfilter --enable-avfilter-lavf --enable-pthreads --enable-x11grab --enable-bzlib --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-libdc1394 --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libmp3lame --enable-libnut --enable-libschroedinger --enable-libvorbis --enable-libx264 --enable-libxvid --enable-zlib
      #--enable-libtheora
      # --enable-libgsm 
      make
      make install
      cd ..
      LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
      export LD_LIBRARY_PATH
      ldconfig
    10. Libmad is built.
      Code:
      cd /opt/build/
      wget http://ovh.dl.sourceforge.net/sourceforge/mad/libmad-0.15.1b.tar.gz
      tar xvfz libmad-0.15.1b.tar.gz
      rm libmad-0.15.1b.tar.gz
      cd libmad-0.15.1b
      ./configure --prefix=/usr/local
      #
      cp /home/edwin/Desktop/Makefile /opt/build/libmad-0.15.1b/Makefile
      #
      make
      make install
      cd ..
      You will notice I have to copy the Makefile from the desktop. Basically there is an error in this makefile that requires manual editing, I can't remember what it is off the top of my head.
    11. Libdca is compiled.
      Code:
      wget http://download.videolan.org/pub/videolan/libdca/0.0.5/libdca-0.0.5.tar.bz2
      bzip2 -d libdca-0.0.5.tar.bz2
      tar xvf libdca-0.0.5.tar
      rm libdca-0.0.5.tar
      cd libdca-0.0.5
      ./configure --prefix=/usr/local
      make
      make install
      cd ..
    12. Libmpeg is compiled.
      Code:
      wget http://libmpeg2.sourceforge.net/files/libmpeg2-0.5.1.tar.gz
      tar xvfz libmpeg2-0.5.1.tar.gz
      rm libmpeg2-0.5.1.tar.gz
      cd libmpeg2-0.5.1
      ./configure --prefix=/usr/local
      make
      make install
      cd ..
    13. Taglib is compiled.
      Code:
      wget http://developer.kde.org/~wheeler/files/src/taglib-1.5.tar.gz
      tar xvfz taglib-1.5.tar.gz
      rm taglib-1.5.tar.gz
      cd taglib-1.5
      ./configure --prefix=/usr/local
      make
      make install
      cd ..
    14. Live555 is compiled.
      Code:
      wget http://www.live555.com/liveMedia/public/live555-latest.tar.gz
      tar xvfz live555-latest.tar.gz
      rm live555-latest
      cd live
      ./genMakefiles linux
      make
      cd ..
      cp -r live /usr/lib
    15. The next part is optional. During VLC compiling it warns that QT must be updated. I tried to update it and it took 6 hours . And I still don't think it registered properly.
      Code:
      #wget http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.6.0.tar.gz
      #tar xvf qt-everywhere-opensource-src-4.6.0.tar.gz
      #rm qt-everywhere-opensource-src-4.6.0.tar.gz
      #cd qt-everywhere-opensource-src-4.6.0/
      #./configure
      #make
      #make install
    16. I then download the version of VLC I am trying to build and then proceed to attempt to build it with all the bells and Whistles.
      Code:
      wget http://download.videolan.org/pub/videolan/vlc/$vlcver/vlc-$vlcver.tar.bz2
      bzip2 -d vlc-$vlcver.tar.bz2
      tar xvf vlc-$vlcver.tar
      rm vlc-$vlcver.tar
      cd vlc-$vlcver
      cp -r /opt/build/ffmpeg extras
      cp -r /opt/build/x264 extras
      cp -r /usr/lib/live extras
      cp ~/Desktop/x264.c /opt/vlc-$vlcver/modules/codec/x264.c
      ls extras
      ./configure --prefix=/usr/local --with-x264-tree=extras/x264 --with-live555-tree=extras/live --enable-release --enable-switcher --enable-shout --enable-dc1394 --enable-dv --enable-dvdread --enable-v4l --enable-pvr --enable-gnomevfs --enable-vcdx --enable-faad --enable-twolame --enable-real --enable-realrtsp --enable-flac --enable-tremor --enable-tarkin --enable-theora --enable-ogg --enable-vorbis --enable-a52 --enable-gnomevfs --enable-dca
      make
      make install

    When all is said and done, VLC working is spotty at best. All commands were sourced from http://ubuntuforums.org/showpost.php...&postcount=636, http://juliensimon.blogspot.com/2008...-mp3-xvid.html, and with modifications http://juliensimon.blogspot.com/2009...ve555-all.html.

    The overall goal at the end of the day is to have VLC do this:


    Without presenting this error message:

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