Page 50 of 230 FirstFirst ... 40484950515260100150 ... LastLast
Results 491 to 500 of 2295

Thread: HOWTO: Install and use the latest FFmpeg and x264

  1. #491
    Join Date
    Mar 2008
    Beans
    7

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Movie time!

    Hi all and thanks to authors of these very helpful howto's! I'd like to add to it an automation of things - customizable configuring by setting some variables defined in a Makefile.

    It includes automated fetch, configure, compile and install each of the following targets:
    x264,
    live,
    amr,
    ffmpeg

    Issuing the following will ultimately result in the four .deb packages being installed and mplayer ready to be built
    Code:
    make && sudo make install
    While waiting turn on your favourite soapopera.. Of course at one point, you'll be prompted for sudo access

    After de-/en-coders have been compiled and installed - mplayer can be rebuilt from svn. Specific make-targets are available for this, issue the following.
    Code:
    make mplayer && sudo make mplayer-install
    Optionally trying to pull out a few more frames pr second on a multiprocessor system, use this statement while building mplayer:
    Code:
    make mplayer-mt && sudo make mplayer-install
    The following code is to be copied into 'Makefile', use your fav. editor and save it to a separate dir (as andrew, im no big fan of buildchains deployed in $(HOME) )

    Code:
    ###############################################################################
    ### Automated Makefile for building a 'very-latest' mplayer package.        ###
    ### suited for use on intrepid / jaunty ubuntu releases.                    ###
    ### Script was written by <Morten Sigsgaard Christensen> mschr@es.aau.dk.   ###
    ### Distribute and use freely, but without warrenty.                        ###
    ###                                                                         ###
    ### The following threads on ubuntuforums have been used as references.     ###
    ### Thanks to Andrew.46, http://ubuntuforums.org/showthread.php?t=1081070   ###
    ###                                                                         ###
    ### Runesvend pointed out how to make us of multithreaded decoding,         ###
    ### see his thread: http://ubuntuforums.org/showthread.php?t=1049449        ###
    ### Replace 'make mplayer' with 'make mplayer-mt' to patch the av* sources. ###
    ###                                                                         ###
    ### Set your ./configure options according to the targets below.            ###
    ### If at some point mplayer.hu releases a new codecpack set CODECS_URL     ###
    ###############################################################################
    
    # Target directory for generated .deb packages
    PKGDIR=`pwd`
    
    # Miscellaneous urls to fetch from
    CODECS_URL="http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20071007.tar.bz2"
    LIVE_URL="http://www.live555.com/liveMedia/public/live555-latest.tar.gz"
    # NB: repositories have been hardcodet, hopefully wont change
    
    # Any configure options sent to ./configure
    AMR_CFGOPTIONS=
    X264_CFGOPTIONS=--prefix=/usr --enable-mp4-output --enable-shared
    FFMPEG_CFGOPTIONS=--enable-gpl --enable-nonfree \
    		 --enable-pthreads --enable-libfaac --enable-libfaad --enable-libvorbis \
    		 --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid \
    		 --enable-x11grab --enable-libopencore-amrwb --enable-libopencore-amrnb \
    		 --enable-version3
    MPLAYER_CFGOPTIONS=--confdir=/etc/mplayer
    
    ###############################################################################
    ### Output veriables, only for easy-readable maketarget-code                ###
    ###############################################################################
    mpl_aptcmd="sudo apt-get install debhelper em8300-headers gawk gettext html2text \
    	intltool-debian ladspa-sdk libaa1-dev libasound2-dev libatk1.0-dev libaudio-dev \
    	libaudio2 libaudiofile-dev libavahi-client-dev libavahi-common-dev libcaca-dev \
    	libcairo2-dev libcdparanoia-dev libcelt0 libdbus-1-dev libdbus-glib-1-dev libdirectfb-dev \
    	libdirectfb-extra libdts-dev libdv4-dev libenca-dev libenca0 libesd0-dev libexpat1-dev \
    	libfaac-dev libfaac0 libffado0 libfontconfig1-dev libfreebob0 libfreetype6-dev \
    	libfribidi-dev libggi-target-x libggi2 libggi2-dev libggimisc2 libggimisc2-dev \
    	libgif-dev libgii1 libgii1-dev libgii1-target-x libgl1-mesa-dev libglib2.0-dev \
    	libglu1-mesa-dev libgtk2.0-dev libice-dev libjack-dev libjack0 libjpeg62-dev \
    	liblzo-dev liblzo1 liblzo2-2 liblzo2-dev libmad0-dev libmail-sendmail-perl \
    	libmp3lame-dev libmp3lame0 libmpcdec-dev libmpcdec3 libncurses5-dev libogg-dev \
    	libopenal-dev libopenal1 libpango1.0-dev libpixman-1-dev libpng12-dev libpopt-dev \
    	libpthread-stubs0 libpthread-stubs0-dev libpulse-dev libpulse-mainloop-glib0 \
    	libsdl1.2-dev libslang2-dev libsm-dev libsmbclient-dev libspeex-dev libsvga1 \
    	libsvga1-dev libsys-hostname-long-perl libsysfs-dev libtheora-dev libtwolame-dev \
    	libtwolame0 libvorbis-dev libx11-dev libxau-dev libschroedinger-dev libstdc++5  \
    	libxcb-render-util0-dev libxcb-render0-dev libxcb1-dev libxcomposite-dev \
    	libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev \
    	libxi-dev libxinerama-dev libxml++2.6-2 libxrandr-dev libxrender-dev libxt-dev \
    	libxv-dev libxvidcore4-dev libxvmc-dev libxxf86dga-dev libxxf86vm-dev mesa-common-dev \
    	po-debconf sharutils x11proto-composite-dev x11proto-core-dev x11proto-damage-dev \
    	x11proto-fixes-dev x11proto-input-dev x11proto-kb-dev x11proto-randr-dev \
    	x11proto-render-dev x11proto-video-dev x11proto-xext-dev x11proto-xf86dga-dev \
    	x11proto-xf86vidmode-dev x11proto-xinerama-dev xtrans-dev zlib1g-dev \
    	liboil0.3-dev libcddb2-dev"
    
    # mtime checks for non-repos
    modified_on_amr=`stat opencore-amr | head -n 7 | tail -n 1 | cut -d " " -f2`
    modified_on_live=`stat live | head -n 7 | tail -n 1 | cut -d " " -f2`
    now=`date +%Y-%m-%d`
    # a bit of coloured output
    eprefix=echo -en '\e[1;34m---------------------------------------------------------------------------------------------------\e[0m\n\e[1;34m-- \e[0m'
    epostfix=echo -e '\e[1;34m---------------------------------------------------------------------------------------------------\e[0m'
    
    
    ###############################################################################
    ### Global targets                                                          ###
    ###############################################################################
    
    
    all: dependencies fetch config compile
    	@bash -c 'echo -en "\e[1;34m#\e[0m "'
    	@echo "Codecs have been prepared! Run the following to make em available for mplayer build"
    	@bash -c 'echo -e "\t\e[0;36msudo make install\e[0m"'
    	@bash -c 'echo -en "\e[1;34m#\e[0m "'
    	@echo "Then issue"
    	@bash -c 'echo -e "\t\e[0;36mmake mplayer mplayer-install\e[0m"'
    
    dependencies:
    	@bash -c "${eprefix}"
    	@echo "Removing known conflicting packages"
    	@bash -c "${epostfix}"
    	sudo apt-get remove mplayer-nogui ffmpeg || echo Ok seems fine
    
    	@bash -c "${eprefix}"
    	@echo "Installing all dependencies"
    	@bash -c "${epostfix}"	
    	@bash -c "${mpl_aptcmd1}"
    fetch: 
    	make amr-fetch live-fetch x264-fetch ffmpeg-fetch
    config: 
    	make amr-config live-config x264-config ffmpeg-config
    compile: 
    	@bash -c "${eprefix}"
    	@echo "AMR COMPILE"
    	@bash -c "${epostfix}"
    	make --directory opencore-amr 1> /dev/null
    	@bash -c "${eprefix}"
    	@echo "x264 COMPILE"
    	@bash -c "${epostfix}"
    	make --directory x264 1> /dev/null
    	@bash -c "${eprefix}"
    	@echo "LIVE COMPILE"
    	@bash -c "${epostfix}"
    	make --directory live 1> /dev/null
    	@bash -c "${eprefix}"
    	@echo "FFMPEG COMPILE"
    	@bash -c "${epostfix}"
    	make --directory ffmpeg 1> /dev/null || bash -c 'echo -e "\t\e[0;36m Trying to fix ownership\e[0m" && sudo chown ${USER} ffmpeg/* && make --directory ffmpeg'
    install:
    	@bash -c "${eprefix}"
    	@echo "Starting install (amr, live, x264 & ffmpeg)"
    	@bash -c "${epostfix}"
    	make amr-install
    	make live-install
    	make x264-install
    	make ffmpeg-install
    	@bash -c "${eprefix}"
    	@echo "Codecs installed, now compile mplayer against em"
    	@bash -c 'echo -e "\t\e[0;36m make mplayer && sudo make mplayer-install\e[0m"'
    	@bash -c "${epostfix}"
    clean:
    	make --directory opencore-amr distclean
    	make --directory live distclean
    	make --directory x264 distclean
    	make --directory ffmpeg distclean
    	make --directory mplayer distclean
    	
    
    ###############################################################################
    ### Encoder / decoder specific targets                                      ###
    ###############################################################################
    
    
    
    
    
    
    amr-fetch:
    	@bash -c "${eprefix}"
    	@echo "AMR FETCH"
    	@bash -c "${epostfix}"
    	if [ "$(modified_on_amr)" != "$(now)" ]; then rm -fr opencore-amr && git clone --depth=1 \
    	      git://opencore-amr.git.sourceforge.net/gitroot/opencore-amr/opencore-amr; fi
    amr-config:
    	@bash -c "${eprefix}"
    	@echo "AMR CONFIG"
    	@bash -c "${epostfix}"
    	cd opencore-amr && ./configure ${AMR_CFGOPTIONS}
    amr-install:
    	@bash -c "${eprefix}"
    	@echo "AMR INSTALL"
    	@bash -c "${epostfix}"
    	cd opencore-amr && sudo checkinstall --fstrans=no --install=yes --pakdir "${PKGDIR}" \
    		--maintainer "${USER}" --pkgname="libopencore-amr" --pkgversion="9999_$(date +%Y%m%d)" \
    		--backup=no --deldoc=yes --deldesc=yes --delspec=yes --gzman --default && cp *.deb ${PKGDIR}
    
    live-fetch:
    	@bash -c "${eprefix}"
    	@echo "LIVE FETCH"
    	@bash -c "${epostfix}"
    	if [ "$(modified_on_live)" != "$(now)" ]; then rm -fr live && wget ${LIVE_URL} > `tty` && tar xf `basename ${LIVE_URL}` && rm `basename ${LIVE_URL}`; fi
    live-config:
    	@bash -c "${eprefix}"
    	@echo "LIVE CONFIG"
    	@bash -c "${epostfix}"
    	cd live && ./genMakefiles linux
    live-install:
    	@bash -c "${eprefix}"
    	@echo "LIVE INSTALL"
    	@bash -c "${epostfix}"
    	@rm $(ls live/config.[^lbu]*) 2> /dev/null || echo -O4
    	sudo cp -r live /usr/lib
    
    x264-fetch:
    	@bash -c "${eprefix}"
    	@echo "x264 FETCH"
    	@bash -c "${epostfix}"
    	@test -d x264 || git clone git://git.videolan.org/x264.git > `tty`
    	@cd x264 && git pull > `tty`
    x264-config:
    	@bash -c "${eprefix}"
    	@echo "x264 CONFIG"
    	@bash -c "${epostfix}"
    	cd x264 && ./configure ${X264_CFGOPTIONS}
    x264-install:
    	@bash -c "${eprefix}"
    	@echo "x264 INSTALL"
    	@bash -c "${epostfix}"
    	cd x264 && sudo checkinstall --fstrans=no --install=yes --pakdir "${PKGDIR}" \
    		--maintainer "${USER}" --pkgname=x264 --pkgversion "9999_$(date +%Y%m%d)" \
    		--backup=no --deldoc=yes --deldesc=yes --delspec=yes --gzman --default && cp *.deb ${PKGDIR}
    
    
    ffmpeg-fetch:
    	@bash -c "${eprefix}"
    	@echo "FFMPEG FETCH"
    	@bash -c "${epostfix}"
    	@test -d ffmpeg || svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg > `tty`
    	@cd ffmpeg && svn up > `tty`
    ffmpeg-config:
    	@bash -c "${eprefix}"
    	@echo "FFMPEG CONFIG"
    	@bash -c "${epostfix}"
    	cd ffmpeg && ./configure ${FFMPEG_CFGOPTIONS}
    ffmpeg-install:
    	@bash -c "${eprefix}"
    	@echo "FFMPEG INSTALL"
    	@bash -c "${epostfix}"
    	cd ffmpeg && sudo checkinstall --fstrans=no --install=yes --pkgname=ffmpeg \
    	--pkgversion "9999_$(date +%Y%m%d)" --default && cp *.deb ${PKGDIR}
    
    ###############################################################################
    ### MPlayer specific targets                                                ###
    ###############################################################################
    
    mplayer: mplayer-fetch mplayer-config
    	@bash -c "${eprefix}"
    	@echo "MPLAYER COMPILE"
    	@bash -c "${epostfix}"
    	make --directory mplayer
    	#done, use make %MAKETARGET%-install to apply package
    
    mplayer-config:
    	@bash -c "${eprefix}"
    	@echo "MPLAYER CONFIG"
    	@bash -c "${epostfix}"
    	cd mplayer && ./configure ${MPLAYER_CFGOPTIONS}
    
    mplayer-fetch:
    	@bash -c "${eprefix}"
    	@echo "MPLAYER FETCH"
    	@bash -c "${epostfix}"
    	test -d mplayer || svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
    	cd mplayer && svn update
    
    mplayer-mt: mplayer-fetch mplayer-patch-mt mplayer-config mplayer
    
    mplayer-patch-mt:
    	@bash -c "${eprefix}"
    	@echo "MPLAYER PATCH"
    	@echo "(deploys ffmpeg-mt repo temporarily and overwrites av* src files in mplayer"
    	@bash -c "${epostfix}"
    	@test -d ffmpeg-mt || git clone http://git.gitorious.org/ffmpeg/ffmpeg-mt.git > `tty`
    	@cd ffmpeg-mt && git pull http://git.gitorious.org/ffmpeg/ffmpeg-mt.git > `tty`
    	@make --directory mplayer distclean
    	rm -rf mplayer/libavcodec mplayer/libavformat mplayer/libavutil 
    	cp -a ffmpeg-mt/libavcodec ffmpeg-mt/libavformat ffmpeg-mt/libavutil mplayer
    	#@rm -fr ffmpeg-mt
    mplayer-install:
    	@bash -c "${eprefix}"
    	@echo "MPLAYER (codec) INSTALL"
    	@bash -c "${epostfix}"
    	@test -f `basename ${CODECS_URL}` || wget ${CODECS_URL}
    	mkdir -pv /usr/lib/codecs
    	tar xjf `basename ${CODECS_URL}`
    	cp -v `echo $(shell basename ${CODECS_URL}|sed 's/\.tar.*//')`/* /usr/lib/codecs
    	rm `basename ${CODECS_URL}`
    	@bash -c "${eprefix}"
    	@echo "MPLAYER (binaries) INSTALL"
    	@bash -c "${epostfix}"
    	cd mplayer && checkinstall -D --install=yes --fstrans=no --pakdir "${PKGDIR}" \
    		--pkgname mplayer --backup=no --deldoc=yes --deldesc=yes --delspec=yes --default \
    		--maintainer "${USER}" --pkgversion "9999_$(grep "#define VERSION" version.h | cut -d"-" -f2)svn"
    	cp mplayer/*.deb ${PKGDIR}
    Distribute freely, mail me if you have any questions - or post here, will try to monitor the thread. If others have success in using it also, feel free to use in ubuntu guides.

    // Tuxprobe
    Last edited by TuxProbe; October 3rd, 2009 at 10:07 AM. Reason: misplaced bracket in live-fetch

  2. #492
    Join Date
    Jul 2009
    Location
    India
    Beans
    587
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Install and use the latest FFmpeg and x264

    i am getting an error saying i need to install "ffplay" when i try converting anything with winff.

    why is that?

  3. #493
    Join Date
    Sep 2006
    Beans
    3,470

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by arnab_das View Post
    i am getting an error saying i need to install "ffplay" when i try converting anything with winff.

    why is that?
    What version of Ubuntu are you using? FFplay needs the libsdl1.2-dev package as a dependency, so you need to install this before compiling FFmpeg. The guide on the first page of this thread for Intrepid and Hardy include this file in Step 2, but the guides for Hardy and Dapper put the package under "optional dependencies". I just did a test run of the first page guide and FFplay is installed successfully.

    Quote Originally Posted by arnab_das View Post
    thank u so very much for writing such an awesome article. but can i delete the ffmpeg and x264 folders (under home directory) which have been created? they're consuming around 300mb.
    Yes, you can delete these directories, but they are useful to keep if you ever want to upgrade x264 and FFmpeg. See the Updating Your Installation section of this guide.

    Crosslinked to:
    ffplay missing
    Re: Update ffmpeg
    Re: Any good video converter?
    Last edited by FakeOutdoorsman; September 29th, 2009 at 06:20 PM.

  4. #494
    Join Date
    Jul 2009
    Location
    India
    Beans
    587
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by FakeOutdoorsman View Post
    What version of Ubuntu are you using? FFplay needs the libsdl1.2-dev package as a dependency, so you need to install this before compiling FFmpeg. The guide on the first page of this thread for Intrepid and Hardy include this file in Step 2, but the guides for Hardy and Dapper put the package under "optional dependencies". I just did a test run of the first page guide and FFplay is installed successfully.



    Yes, you can delete these directories, but they are useful to keep if you ever want to upgrade x264 and FFmpeg. See the Updating Your Installation section of this guide.

    Crosslinked to:
    ffplay missing
    Re: Update ffmpeg
    i installed winff after installing ffmpeg. then i tried converting a video with it.
    and here's the error i find. i have installed libsdl1.2-dev as u can see in the synaptic.

    whats the problem here?


  5. #495
    Join Date
    Sep 2006
    Beans
    3,470

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by arnab_das View Post
    i installed winff after installing ffmpeg. then i tried converting a video with it.
    and here's the error i find. i have installed libsdl1.2-dev as u can see in the synaptic.

    whats the problem here?
    As paul.gevers mentioned in Re: Update ffmpeg and in Re: Any good video converter? If you're using WinFF from the repository you will need to go to WinFF -> Edit -> Preferences -> Linux Tab. In the Path to FFplay Executable box, enter:
    Code:
    /usr/local/bin/ffplay
    WinFF is looking for FFplay in /usr/bin where repository FFplay gets installed, but this guide compiles FFmpeg and FFplay to /usr/local/bin to keep from conflicting with repository packages.

    Also, you have asked this question in four different threads and I recommend just asking in one next time. Your question will be seen, you won't have people repeating answers, and it will be easier to follow.

    Anyway, I quickly tested this with my compiled FFmpeg and WinFF from the repository and it seemed to work after I changed the path to the correct location as paul.gevers mentioned.
    Last edited by FakeOutdoorsman; September 29th, 2009 at 08:30 PM. Reason: FFplay binary is lowercase "ffplay"

  6. #496
    Join Date
    Jul 2009
    Location
    India
    Beans
    587
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by FakeOutdoorsman View Post
    As paul.gevers mentioned in Re: Update ffmpeg and in Re: Any good video converter? If you're using WinFF from the repository you will need to go to WinFF -> Edit -> Preferences -> Linux Tab. In the Path to FFplay Executable box, enter:
    Code:
    /usr/local/bin/FFplay
    WinFF is looking for FFplay in /usr/bin where repository FFplay gets installed, but this guide compiles FFmpeg and FFplay to /usr/local/bin to keep from conflicting with repository packages.

    Also, you have asked this question in four different threads and I recommend just asking in one next time. Your question will be seen, you won't have people repeating answers, and it will be easier to follow.

    Anyway, I quickly tested this with my compiled FFmpeg and WinFF from the repository and it seemed to work after I changed the path to the correct location as paul.gevers mentioned.
    thanks. actually i changed the ffmpeg and ffplay location to "/usr/local/bin/ffmpeg" (-path to ffmpeg executable) and "/usr/local/bin/FFplay" (-path to ffplay executable) and "/usr/bin/x-terminal-emulator" (-terminal to run ffmpeg). is this the correct setting?

    winff is working okay at the moment

    P.S.- i apologise multiple posts. wont happen again.
    Last edited by arnab_das; September 29th, 2009 at 10:14 PM.

  7. #497
    Join Date
    Sep 2006
    Beans
    3,470

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by arnab_das View Post
    thanks. actually i changed the ffmpeg and ffplay location to "/usr/local/bin/ffmpeg" (-path to ffmpeg executable) and "/usr/local/bin/FFplay" (-path to ffplay executable) and "/usr/bin/x-terminal-emulator" (-terminal to run ffmpeg). is this the correct setting?

    winff is working okay at the moment

    P.S.- i apologise multiple posts. wont happen again.
    That may work, but the FFplay binary file is spelled "ffplay", so your path in WinFF should be "/usr/local/bin/ffplay". I capitalized it by mistake in my earlier post.

  8. #498
    Join Date
    Jul 2009
    Location
    India
    Beans
    587
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by FakeOutdoorsman View Post
    That may work, but the FFplay binary file is spelled "ffplay", so your path in WinFF should be "/usr/local/bin/ffplay". I capitalized it by mistake in my earlier post.
    okey dokey. thanks a lot mate.

  9. #499
    Join Date
    Sep 2009
    Beans
    25

    Lightbulb Re: HOWTO: Install and use the latest FFmpeg and x264

    php5-ffmpeg extension of php requires , ffmpeg to be compiled as shared , I installed successfully ffmpeg this method but got error while compiling php5-fmpeg

    "ffmpeg: error while loading shared libraries: libavutil.so.50: cannot open
    shared object file: No such file or directory"

    Can you please solve my problem
    thanks.

  10. #500
    Join Date
    Sep 2006
    Beans
    3,470

    Re: HOWTO: Install and use the latest FFmpeg and x264

    Quote Originally Posted by rahul23 View Post
    php5-ffmpeg extension of php requires , ffmpeg to be compiled as shared , I installed successfully ffmpeg this method but got error while compiling php5-fmpeg

    Code:
    "ffmpeg: error while loading shared libraries: libavutil.so.50: cannot open
    shared object file: No such file or directory"
    Can you please solve my problem
    thanks.
    Unfortunately I have no experience with php5-ffmpeg. I'm unsure if php5-ffmpeg will even recognize the shared libraries from a compiled FFmpeg SVN. Did you enable sharing on FFmpeg? The FFmpeg configure line requires "--enable-shared". After you install FFmpeg, you need to run "sudo ldconfig". I don't really know what I'm talking about here because shared FFmpeg and Ubuntu package management are not my strong points.

    I have no idea what version of Ubuntu you're using, but why not install php5-ffmpeg with FFmpeg and libavcodec-unstripped-5* (to enable restricted encoders) from the repository?

Page 50 of 230 FirstFirst ... 40484950515260100150 ... 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
  •