Transcoding all uploaded videos to FLV

danneh3826
danneh3826's picture

Joined: 2007-08-18
Posts: 290
Posted: Thu, 2010-09-23 18:32

Hi,
I was wondering if anyone either has, is working on, or intends to write a module which will transcode all uploaded videos to a particular format (FLV preferably), and maybe have some sort of feature such as Youtube which allows you to select which quality to watch to accommodate for users on slower connections as well.
Basically, all my videos are in HD, and are in a size that is definately unstreamable. Rather than attempt to down-convert them before uploading them, it'd be nice if the server could do it for me. It's my server, so I'm not concerned about using up CPU resources in doing this.
Dan

Continued in this thread:
http://gallery.menalto.com/node/108638 - floridave

 
danneh3826
danneh3826's picture

Joined: 2007-08-18
Posts: 290
Posted: Thu, 2010-09-23 21:51

in anticipation that such module doesn't exist yet for G3, i've started to write one. it'll behave somewhat like a youtube clone, taking your video and converting it to one (or a selection of) different flv resolution/formats (240p, 360p, etc..).

unless anyone else already has one either in progress, developed, or otherwise, i'll post it here shortly if others are interested :)

Dan

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2010-09-24 04:14
Quote:
i'll post it here shortly if others are interested

Please do!

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
daveman

Joined: 2009-10-09
Posts: 25
Posted: Thu, 2010-10-07 19:22

this is EXACTLY what I am looking forward to.

Can;t wait

Dave

 
danneh3826
danneh3826's picture

Joined: 2007-08-18
Posts: 290
Posted: Wed, 2010-10-27 19:59

lol i actually forgot a lil bit about this. been working on a couple of other projects recently (paid work > free work).

anyhoo, i have actually gotten this working. first version's here:

http://www.danneh.org/files/transcode.tar.gz

drop it in the modules directory, extract, and enable it in the modules section. then go to the 'video transcode' settings page, select the quality(qualities) you want to transcode to, and save changes. also check the path to ffmpeg is correct. you might find that, when you upload videos, the tasks appear in the maintenance page as 'stalled'. this most likely means ffmpeg died either transcoding, or doesn't support some of the parameters. the command that's run is spit out into the g3_logs table. pull it out of the data and run it manually on the command line (if you have access to it) and see what it says.

it currently requires/is hard coded to use the aac codec for audio and flv for video (seems to be the most common combination that doesn't contain the mp3 codec).

i envisage there being issues, being the first version and all. i also can't work out how to get the auto-updater/version detection working yet, so any new versions you'll have to check for manually either here or my website (http://www.danneh.org). i'll eventually get round to writing a blog post for it and a category for subscription.

in the meantime, if someone from the gallery team (or anyone else who's written a g3 module) can tell me how to get the auto-updater going, that'll most likely be the next thing i implement.

Dan

 
danneh3826
danneh3826's picture

Joined: 2007-08-18
Posts: 290
Posted: Thu, 2010-10-07 21:58
 
diverselab

Joined: 2010-09-21
Posts: 23
Posted: Fri, 2010-10-08 02:12

hi, i have tried to install this module and got "The transcode module requires the php5-ffmpeg extension." not sure what that means, but i do have ffmpeg installed on the server. any help appreciated

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2010-10-08 05:10

diverselab: if you're on debian or ubuntu, try doing "aptitude install php5-ffmpeg" then restart Apache2.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git

 
diverselab

Joined: 2010-09-21
Posts: 23
Posted: Fri, 2010-10-08 06:35

thanks for your reply, i'm using XAMPP installed on a local server (mac os x), not sure how i would go about doing that. sorry don't really know a lot about this stuff.

 
mamouneyya

Joined: 2009-11-02
Posts: 337
Posted: Fri, 2010-10-08 08:09

I cannot get it working because Gallery 3 uploader doesn't allow to select unsupported formats in the uploading window. So any video format except flv and mp4 is unclickable (grayed out).

P.S I've tried to edit the file /modules/gallery/views/form_uploadify.html.php replacing:
fileExt: "*.gif;*.jpg;*.jpeg;*.png;*.GIF;*.JPG;*.JPEG;*.PNG<? if ($movies_allowed): ?>;*.flv;*.mp4;*.m4v;*.m4v;*.FLV;*.MP4;*.M4V<? endif ?>",
with:
fileExt: "*.gif;*.jpg;*.jpeg;*.png;*.GIF;*.JPG;*.JPEG;*.PNG<? if ($movies_allowed): ?>;*.*<? endif ?>",

Now I can select any format. However, after the uploading completes I get Server Error 400. Any help?
Thanks!

 
mamouneyya

Joined: 2009-11-02
Posts: 337
Posted: Fri, 2010-10-08 08:40

Hmm, the content of all log files I found in /var/modules/transcode/log is:

FFmpeg version SVN-r14473, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads --enable-liba52 --enable-libamr-nb --enable-libamr-wb --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --extra-cflags=-I/usr/local/cpffmpeg/include/ --extra-ldflags=-L/usr/local/cpffmpeg/lib --enable-cross-compile
  libavutil version: 49.7.0
  libavcodec version: 51.62.0
  libavformat version: 52.18.0
  libavdevice version: 52.0.0
  built on Apr  8 2010 19:28:07, gcc: 4.1.2 20080704 (Red Hat 4.1.2-46)
/home/****/public_html/gallery3/var/albums/Bla: no such file or directory

P.S Okay, I am getting in. Actually the one in the log here seems to be a different issue. It happened with the mp4 file I tried to upload after giving up with the server error problem which happened with the avi file I was trying to get it converted. It seems there is a problem with the spaces in the file names. The mentioned file in the log above has the name 'Bla Bla', but the module ignores anything after the space.

I get a different error log now, after renaming the file to 'Bla.mp4':

FFmpeg version SVN-r14473, Copyright (c) 2000-2008 Fabrice Bellard, et al.
  configuration: --prefix=/usr/local/cpffmpeg --enable-shared --enable-nonfree --enable-gpl --enable-pthreads --enable-liba52 --enable-libamr-nb --enable-libamr-wb --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --extra-cflags=-I/usr/local/cpffmpeg/include/ --extra-ldflags=-L/usr/local/cpffmpeg/lib --enable-cross-compile
  libavutil version: 49.7.0
  libavcodec version: 51.62.0
  libavformat version: 52.18.0
  libavdevice version: 52.0.0
  built on Apr  8 2010 19:28:07, gcc: 4.1.2 20080704 (Red Hat 4.1.2-46)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/****/public_html/gallery3/var/albums/Bla.MP4':
  Duration: 00:01:01.02, start: 0.000000, bitrate: 134 kb/s
    Stream #0.0(und): Video: h264, yuv420p, 320x240, 24.00 tb(r)
    Stream #0.1(und): Audio: libfaad, 32000 Hz, stereo
Unknown encoder 'aac'
 
danneh3826
danneh3826's picture

Joined: 2007-08-18
Posts: 290
Posted: Fri, 2010-10-08 10:08

yep, as i thought - your ffmpeg installation doesn't have support for the aac codec. now, if you have root access, you can re-compile and re-install ffmpeg with aac enabled. if not, you can run your own ffmpeg version in your home directory, which is actually what i did.

(this is also assuming you have ssh access to the server)

wget http://ffmpeg.org/releases/ffmpeg-0.6.tar.gz
tar -zxf ffmpeg-0.6.tar.gz
cd ffmpeg-0.6
./configure  --enable-gpl --enable-pthreads --enable-encoder=libvorbis --enable-encoder=libogg --enable-encoder=liba52 --enable-encoder=libgsm --enable-encoder=dc1394 --enable-encoder=libxvid --disable-debug --enable-encoder=libfaac --enable-encoder=libmp3lame --enable-encoder=libx264 --enable-encoder=libfaad --enable-encoder=libtheora --enable-decoder=libvorbis --enable-decoder=libogg --enable-decoder=liba52 --enable-decoder=libgsm --enable-decoder=dc1394 --enable-decoder=libxvid --enable-decoder=libfaac --enable-decoder=libmp3lame --enable-decoder=libx264 --enable-decoder=libfaad && make

note: the 'make' process takes quite a while, so go make a coffee or something while this happens. once it's complete, go into the transcode module's settings and change the path for ffmpeg from what it is now to the location you just compiled your own ffmpeg in, (i.e; instead of the default /usr/bin/ffmpeg (for example), if you compiled in /home/dan/ffmpeg0.6, the path would be /home/dan/ffmpeg-0.6/ffmpeg).

this should at least get the module working. i'll fix the issue with spaces in the filenames later on today and roll a new version.

 
mamouneyya

Joined: 2009-11-02
Posts: 337
Posted: Fri, 2010-10-08 10:51

I have no root access to my server (shared hosting), but I do have SSH. However, the compile doesn't work for me. I got:

-jailshell-3.2$ ./configure  --enable-gpl --enable-pthreads --enable-encoder=libvorbis --enable-encoder=libogg --enable-encoder=liba52 --enable-encoder=libgsm --enable-encoder=dc1394 --enable-encoder=libxvid --disable-debug --enable-encoder=libfaac --enable-encoder=libmp3lame --enable-encoder=libx264 --enable-encoder=libfaad --enable-encoder=libtheora --enable-decoder=libvorbis --enable-decoder=libogg --enable-decoder=liba52 --enable-decoder=libgsm --enable-decoder=dc1394 --enable-decoder=libxvid --enable-decoder=libfaac --enable-decoder=libmp3lame --enable-decoder=libx264 --enable-decoder=libfaad && make
Unable to create and execute files in /tmp.  Set the TMPDIR environment
variable to another directory and make sure that it is not mounted noexec.
Sanity test failed.

If you think configure made a mistake, make sure you are using the latest
version from SVN.  If the latest version fails, report the problem to the
 mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.err" produced by configure as this will help
solving the problem.

I tried to temporarily change the tmp directory to an accessable folder I've created under my home directory, but this doesn't work also. Now I get a different error:

-jailshell-3.2$ mkdir ~/tmpdir
-jailshell-3.2$ export TMPDIR=~/tmpdir/
-jailshell-3.2$ ./configure  --enable-gpl --enable-pthreads --enable-encoder=libvorbis --enable-encoder=libogg --enable-encoder=liba52 --enable-encoder=libgsm --enable-encoder=dc1394 --enable-encoder=libxvid --disable-debug --enable-encoder=libfaac --enable-encoder=libmp3lame --enable-encoder=libx264 --enable-encoder=libfaad --enable-encoder=libtheora --enable-decoder=libvorbis --enable-decoder=libogg --enable-decoder=liba52 --enable-decoder=libgsm --enable-decoder=dc1394 --enable-decoder=libxvid --enable-decoder=libfaac --enable-decoder=libmp3lame --enable-decoder=libx264 --enable-decoder=libfaad && make
Unknown C compiler gcc
gcc is unable to create an executable file.
If gcc is a cross-compiler, use the --enable-cross-compile option.
Only do this if you know what cross compiling means.
C compiler test failed.

If you think configure made a mistake, make sure you are using the latest
version from SVN.  If the latest version fails, report the problem to the
 mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.err" produced by configure as this will help
solving the problem.

Any thoughts...?
Thanks!

 
danneh3826
danneh3826's picture

Joined: 2007-08-18
Posts: 290
Posted: Fri, 2010-10-08 11:15

hmm, i have vague nightmares about trying to do anything productive in a jailed shell. mostly because most everything you can do normally isn't possible.

i've tried to build a statically linked ffmpeg binary, download this, put it in your home directory, chmod 755 it and run ./ffmpeg and see if it runs. with a bit of luck, all the libraries that it needs are compiled into the executable, so it *should* just work.

ffmpeg here: http://www.danneh.org/ffmpeg.gz

(note: this was built on ubuntu 8.04 32-bit on gcc v4.3.2. i don't have any resources to compile a 64 bit binary, but this is worth a shot anyway).

 
mamouneyya

Joined: 2009-11-02
Posts: 337
Posted: Fri, 2010-10-08 11:28
-jailshell-3.2$ ./ffmpeg
./ffmpeg: /lib/libc.so.6: version `GLIBC_2.7' not found (required by ./ffmpeg)

Thanks for your time, Dan.

 
mamouneyya

Joined: 2009-11-02
Posts: 337
Posted: Fri, 2010-10-08 11:41

Hmm, I've just found a pre-compiled FFMpeg version here. I am going to give it a try. Will keep you posted.

 
mamouneyya

Joined: 2009-11-02
Posts: 337
Posted: Fri, 2010-10-08 11:59

It seems it's also compiled without aac enabled:

FFmpeg version SVN-r9332, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --prefix=/home/corde5co/bin/ffmpeg
  libavutil version: 49.4.0
  libavcodec version: 51.40.4
  libavformat version: 51.12.1
  built on Jun 16 2007 07:51:34, gcc: 3.4.6 20060404 (Red Hat 3.4.6-8)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/****/public_html/gallery3/var/albums/TEST2/Bla-1744496048.MP4':
  Duration: 00:01:01.0, start: 0.000000, bitrate: 134 kb/s
  Stream #0.0(und): Video: h264, yuv420p, 320x240, 24.00 fps(r)
  Stream #0.1(und): Audio: mp4a / 0x6134706D, 32000 Hz, stereo
Unknown codec 'aac'
 
danneh3826
danneh3826's picture

Joined: 2007-08-18
Posts: 290
Posted: Fri, 2010-10-08 12:42

hmm, run

./ffmpeg -formats | grep DEA

DEA because:
D = Decoding supported (need that)
E = Encoding supported (definately need that)
A = Audio codec

it's easier to filter the list of ones that will definately work, than trying to sift through an even longer list :)

look at the list that's spit out and pick something from the list. in order of preference, depending on what's compiled in, i'd choose

1. aac
2. vorbis
3. mp2
4. flac

then navigate to the gallery's modules/transcode/helpers directory, open transcode_event.php in your favorite text editor, and go to line 61:

$srcACodec = "aac";

change to:

$srcACodec = "<your choice>";

replace <your choice> with one of aac, vorbis, mp2 or flac (lower case, in these exact letters) that your ffmpeg binary supports.

save and re-upload a video and see if it goes through.

note to self: add detection routines for audio input, populate select box in module's configuration settings and allow choices of only audio codecs which are supported by chosen ffmpeg binary.

 
shecter
shecter's picture

Joined: 2006-12-30
Posts: 130
Posted: Fri, 2010-10-08 16:16

Hi,

I've installed this module, but when trying to activate it I get the "The transcode module requires the php5-ffmpeg extension." I told my host -LunarPages- about this, and asked them to install the extension and I got this response:

FFMPEG installed. Its path is /usr/local/bin/ffmpeg

This is the path already setup in my Advanced settings in Gallery3. What should my next step be if I don't have have shell access?

Thanks,

-Marc

 
danneh3826
danneh3826's picture

Joined: 2007-08-18
Posts: 290
Posted: Fri, 2010-10-08 17:31

php5-ffmpeg is different to ffmpeg. what they're telling you is the path to the actual ffmpeg binary/application. php5-ffmpeg is a php extension which provides php with easy access to a handful of ffmpeg routines for detecting and setting various things to do with videos. a wrapper, if you will. if makes available an class called ffmpeg_movie() which has various methods to achieve certain tasks without having to run ffmpeg on the command line/exec and parsing it's output.

given the responses i've received today about this module, i'm going to re-work a couple of things as it seems that ffmpeg doesn't come compiled with certain dependencies as standard.

this is my plan:
1. remove dependency for ffmpeg php extension. it was just easier at the time to utilise this class, mainly to get it working. now it seems that, from a compatibility point of view, it's easier to just parse out the command line response to get the basic info it needs about the source video.
2. package a pre-compiled ffmpeg application which is known to work correctly. this should hopefully aid those that either don't have ffmpeg installed, or don't have the relevant codecs compiled in.
3. allow a dropdown selection of compiled in (and flv compatible) audio codecs, removing it's static dependency on the aac codec and allowing you to select a preferred audio codec which is known to work.

this will, eventually, work out of the box. i've just never submitted anything open-source like this before, so bear with me :)

Dan

 
daveman

Joined: 2009-10-09
Posts: 25
Posted: Fri, 2010-10-08 19:22

I get the "The transcode module requires the php5-ffmpeg extension."

You say above that you will remove the dependency for ffmpeg php extension. Any idea when? (I appreciate the module and am not trying to ruch you in any way :)

Dave

 
danneh3826
danneh3826's picture

Joined: 2007-08-18
Posts: 290
Posted: Fri, 2010-10-08 19:37

workin' on it :)

hope to have something to post in a couple of hours :)

Dan

 
danneh3826
danneh3826's picture

Joined: 2007-08-18
Posts: 290
Posted: Wed, 2010-10-27 19:59

ok, version 2's here:

http://www.danneh.org/files/transcode-2.tar.gz

this one fixes:

- dropped dependency for php5-ffmpeg extension
- detect list of supported audio codecs, cross referencing them against supported flv audio codecs to provide a selection. unfortunately flv only supports aac, mp3 and adpcm_swf. i believe ffmpeg supports adpcm out of the box, but it doesn't support mp3 encoding normally unless you install a specific library for it, and the other option's aac.
- use ffprobe to detect video information to perform aspect scaling, fps and bitrate detection for smaller/larger files

hopefully this time things should go a little smoother :)

Dan

 
daveman

Joined: 2009-10-09
Posts: 25
Posted: Fri, 2010-10-08 20:58

I copies the transcode directory to the Modules directory on my server

When I try to add it in the admin panel, it does not load (i.e., I check the box but on reload of the page, it remains unchecked)

Dave

 
danneh3826
danneh3826's picture

Joined: 2007-08-18
Posts: 290
Posted: Fri, 2010-10-08 21:16

blah, i'm such a clutz :(
i forgot to remove the dependency in the installer which checks for php5-ffmpeg. that, and there was a syntax error too. boo.

re-download it, i re-uploaded the tarball :)

Dan

 
daveman

Joined: 2009-10-09
Posts: 25
Posted: Fri, 2010-10-08 22:03

Ok. It installed. Now for my next dumb question.

How do I upload files? The upload option only allows pics and .flv files.

Does this mod work with the Video mod?

And last question...

the only setting that is filled is Path to ffmpeg binary: which is set to /usr/local/bin/ffmpeg

do the other fields have to be filed in. Any idea what they should be set to?

 
mamouneyya

Joined: 2009-11-02
Posts: 337
Posted: Fri, 2010-10-08 22:24
danneh3826 wrote:
hmm, run

./ffmpeg -formats | grep DEA

I get the same error message:
./ffmpeg: /lib/libc.so.6: version `GLIBC_2.7' not found (required by ./ffmpeg)

Quote:
it's easier to filter the list of ones that will definately work, than trying to sift through an even longer list :)

look at the list that's spit out and pick something from the list. in order of preference, depending on what's compiled in, i'd choose

1. aac
2. vorbis
3. mp2
4. flac

then navigate to the gallery's modules/transcode/helpers directory, open transcode_event.php in your favorite text editor, and go to line 61:

$srcACodec = "aac";

change to:

$srcACodec = "<your choice>";

replace <your choice> with one of aac, vorbis, mp2 or flac (lower case, in these exact letters) that your ffmpeg binary supports.

save and re-upload a video and see if it goes through.

note to self: add detection routines for audio input, populate select box in module's configuration settings and allow choices of only audio codecs which are supported by chosen ffmpeg binary.

Well. I think, with the auto detection of supported audio codecs feature of version 2, there is no need to do that manually anymore.

I've upgraded the module to version 2 and re-configured it to use the FFMpeg that is installed in my server. However, the available audio codecs drop-down menu is empty. Is that mean that the FFMpeg version that is installed in my server have no support for anyone of these codecs?

 
mamouneyya

Joined: 2009-11-02
Posts: 337
Posted: Fri, 2010-10-08 22:39

Hmm, the really strange thing is that ClipBucket script says that most of those codecs are really installed:
[img]http://grab.by/6M99[/img]

Any clue...?!

 
shecter
shecter's picture

Joined: 2006-12-30
Posts: 130
Posted: Sat, 2010-10-09 21:56

My host, Lunarpages, doesn't support FFPROBE. is there anyway around this? what's the best host for a gallery install?

 
danneh3826
danneh3826's picture

Joined: 2007-08-18
Posts: 290
Posted: Sun, 2010-10-10 09:35

if you're getting an empty list of audio codecs, if you can, via ssh run this:

ffmpeg -codecs | grep DEA

that's the exec command the detections function runs, and cross-references it against supported flv audio codecs. if you can paste that here, i can maybe see why the list is empty.

shecter; that's really strange that they don't have ffprobe installed but do have ffmpeg - as ffprobe comes (and is built) as standard out of the ffmpeg box. ffprobe provides a better statistic output of the source video, whereas the same routine in ffmpeg doesn't provide the same level of detail. in fact, the only statistic missing from ffmpeg's statistical analysis is the fps value, which is shows on some videos but not others. ffprobe, in all my test cases, shows an fps value all the time. try running one of these on the shell (if you can) and see if it turns anything up:

which ffprobe
whereis ffprobe

(just incase the auto detection doesn't work correctly, which would be a little weird, as it runs the 'whereis' variation).

as far as hosts for gallery installs go, i'm only one for trying to sell my own hosting services, and supposing you'd like 100% compatibility with this module (and seemingly every other gallery3 module available so far), my hosting solution would be the best way to go </shameless_plug> lol. (since that's also the same server i developed this module on). but seriously, send me a PM if you're interested, and i'll match what you're paying now for your existing host, and maybe dump a 10% discount on there or something :)

anyone else having issues with ffprobe not being available?

 
mamouneyya

Joined: 2009-11-02
Posts: 337
Posted: Sun, 2010-10-10 10:32
-jailshell-3.2$ ffmpeg -codecs | grep DEA
ffmpeg: error while loading shared libraries: libavdevice.so.52: cannot open shared object file: No such file or directory

Do you think it's because of the jailed shell?

P.S With the pre-compiled version I mentioned earlier, I get:

-jailshell-3.2$ ~/ffmpeg/bin/ffmpeg -codecs | grep DEA
FFmpeg version SVN-r9332, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --prefix=/home/corde5co/bin/ffmpeg
  libavutil version: 49.4.0
  libavcodec version: 51.40.4
  libavformat version: 51.12.1
  built on Jun 16 2007 07:51:34, gcc: 3.4.6 20060404 (Red Hat 3.4.6-8)
/home/****/ffmpeg/bin/ffmpeg: missing argument for option '-codecs'
 
danneh3826
danneh3826's picture

Joined: 2007-08-18
Posts: 290
Posted: Sun, 2010-10-10 12:13

i see now. the ffmpeg you got there (precompiled) is quite a historic one. that's revision 9332, whereas my box is running 19441 and locally for development i'm running 25200. it seems that, since at least 19441, the -codecs option isn't available (which may explain why your auto detection doesn't exactly work). try, on your precompiled version;

ffmpeg -formats | grep DE

i'll have to find out what version that was introduced in and change the command according to the ffmpeg version installed. the output from both commands differ, -codecs gives a better list of what's availble, -formats lists everything but doesn't list the codec as video and/or audio codec.

the jailed shell probably doesn't help matters, as if it wasn't jailed you'd be able to compile a more recent version in your home directory for your own use. it seems that the installed ffmpeg is trying to access the shared libraries, most likely in /usr/lib, which you subsequently can't see because you're jailed, so it's falling over.

note to self: don't develop with the idea that everyone has access to a decent shell!

 
mamouneyya

Joined: 2009-11-02
Posts: 337
Posted: Sun, 2010-10-10 12:47
-jailshell-3.2$ ~/ffmpeg/bin/ffmpeg -formats | grep DE
FFmpeg version SVN-r9332, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --prefix=/home/corde5co/bin/ffmpeg
  libavutil version: 49.4.0
  libavcodec version: 51.40.4
  libavformat version: 51.12.1
  built on Jun 16 2007 07:51:34, gcc: 3.4.6 20060404 (Red Hat 3.4.6-8)
 DE RoQ             Id RoQ format
 DE ac3             raw ac3
 DE aiff            Audio IFF
 DE alaw            pcm A law format
 DE amr             3gpp amr file format
 DE asf             asf format
 DE au              SUN AU Format
 DE audio_device    audio grab and output
 DE avi             avi format
 DE dv              DV video format
 DE ffm             ffm format
 DE flac            raw flac
 DE flv             flv format
 DE gif             GIF Animation
 DE h261            raw h261
 DE h263            raw h263
 DE h264            raw H264 video format
 DE image2          image2 sequence
 DE image2pipe      piped image2 sequence
 DE m4v             raw MPEG4 video format
 DE mjpeg           MJPEG video
 DE mmf             mmf format
 DE mp3             MPEG audio layer 3
 DE mpeg            MPEG1 System format
 DE mpegts          MPEG2 transport stream format
 DE mulaw           pcm mu law format
 DE rawvideo        raw video format
 DE rm              rm format
 DE s16be           pcm signed 16 bit big endian format
 DE s16le           pcm signed 16 bit little endian format
 DE s8              pcm signed 8 bit format
 DE swf             Flash format
 DE u16be           pcm unsigned 16 bit big endian format
 DE u16le           pcm unsigned 16 bit little endian format
 DE u8              pcm unsigned 8 bit format
 DE voc             Creative Voice File format
 DE wav             wav format
 DE yuv4mpegpipe    YUV4MPEG pipe format
 DEA    adpcm_4xm
 DEA    adpcm_adx
 DEA    adpcm_ct
 DEA    adpcm_ea
 DEA    adpcm_ima_dk3
 DEA    adpcm_ima_dk4
 DEA    adpcm_ima_qt
 DEA    adpcm_ima_smjpeg
 DEA    adpcm_ima_wav
 DEA    adpcm_ima_ws
 DEA    adpcm_ms
 DEA    adpcm_sbpro_2
 DEA    adpcm_sbpro_3
 DEA    adpcm_sbpro_4
 DEA    adpcm_swf
 DEA    adpcm_xa
 DEA    adpcm_yamaha
 DEV D  asv1
 DEV D  asv2
 DEV    bmp
 DES    dvbsub
 DES    dvdsub
 DEV D  dvvideo
 DEV D  ffv1
 DEVSD  ffvhuff
 DEA    flac
 DEV D  flashsv
 DEVSD  flv
 DEA    g726
 DEV    gif
 DEV D  h261
 DEVSDT h263
 DEVSD  huffyuv
 DEV D  jpegls
 DEV D  mjpeg
 DEA    mp2
 DEVSDT mpeg1video
 DEVSDT mpeg2video
 DEVSDT mpeg4
 DEVSD  msmpeg4
 DEVSD  msmpeg4v1
 DEVSD  msmpeg4v2
 DEV    pam
 DEV    pbm
 DEA    pcm_alaw
 DEA    pcm_mulaw
 DEA    pcm_s16be
 DEA    pcm_s16le
 DEA    pcm_s24be
 DEA    pcm_s24daud
 DEA    pcm_s24le
 DEA    pcm_s32be
 DEA    pcm_s32le
 DEA    pcm_s8
 DEA    pcm_u16be
 DEA    pcm_u16le
 DEA    pcm_u24be
 DEA    pcm_u24le
 DEA    pcm_u32be
 DEA    pcm_u32le
 DEA    pcm_u8
 DEV    pgm
 DEV    pgmyuv
 DEV    png
 DEV    ppm
 DEV    rawvideo
 DEA    roq_dpcm
 DEV D  rv10
 DEV D  rv20
 DEV    sgi
 DEV    snow
 DEA    sonic
 DEV D  svq1
 DEV    targa
 DEV    tiff
 DEA    vorbis
 DEA    wmav1
 DEA    wmav2
 DEVSD  wmv1
 DEVSD  wmv2
 DEV D  zlib
 DEV    zmbv

What about the fact that ClipBucket detects those codecs in FFMpeg that is installed in the hosting server?

 
mamouneyya

Joined: 2009-11-02
Posts: 337
Posted: Sun, 2010-10-10 13:42

Well. I've just asked my hoster now and he told me that FFMpeg that is installed on my server DOES support all of those codecs (aac, vorbis, mp2, and flac).. so the question now is why the module doesn't detect any one of them? :S

 
danneh3826
danneh3826's picture

Joined: 2007-08-18
Posts: 290
Posted: Wed, 2010-10-27 19:59

ok, i did a bit of research, and it seems that everything i was depending on to make this module work was introduced into the ffmpeg package from version 0.6 (which is quite recent).

so, i did some more mods, as it turned out my hosting server doesn't have that version either (unbeknownst to me earlier), so i used that as an example of a server that doesn't have ffprobe, and has an older version of ffmpeg that doesn't support -codecs.

try this version: http://www.danneh.org/files/transcode-2.tar.gz (still version 2, i know. next one i'll bump up to v3, i promise lol)

overwrite the transcode folder with what's in that tarball and try again. it no longer requires ffprobe, and i've improved the audio codec detection routine work with both older and newer versions of ffmpeg.

let me know how it works out. if it's still not picking up the audio codecs correctly from ffmpeg (use the ffmpeg path it auto-detects rather than any other custom/precompiled version you have installed which it now lists below the text box in the admin area, just as an fyi), i'll knock together a quick diagnostic script so i can find out more.

Dan

 
mamouneyya

Joined: 2009-11-02
Posts: 337
Posted: Sun, 2010-10-10 19:16

I cannot change the path of FFMpeg anymore. When I save my changes the page get refreshed with the new value. However, when I go to some admin page and return again I see the old value for the path again. Unfortunately, I cannot test the new version with the FFMpeg that is installed on the server until getting that fixed.

By the way, I still see a field for FFProbe path, although you said that you removed the dependency of it.

 
danneh3826
danneh3826's picture

Joined: 2007-08-18
Posts: 290
Posted: Sun, 2010-10-10 19:19

hm, something doesn't add up there. the ffprobe field isn't there anymore.

delete the transcode folder entirely, check it's gone by trying to get to it from the admin area, then re-download and re-extract the tarball.

this would be so much easier if i could figure out how the version detection and auto-updater worked :(

 
mamouneyya

Joined: 2009-11-02
Posts: 337
Posted: Sun, 2010-10-10 19:27
danneh3826 wrote:
hm, something doesn't add up there. the ffprobe field isn't there anymore.

delete the transcode folder entirely, check it's gone by trying to get to it from the admin area, then re-download and re-extract the tarball.

I already did all of that, exactly. The same behavior still happens + The field is still there!

 
mamouneyya

Joined: 2009-11-02
Posts: 337
Posted: Sun, 2010-10-10 19:32

Could you please try that with your version and see if the problem exists for you or not?
Steps to reproduce:
(1) Go to the transcode admin page
(2) Change the FFMpeg path to something else, and save your changes
-> You should see the new path in the field
(3) Go to module admin page, then go to transcode admin page again
-> You will see that the FFMpeg path wasn't actually changed

 
danneh3826
danneh3826's picture

Joined: 2007-08-18
Posts: 290
Posted: Wed, 2010-10-27 19:59

sounds like the server's caching the php files or something.

http://www.danneh.org/files/transcode-3.tar.gz

rinse & repeat with above tarball. version number incremented, just incase gallery's doing something clever with opcode/output caching or something.

 
danneh3826
danneh3826's picture

Joined: 2007-08-18
Posts: 290
Posted: Sun, 2010-10-10 19:47

changes to the ffmpeg path on both my production server and development environment locally persist across page loads.

let me know if v3 behaves the same or not. push comes to shove you'd need to give me admin access to your gallery/ftp for a short period while i figure this one out.

 
mamouneyya

Joined: 2009-11-02
Posts: 337
Posted: Sun, 2010-10-10 19:52

Well. The FFProbe field is gone. However, the same issue with changing the path still exists. Could you please try the steps above to see if you have the problem?

P.S Will PM you the details shortly.

 
danneh3826
danneh3826's picture

Joined: 2007-08-18
Posts: 290
Posted: Sun, 2010-10-10 22:47

for anyone else following this module's progress, a small update;

i'm working with mamouneyya on his server/account to get this working in his particular scenario. the situation is there that aac is not installed (at least, ffmpeg doesn't support encoding with aac), but mp3 encoding is. whereas my development areas have aac and no mp3. there's also a couple of other issues i've located and squashed, and whereas it's not quite ready to provide an updated version yet, i should have something tomorrow night to fix all these horrid issues. ffmpeg to blame, mostly!

it's getting closer, i promise :)

like i said, i'm new to this open-source release-to-the-community stuff, i only usually develop code that will only usually ever sit on one particular server, that's either mine, i have root access to, or have access to in advance to work around it's limitations. i'm learning though :)

i'm also writing an updater/helper module that i'll ship with all of my modules in the future to provide version checking and auto-updating (from my repository) when stuff becomes available. at least, until someone from g3 tells me how their updating system works :)

Dan

 
shecter
shecter's picture

Joined: 2006-12-30
Posts: 130
Posted: Sun, 2010-10-10 22:47

Hi Again,

Using version 3 of this module. I'm going to get this working. I know it.

There are currently no audio codecs to select. and where do we go to add videos? when using the standard 'add photos' option, my AVI files don't show up in the pick list.

-Marc

 
diverselab

Joined: 2010-09-21
Posts: 23
Posted: Mon, 2010-10-11 05:37

Hi, i uploaded version 3 and when i go to settings, i added the ffmpeg path and clicked save but doesn't seem to be able to save. when i go back to settings again path field is blank. really excited to use this module hope i can get this working. thanks so much.

also like to add that after activating the module, i was not able to play all the videos untill i deactivate the module. also notice there is a Alternative Resolutions select box under the video but its empty.

 
swissphoenix

Joined: 2004-09-10
Posts: 12
Posted: Tue, 2010-10-12 20:10

after upload a (MPEG) nothing shows up and nothing is in the album folder

using version 3 and did this change to select a avi file

P.S I've tried to edit the file /modules/gallery/views/form_uploadify.html.php replacing:
fileExt: "*.gif;*.jpg;*.jpeg;*.png;*.GIF;*.JPG;*.JPEG;*.PNG<? if ($movies_allowed): ?>;*.flv;*.mp4;*.m4v;*.m4v;*.FLV;*.MP4;*.M4V<? endif ?>",
with:
fileExt: "*.gif;*.jpg;*.jpeg;*.png;*.GIF;*.JPG;*.JPEG;*.PNG<? if ($movies_allowed): ?>;*.*<? endif ?>",

edit: now i did upload a flv file and get a error message

test.flv - Unable to process this file

 
diverselab

Joined: 2010-09-21
Posts: 23
Posted: Thu, 2010-10-14 02:54

anyone got this working? i've tried fresh install with this module still no go =(

 
danneh3826
danneh3826's picture

Joined: 2007-08-18
Posts: 290
Posted: Thu, 2010-10-14 08:35

there is a couple of issues with this at present. i have access to a server which is fails miserably attempting to run, and it's getting there. unfortunately not having much free time available doesn't help in getting this working.

@shecter; this is an issue with running older (pre 0.6) versions of ffmpeg. i've resolved this in an uncommitted development version i have on my server.
@diverselab; i'm aware of that issue and also have a fix in place in the development version.
@swissphoenix; i'm currently only working with the built-in facilities which gallery provides. this includes, at the moment, only allowing file extensions which gallery allows to be uploaded. i'll hook in eventually to allow more file types to be uploaded, but this would have to be on the basis that the installed ffmpeg version supports the given file type.

i'll post a new version in the next couple of days.

 
diverselab

Joined: 2010-09-21
Posts: 23
Posted: Thu, 2010-10-14 08:41

thanks so much for working on this module, really appreciate you taking the time to do this.

 
daveman

Joined: 2009-10-09
Posts: 25
Posted: Mon, 2010-10-18 19:04

Any update on this module?

 
danneh3826
danneh3826's picture

Joined: 2007-08-18
Posts: 290
Posted: Wed, 2010-10-27 19:57

Hihi;
Sorry about the delay. Paid work takes priority unfortunately. Anyhoo, had a little bit of spare time so I thought I'd take a crack at this again. I've got a new version for those who want to try it. This has been tested on my server that hasn't got a later version of ffmpeg installed (svn rev 194xx) which doesn't support -codecs and all that other fancy stuff that 0.6 (svn rev 250xx) does.
get it here: http://www.danneh.org/files/transcode-5.zip
might help to completely remove the transcode directory beforehand, unzip into the modules dir, visit admin -> modules and "upgrade" if requested. make sure the path to ffmpeg is set fine in admin -> settings -> video transcoding, and give it a whirl.
it spits a *lot* of information into var/modules/transcode/log/transcode.log about what it's doing and any problems it incurs along the way. there's a debug script as well that's web-accessible for me to be able to see a handful of things/settings/stats if things don't work right. if you have problems, pass me the transcode.log file, and the url to your gallery and hopefully we can get this working once and for all :)

Dan