Page 169 of 241 FirstFirst ... 69119159167168169170171179219 ... LastLast
Results 1,681 to 1,690 of 2402

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

  1. #1681
    Join Date
    Apr 2011
    Beans
    33

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

    hi there i'm trying to do live streaming video for an interactive application so i need as low latency as i can get, i have found this thread to be EXTREMELY helpful. following the guide in the first post, i was able to build all the stuff from source with lavf enabled. the x264 encoder works beautifully. but ffserver segfaults, even just printing the usage message. is this a known problem? is anyone still using ffserver? if not what is a good free alternative?

    thanks !!

  2. #1682
    Join Date
    May 2011
    Beans
    1

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

    Hi !
    Same problem here when trying to launch ffserver.
    Sometimes I have a message "Deleting file '/tmp/feed1.ffm' as it appears to be corrupt" before the segfault.

    I re-installed ffmpeg many time and once, ffserver did not segfault at the start but as soon as I did "ffmpeg http://localhost:8090/feed1.ffm" with any kind of input. I got this case only once.

    My ffserver.conf file is the basic one found on http://www.ffmpeg.org/sample.html

    I guess the versions on the git repository has a few bugs...

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

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

    Unfortunately, I have almost no experience with FFserver, but I do know that this is a known bug:

    Ticket #178: ffserver segfault

    If you register you can CC yourself to the bug report to get e-mail nofitications of any updates to the report.

  4. #1684
    Join Date
    Feb 2010
    Beans
    8

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

    Got problem compiling ffmpeg on Ubuntu 11.04. On configure stage says "ERROR: libx264 not found". Building on Compaq Mini with Intel Atom CPU.

    Code:
    check_header x264.h
    check_cpp
    BEGIN /tmp/ffconf.peU2ku7I.c
        1   #include <x264.h>
        2   int x;
    END /tmp/ffconf.peU2ku7I.c
    gcc -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -std
    =c99 -fomit-frame-pointer -pthread -E -o /tmp/ffconf.slP988xH.o /tmp/ffconf.peU2ku7I.c
    /tmp/ffconf.peU2ku7I.c:1:18: fatal error: x264.h: No such file or directory
    compilation terminated.
    ERROR: libx264 not found
    Could it be problem with ./configure options of x264 on certain CPU?

  5. #1685
    Join Date
    Dec 2006
    Beans
    7,349

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

    Can you post the results of the following command:

    Code:
    sudo find /usr -iname 'x264.h'
    Andrew
    You think that's air you're breathing now?

  6. #1686
    Join Date
    Feb 2010
    Beans
    8

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

    Outputs this:
    Code:
    /usr/local/include/x264.h
    UPD. Seems that I solved the problem.
    with new x264 configure string
    Code:
    ./configure --extra-cflags="-march=atom" --enable-pic --enable-shared
    Last edited by flibustier; May 12th, 2011 at 01:11 PM.

  7. #1687
    Join Date
    May 2011
    Beans
    2

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

    Hi,

    I followed these great instructions on 11.04 and they work great!

    However, I am now having trouble installing the ffmpeg-php extension. I tried recompiling x264 and ffmpeg with --enable-shared instead but it still was not finding my installation. Could someone please help with some instructions on how I can install ffmpeg-php?

    Thanks!

  8. #1688
    Join Date
    Dec 2006
    Beans
    7,349

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

    Quote Originally Posted by dualistic View Post
    However, I am now having trouble installing the ffmpeg-php extension. I tried recompiling x264 and ffmpeg with --enable-shared instead but it still was not finding my installation. Could someone please help with some instructions on how I can install ffmpeg-php?
    I have not really used FFmpeg-php myself but I had a quick look purely from curiosity (admittedly using a non-Ubuntu distro) and although phpize seemed to run ok:

    Code:
    andrew@skamandros~/Desktop/ffmpeg-php-0.6.0$ phpize
    Configuring for:
    PHP Api Version:         20090626
    Zend Module Api No:      20090626
    Zend Extension Api No:   220090626
    configure.in:3: warning: prefer named diversions
    configure.in:3: warning: prefer named diversions
    and ./configure ran ok, picking up the FFmpeg libraries:

    Code:
    andrew@skamandros~/Desktop/ffmpeg-php-0.6.0$ ./configure
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for a sed that does not truncate output... /usr/bin/sed
    checking for cc... cc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables... 
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether cc accepts -g... yes
    checking for cc option to accept ISO C89... none needed
    checking how to run the C preprocessor... cc -E
    checking for icc... no
    checking for suncc... no
    checking whether cc understands -c and -o together... yes
    checking for system library directory... lib
    checking if compiler supports -R... no
    checking if compiler supports -Wl,-rpath,... yes
    checking build system type... i686-pc-linux-gnu
    checking host system type... i686-pc-linux-gnu
    checking target system type... i686-pc-linux-gnu
    checking for PHP prefix... /usr
    checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
    checking for PHP extension directory... /usr/lib/php/extensions
    checking for PHP installed headers prefix... /usr/include/php
    checking if debug is enabled... no
    checking if zts is enabled... no
    checking for re2c... no
    configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
    checking for gawk... gawk
    checking for ffmpeg support... yes, shared
    checking whether to force gd support in ffmpeg-php... no
    checking for ffmpeg headers... ...found in /usr/include/libavcodec
    checking for ffmpeg libavcodec.so... ...found in /usr/lib
    checking for ffmpeg swscale support... yes
    checking for ld used by cc... /usr/i486-slackware-linux/bin/ld
    checking if the linker (/usr/i486-slackware-linux/bin/ld) is GNU ld... yes
    checking for /usr/i486-slackware-linux/bin/ld option to reload object files... -r
    checking for BSD-compatible nm... /usr/bin/nm -B
    checking whether ln -s works... yes
    checking how to recognize dependent libraries... pass_all
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking dlfcn.h usability... yes
    checking dlfcn.h presence... yes
    checking for dlfcn.h... yes
    checking the maximum length of command line arguments... 1572864
    checking command to parse /usr/bin/nm -B output from cc object... ok
    checking for objdir... .libs
    checking for ar... ar
    checking for ranlib... ranlib
    checking for strip... strip
    checking if cc supports -fno-rtti -fno-exceptions... no
    checking for cc option to produce PIC... -fPIC
    checking if cc PIC flag -fPIC works... yes
    checking if cc static flag -static works... yes
    checking if cc supports -c -o file.o... yes
    checking whether the cc linker (/usr/i486-slackware-linux/bin/ld) supports shared libraries... yes
    checking whether -lc should be explicitly linked in... no
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... no
    
    creating libtool
    appending configuration tag "CXX" to libtool
    configure: creating ./config.status
    config.status: creating config.h
    make crashed out with multiple errors in ffmpeg_movie.c, I demonstrate some of these here:

    Code:
    VIDEO’ undeclared (first use in this function)
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘_php_get_pixelformat’:
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:850:57: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘_php_get_codec_name’:
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:963:40: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getVideoCodec’:
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:989:58: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getAudioCodec’:
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1009:58: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getVideoStreamId’:
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1029:60: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getAudioStreamId’:
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1051:60: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getAudioChannels’:
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1089:53: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getAudioSampleRate’:
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1125:59: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getAudioBitRate’:
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1161:53: error: ‘CODEC_TYPE_AUDIO’ undeclared (first use in this function)
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘zim_ffmpeg_movie_getVideoBitRate’:
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1181:53: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘_php_read_av_frame’:
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1204:13: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1215:13: warning: implicit declaration of function ‘avcodec_decode_video’
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1219:48: error: ‘PKT_FLAG_KEY’ undeclared (first use in this function)
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘_php_get_av_frame’:
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1246:57: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1282:24: error: ‘AVCodecContext’ has no member named ‘hurry_up’
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1284:24: error: ‘AVCodecContext’ has no member named ‘hurry_up’
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function ‘_php_get_sample_aspect_ratio’:
    /home/andrew/Desktop/ffmpeg-php-0.6.0/ffmpeg_movie.c:1443:57: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
    make: *** [ffmpeg_movie.lo] Error 1
    Are these the errors that stopped your compilation? I shall crank up my Natty Narwhal installation and have a proper look later and hopefully an FFmpeg-php guru will also see your post .

    Edit: Mind you I picked up the latest FFmpeg-php from svn and saw this in the changelog:

    Code:
    version 0.6.3 (3/30/2009)
        Bug Fixes
        * Fixed compatibility with ffmpeg 0.5.0 release. ffmpeg-php is only
        supporting offical releases from here on.
    So I don't like your chances if the last supported FFmpeg build is so ancient .
    Last edited by andrew.46; May 12th, 2011 at 10:42 PM.
    You think that's air you're breathing now?

  9. #1689
    Join Date
    May 2011
    Beans
    2

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

    Thanks for the reply Andrew!

    Are these the errors that stopped your compilation?
    Yes, those are the errors exactly (my phpize also worked fine). I think there is an ubuntu distribution that installs just fine (using apt-get) if you also install ffmpeg with apt-get, at least back with 9.04. Unfortunately installing ffmpeg with apt-get won't enable aac encoding and libx264.

    However, following the instructions in the original post in this (awesome) thread, I can't get it to work.

  10. #1690
    Join Date
    Dec 2006
    Beans
    7,349

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

    Quote Originally Posted by dualistic View Post
    Yes, those are the errors exactly (my phpize also worked fine). I think there is an ubuntu distribution that installs just fine (using apt-get) if you also install ffmpeg with apt-get, at least back with 9.04. Unfortunately installing ffmpeg with apt-get won't enable aac encoding and libx264.
    I guess it depends on how keen you are to get FFmpeg-php going. One possibility is to remove the FFmpeg installed in this guide and install the standard Ubuntu FFmpeg as well as FFmpeg-php and then consult Fakeutdoorsman's other guide:

    HOWTO: Easily enable MP3, MPEG4, AAC, and other restricted encoders in FFmpeg
    http://ubuntuforums.org/showthread.php?t=1117283

    to enable aac and libx264 encoding. Hopefully this will work although I have not tested it myself as I have no great use for FFmpeg-php. But then you lose all the great benefits of running the cutting edge FFmpeg .
    You think that's air you're breathing now?

Page 169 of 241 FirstFirst ... 69119159167168169170171179219 ... 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
  •