0

I have php 5.1.6 running on my CentOS 5 server running Apache 2.2.3

I installed ffmpeg library and my aim is to covert a set of images into a slideshow with the fadein/fade out effect per image swap.

Command ffmpeg says:

`FFmpeg version SVN-r26402, Copyright (c) 2000-2011 the FFmpeg developers
  built on Sep 12 2011 03:37:39 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50)
  configuration:
  libavutil     50.36. 0 / 50.36. 0
  libavcore      0.16. 1 /  0.16. 1
  libavcodec    52.108. 0 / 52.108. 0
  libavformat   52.93. 0 / 52.93. 0
  libavdevice   52. 2. 3 / 52. 2. 3
  libavfilter    1.74. 0 /  1.74. 0
  libswscale     0.12. 0 /  0.12. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

and command ffmpeg -filters prints:

FFmpeg version SVN-r26402, Copyright (c) 2000-2011 the FFmpeg developers
  built on Sep 12 2011 03:37:39 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50)
  configuration:
  libavutil     50.36. 0 / 50.36. 0
  libavcore      0.16. 1 /  0.16. 1
  libavcodec    52.108. 0 / 52.108. 0
  libavformat   52.93. 0 / 52.93. 0
  libavdevice   52. 2. 3 / 52. 2. 3
  libavfilter    1.74. 0 /  1.74. 0
  libswscale     0.12. 0 /  0.12. 0
Filters:
anull            Pass the source unchanged to the output.
anullsrc         Null audio source, never return audio frames.
anullsink        Do absolutely nothing with the input audio.
copy             Copy the input video unchanged to the output.
crop             Crop the input video to width:height:x:y.
drawbox          Draw a colored box on the input video.
fifo             Buffer input images and send them when they are requested.
format           Convert the input video to one of the specified pixel formats.
gradfun          Debands video quickly using gradients.
hflip            Horizontally flip the input video.
noformat         Force libavfilter not to use any of the specified pixel formats for the input to the next filter.
null             Pass the source unchanged to the output.
overlay          Overlay a video source on top of the input.
pad              Pad input image to width:height[:x:y[:color]] (default x and y: 0, default color: black).
pixdesctest      Test pixel format definitions.
scale            Scale the input video to width:height size and/or convert the image format.
setdar           Set the frame display aspect ratio.
setpts           Set PTS for the output video frame.
setsar           Set the pixel sample aspect ratio.
settb            Set timebase for the output link.
slicify          Pass the images of input video on to next video filter as multiple slices.
transpose        Transpose input video.
unsharp          Sharpen or blur the input video.
vflip            Flip the input video vertically.
buffer           Buffer video frames, and make them accessible to the filterchain.
color            Provide an uniformly colored input, syntax is: [color[:size[:rate]]]
nullsrc          Null video source, never return images.
nullsink         Do absolutely nothing with the input video.`

firstly my ffmpeg was not having fade filter because it was giving error

fade: filter not found

so i installed the patch created vf_fade.c and made corresponding changes to Makefile and allfilters.c file of directory libavfilters in ffmpeg. configured it again then also ran commands 'make' and 'make install' Restarted the server but still its showing the same error

fade: filter not found

what should i do next? if any more details needed please ask and all the helps and ideas and links will be appreciated.

Astha
  • 1,728
  • 5
  • 17
  • 36

1 Answers1

1

Do you really need ffmpeg?

It sounds like you could achieve the same effect, maybe even better, just using javascript. Have a look at jQuery's fading API and see if that would be enough to do what you want.

blahdiblah
  • 33,069
  • 21
  • 98
  • 152
  • 1
    -1. Why assume this is a web problem? It seems the author's trying to attach several images into a video file - specially since ffmpeg is being used. – Seb Nov 29 '11 at 03:02
  • @Seb It's not the crux of their problem, but they mention their server (`I have php 5.1.6 running on my CentOS 5 server running Apache 2.2.3`), and it's tagged `php` and `ffmpeg-php`. – blahdiblah Nov 29 '11 at 06:48
  • 1
    Having PHP and a server doesn't mean it's a web application. PHP is a scripting language and can be used to do any kind of stuff not necessarily web-related. I once worked on a project where a PHP script was in charge of transcoding videos uploaded by users using ffmpeg, but ran in the background, nothing to do with HTML. – Seb Nov 29 '11 at 17:45
  • @Seb What version of Apache did you use for that transcoding? Maybe Astha isn't doing anything web-related, but Apache + PHP suggests to me that they are, regardless of what else PHP can be used for. Let's wait for them to clarify instead of just guessing amongst ourselves. – blahdiblah Nov 29 '11 at 18:33
  • Apache doesn't do transcoding, but you can call any command in PHP using functions as passthru(). Thus, you can call ffmpeg as command line even inside a PHP script. Finally, the output video can be served as a download - or not at all. Anyway, my initial -1 still holds even if it is a UI problem, because you assumed something that's not clear. – Seb Nov 30 '11 at 03:04
  • 1
    well, i was developing a web application which can convert images into a video given by user. I used PHP for the website code and ffmpeg for the video generation. But ffmpeg was not having fade filter which created the problem for me. But now its done. Thanks to you both – Astha Dec 16 '11 at 08:27
  • How do I do a? You do b. But that doesn't do A. Yeah nobody does A. https://i.redd.it/2k1ut81gpcl01.png – Recessive Apr 03 '19 at 07:07