OK... i've read the issue queue and it seems like lots of folks are having problems with ffmpeg and some have requested an alternative or ability to upload pure flv files so the module isn't dependent on ffmpeg.

That sounds like good advice and i'll throw out another request.

Your module seems pretty cool. And i want to use it.

However, you provide no link to the ffmpeg site, either on your project page or in your tutorial. And you provide no ffmpeg install/config instructions either. Since your module is completely dependent on ffmpeg, it kind of makes it hard to use your module if the only way you can get going with it is to sign up for webhosting.

I'm purely developing on my localhost right now. So i'm not going to pay for hosting at this point and will probably be configuring my own server when going live versus using a host provider in the long run.

I googled for the ffmpeg site and as your tutorial states, that is probably the worst organized os page i've ever seen ;-)..

That leaves me scratching my head as to how to set the thing up so i can try and use your module?

Obviously ffmpeg is out of your domain so i don't expect that you should try to support it. Especially when the ffmpeg site itself isn't very great (which leads one to wonder how stable it is).

But it sounds like it's going to be a stumbling block for your module going forward if folks that want to use your module can't install ffmpeg locally or if it is unreliable.

I wonder if there are any alternatives to ffmpeg? I wonder if making your module default or at least offering pure flv playback an option. that way folks can convert locally on their own boxes before uploading. it nullifies the ability of the app to do that for users with many different file formats but maybe that's the best way for now until ffmpeg gets sorted out.

Anyway. If you have any suggestions i'm all ears cause i want to try the module. I'm just wanting to do it locally not on a webhost.

thanks

Comments

mfb’s picture

If you're running linux, freebsd, etc. you should try installing ffmpeg via your built-in package management tools. Any problems you find here will probably be shared by other folks using your particular OS.

There's lots of free software for video transcoding but as far as I know, most does rely on some ffmpeg code inside (from the gstreamer ffmpeg plugin to vlc)..

newdru’s picture

Unfortunately:

1) my development box is windows/wamp based

2) my targeted linux server will be centos 5 which doesn't have ffmpeg rpm/pkg support. it's going to have to be compiled from source.

thanks for the input though

mfb’s picture

I would suggest turning to support channels for your OS environment to figure out the best way to compile and install ffmpeg. I do know that you'll probably want to check ffmpeg directly out from svn, since they do not do releases very often. Also there are probably various compile options you need to enable to support proprietary codecs and such.

emdalton’s picture

I agree with newdru. I'm running drupal on Ubuntu (we own the server) and I don't see FFMPEG in the package manager. I also don't need to convert or resize the Flash files I want to embed. If this module has to remain entirely dependent on FFMPEG for any use, I don't think I'll be able to use it. I wish there were a way to use it without relying on FFMPEG for features I don't need.

mfb’s picture

On Ubuntu you'll need to turn on all the apt repository channels: universe, multiverse, restricted. There's a desktop gui to turn on the channels or you can edit /etc/apt/sources.list

Apparently due to patent issues ubuntu doesn't distribute a full version of ffmpeg, however. So you need to add a 3rd party repository e.g. deb http://medibuntu.sos-sts.com/repo/ feisty free non-free

See also http://ubuntuguide.org/wiki/Ubuntu:Feisty which has instructions on building your own ffmpeg.

cbutera’s picture

Here is a link to how I installed from source on Fedora:
http://drupal.org/node/131600

Maybe that might help a bit.

newdru’s picture

thanks for all of those who are posting install solutions on different platforms.. that's cool.

my eventual server looks to be a centOS 5 box so if anybody has any suggestions there that'd be great.

however right now i'm using plain old windows wamp on my localhost for site development. so if anybody has ffmpeg instructions for that that'd be great..

ALSO, I'D STILL LIKE A REPLY AS TO WHY NOT MAKE THIS MOUDLE WORK WITH NATIVE FLV FILES!!! THAT CAN'T BE THAT HARD (IN FACT IT'S GOT TO BE SIMPLER THAN MAKING IT WORK WITH FFMPEG)? any replies on that greatly welcomed.

thanks

vm’s picture

I think thats the "big" feature of this type of module. it will take a file and convert it so users don't have to do the conversion on their own.

if you want just to be able to add flash videos without conversion ? why not give flashnode.module a run for its money ?

travist’s picture

This module should work by just uploading an FLV file directly and it won't try to convert it with FFMPEG. Let me know if this doesn't work, because if it doesn't then I will need to fix that for my next release.

Thanks,

Travis.

emdalton’s picture

I switched to using swfobject_api instead, which does what I need with less fuss.

ore’s picture

I use ubuntu and just used this instructions.

apt-get install svn -- if you dont have it (might be subversion - cant remember off hand)

then:
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg

make sure you have downloaded lame and installed with "./configure prefix=/usr" as well before installing ffmpeg.

cd to that directory

./configure --enable-libmp3lame --prefix=/usr
make
make install

hope that helps.

ore

Then all should work fine.

cervante’s picture

Well, by typing "install ffmpeg on windows" turned this up as the first hit
http://www.salyens.com/mingw/

MPlayer (which also host the ffmpeg software) can do alot of the same things, but the develepor of the module would need to substitute MPlayer for ffmpeg, not sure he/she wants to do that.
http://www.mplayerhq.hu/design7/news.html

Gallery2 has a user submitted module for using MPlayer and support for ffmpeg is a standard module for that software.
Gallery2 will also auto thumb and play videos, and has a great intergration with Drupal.

I don't think MPlayer supports .flv creation though I could be wrong

doc2@drupalfr.org’s picture

Title: FFMPEG alternative or instructions » FFMPEG instructions for MacOS X
StatusFileSize
new28.92 KB

Hi there and thank you all for your commitment!

Is there anybody who has made flashvideo running ffmpeg with Mac OS X?

I'm running Drupal 5.1 localy, and I do have the same ffmpeg 'support' needs. Running on MacOS X doesn't make it simpler, apparently.

I've been advised to use ffmpegX for Mac OS X, for it would be its most suitable build. That was under the reserve that the distribution would be similar to the Unix-like ones. Which I have no idea about.

The package was found on the version tracker page of ffmpegX:
http://www.versiontracker.com/dyn/moreinfo/macosx/15473

But its Release Date is 2006-10-02... and it's the latest build for "Mac OS X 10.4 Intel"

After installing ffmpegX and entering the binary path as /Library/Application\ Support/ffmpegX/mpeg2enc, I get the downloads working but no transcoding. My crons, run manually, are successful.

Because transcoding does not seem to happen (my files/video remains empty, rights are given, no sign of any "drive that thinks"), my pages show:
http://arsene.richard.free.fr/ged/drupal_ffmpegX_flashvideo_sorry.png

Meanwhile the ffmeg database table shows that the commands "got in" the binary (I'm not familiar with Unix and commands):
http://arsene.richard.free.fr/ged/drupal_ffmpegX_flashvideo_database_com...

i.e.: After I get this:
" Command: /Library/Application\ Support/ffmpegX/mpeg2enc -i "/Volumes/cms hd/Web/drupal/files/7_Noces_352x288high.mov" -f flv -acodec mp3 -ar 22050 -ab 64k -ac 1 "/Volumes/cms hd/Web/drupal/files/video/7_Noces_352x288high.flv" "...

...the ffmpeg database screenshot shows that specific log
" Data:
Display aspect ratio codes:
1 - 1:1 pixels
2 - 4:3 display
3 - 16:9 display
4 - 2.21:1 display
"

Trying some alternatives that I believed could make it work, I tried to target other binaries, such as:
/Library/Application\ Support/ffmpegX/mpeg2enc.intel
/Library/Application\ Support/ffmpegX/mencoder
or even
/Applications/ffmpegX.app/Contents/MacOS/ffmpegX
/Applications/ffmpegX.app/Contents/Resources/ffmpeg
/Applications/ffmpegX.app/Contents/Resources/ffmpeg2

But then, the database logs won't show further than the "Data:" entry, witnessing that the commands would not "make it in". Was it nonsense to try that?

May I copy one of those binaries in an accessible folder, instead of leaving them in the MacOS .app package, so that it could be run? Should I go trying such "tricks"?

Or are there any better solutions I should try?

Would the ffmpeg-php alternative be useful to me? How to implement it?

I agree to share the results of my attempts, bit I'd prefer to offer you the successful ones!!! Please help!

doc2@drupalfr.org’s picture

Title: FFMPEG instructions for MacOS X » Getting Flashvideo to run localy with Mac OS X

Please read the previous post. I did actualy try to transcode to a .mov file format. Nothing more happened.

travist’s picture

Just to keep everyone up to date... I am currently working on a revision of the FlashVideo module. Once I test it on my personal website, I will post it here, and possibly create a BETA version for everyone to test. I have corrected some URL path problems that might be the cause for some strange issues. I am not saying that these have fixed all the problems mentioned above, but it certainly might.

Also, I have not received any word as to if the uploading of FLV files directly is broken. I thought that I had this working as of version 2.0, but if it is broken, then I will need to dig and figure out why and fix it.

Thanks for your patience everyone, but I am working very diligently on my spare time (which isn't much) to get all of these issues resolved.

Thanks,

Travis.

travist’s picture

Status: Active » Fixed

Please download the BETA version for 2.1 and let me know if this problem still persists. I have made some changes to where the FLV files should be able to be uploaded just fine. Please also note that you must run the cron in order for the video to be copied to the correct directory. Thanks!

newdru’s picture

Title: Getting Flashvideo to run localy with Mac OS X » Getting ffmpeg working with flashvideo on various platforms

i'm changing the title back to something more conducive to the thread topic. whoever changed the title of this post to specifically target MAC OSX was hijacking it imho to preference mac setups which is not the case if you look at the history of the thread

travist’s picture

Status: Fixed » Postponed (maintainer needs more info)
cervante’s picture

Here is a site that has a precompiled version of ffmpeg for windows and some good advice to boot.

http://www.paehl.com/open_source/?Convert_Tools:FFMPEG

Could save you some problems with ffmpeg

doc2@drupalfr.org’s picture

Alright, this Mac OS X "hijack" was my fault. It was just intended to redirect some potential Mac users to this threads temporarily. Newdru, Travist, people, please excuse me.

By the way, I still have no support for this Mac OS X case.

Travis, I run cron manually after each upload. I tried to upload and run cron again after updating Flashvideo to . I followed the whole tutorial carefully.

I guess that what I need is some ffmpeg support on Macs. Should I use ffmpegX, which latest release is 2006-10-02? or should I use a dev snapshot of ffmpeg? will this dev snapshot work on Mac OS X (which is derivated from Unix)? Where to put the directory? Will the default commands work for such releases?

As many questions exist for other platforms that may exist on Macs...

Thanks people!

Zoologie.de’s picture

Indicator that you have a problem with the lame library is, when you run cron from command line and the ffmpeg output at the end looks like this:
Output #0, flv, to'/pathtodrupal/files/movie.flv':
Stream #0.0: Video: flv, 320x240, 1.00 fps, q=2-31, 200 kb/s
Stream mapping: Stream #0.1 -> #0.0
Unsupported codec (id=0) for input stream #0.1

This means your audio mp3 encoding fell flat on it's nose and is bleeding

see then post #11 also on debian

the free non free debian multimedia depository didn't work on my debian, so it was compile from source time, which worked as post 11.

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg

make sure you have downloaded lame (http://lame.sourceforge.net/index.php) and installed with "./configure prefix=/usr" as well before installing ffmpeg.

cd to that directory

./configure --enable-libmp3lame --prefix=/usr
make
make install

Zoologie.de’s picture

ALSO, I'D STILL LIKE A REPLY AS TO WHY NOT MAKE THIS MOUDLE WORK WITH NATIVE FLV FILES!!! THAT CAN'T BE THAT HARD (IN FACT IT'S GOT TO BE SIMPLER THAN MAKING IT WORK WITH FFMPEG

Well you have a fantastic module like it is, that makes you more independent from other streaming services .. Like GooooooooTube and so on. User x has their videos in the various other windows formats, they don't want to start converting their videos for your site in most cases. So you lower the problems for the user to contribute to your site and not to the big sites that have it all. I have around 500.000 views on my videos over the various streaming services that's all lost as they make the money and not me...

What would be good for this module is to make it more look like Gootube et al so the GooTube user doesn't have to rethink..

MiheyFox’s picture

Hi,
can you send me your ffmpeg binary (linux)?

Regards, Mikhail.

tetramentis’s picture

you can try this one, but it may have limited support for video codecs. I'll add newer ffmpeg linux binaries (from the above mentioned SVN) soon.

MiheyFox’s picture

Thanks, but I have some problems with it.
I have shared hosting on FreeBSD 6.2.
and ffmpeg -formats - not returns anything.
I have libmp3lame.so.0 (394 187b) in same folder.
In php.ini I have
safe_mode_protected_env_vars LD_LIBRARY_PATH
so in my code:

if($exec_file=fopen('sites/default/files/ffmpeg/exec','w+')){
            	fwrite($exec_file,"export LD_LIBRARY_PATH=<full path to folder>sites/default/files/ffmpeg\n");
            	//fwrite($exec_file,"export LD_LIBRARY_PATH=sites/default/files/ffmpeg\n");
            	fwrite($exec_file,"echo \$LD_LIBRARY_PATH\n");
            	fwrite($exec_file,"whoami\n"); // show who am I
            	fwrite($exec_file,"set\n"); // show my env
            	
            	fwrite($exec_file,'$LD_LIBRARY_PATH/ffmpeg') . ' -formats\n');
            	//fwrite($exec_file,$command);
            	fclose($exec_file);
            	chmod('/home2/miliceru/mfoxspbru/www/sites/default/files/ffmpeg/exec',0775);
            };

$ffmpeg_data = shell_exec('sites/default/files/ffmpeg/exec');
drupal_set_message("ASS: <pre>".$ffmpeg_data."</pre>");
unlink('<full path to folder>sites/default/files/ffmpeg/exec');

But there is no list of formats in result message. :(
Please help.

tetramentis’s picture

those are linux binaries, they might not run on FreeBSD (depends on Linux binary compatibility settings of the target FreeBSD system). I didn't yet compile and upload FreeBSD-specific binaries.

I wonder what output you had after executing your code?

MiheyFox’s picture

ok. I'll be wait it.
In output I have:

* Command: sites/default/files/ffmpeg/ffmpeg -y -i "sites/default/files/200712242026_00045.avi" -vframes 1 -ss "00:00:02" -an -vcodec mjpeg -f rawvideo -s ""130x100"" "sites/default/files/flv/200712242026_00045.jpg"
* ASS:
I commented in "whoami" and "set" commands so in output I had:
sites/default/files/ffmpeg
there is no formats list.

* Command: sites/default/files/ffmpeg/ffmpeg -i "sites/default/files/200712242026_00045.avi" -f flv -acodec mp3 "sites/default/files/flv/200712242026_00045.flv"
* ASS:

* Cron ran successfully.

I uncommented string //fwrite($exec_file,$command); so in output I had Command: sites/default/files/ffmpeg/ffmpeg -i "sites/default/files/200712242026_00045.avi" -f flv -acodec mp3 "sites/default/files/flv/200712242026_00045.flv" but .flv file was not created.
If I change ffmpeg binary there is no lame support .flv file has been created but there is no audio. :(

Regards, Mikhail

tetramentis’s picture

If you have shell access (ssh, telnet) to the server, try running your commands and that generated script from the shell to see any errors generated - that may help more, as the output you provided doesn't seem to have any error messages at all.

I hope to get my hands onto FreeBSD 6.x within this week to compile binaries.

For no-audio with another ffmpeg binary - you could try "direct stream copy" option of ffmpeg, to preserve original audio stream in the converted video.

MiheyFox’s picture

No I have not shell access. :(
What do you mean then you wrote about "direct stream copy" option of ffmpeg, can you describe this option, please?
Thanks

tetramentis’s picture

I renewed linux ffmpeg binaries on the page mentioned above in my comment #24, and also added single _experimental_ freebsd binary (with no libmp3lame support). Why experimental: I'm cross-compiling on a Linux machine, and I'm not completely sure it'll work fine on freebsd.

As for the "direct stream copy", try if ffmpeg option -acodec copy works for you - it should copy audio from input file to output file without recompression.

Sample command line could be (in this example, a 1-minute fragment of the input file is copied into the output file):

ffmpeg -t 00:01:00 -i movie.avi -vcodec copy -acodec copy preview.avi

this info taken from here http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2005-June/000486.html , and found with the help of http://www.google.com/search?q=ffmpeg+direct+audio+stream+copy

MiheyFox’s picture

Hi, tetramentis
It's working!
Thanks!
You're best! :)

light-blue’s picture

Zoologie.de, that didn't work for me, but you helped me fix it! I wrote my notes here: http://www.travistidwell.com/node/5#comment-573

Also, to diagnose the issues, instead of running the cron.php file (I couldn't figure out how to get output from it), I ran the command at the command prompt and found the error you mentioned:

/usr/bin/ffmpeg -i 64_Fedex1.wmv -f flv -acodec libmp3lame -ar 22050 -ab 64k -ac 1 64_Fedex1.flv

dayokesola’s picture

i'm new on this ffmpeg stuff,
i use wamp and I'm trying to get to install ffmpeg
to much hassles!!!

bharanikumariyerphp’s picture

Where i paste this ffmpeg-php-0.5.2.1 folder.

rnelias’s picture

Just a very simple question:

How do I know if cron is actually calling the ffmpeg to convert the video?

I followed all the steps described in the tutorial and it seems that the module is doing nothing. So, I enabled the log for the ffmpeg and the ffmpeg_data table was created. After running the cron manually a zillion times my ffmpeg_data is completely empty which made me conclude that the module is simply doing nothing in my case.

I called the ffmpeg conversion command in a video uploaded and it seems that ffmpeg is able to do the conversion correctly.

Does anyone have any idea?

revmachine’s picture

Thanks travist

I Installed this module for Drupal 5.x under windows using XAMPP and also in Linux(Debian) and it worked great. It took a little effort to get ffmpeg working but was worth the time. I read through these posts and found some useful information. I'm posting what i found that helped me. Sorry if anything is a repeat.

windows
http://www.videohelp.com/tools/ffmpeg - got the ffmpeg binary here, created a directory for it, and entered it into the environment path.

linux(Debian)
http://www.howtoforge.com/video_streaming_lighttpd_flowplayer - pretty much followed these instructions exactly as printed and it all worked.

For both instances above, I was able to copy the commands from the log after running cron, then ran them from the command line as a test and they both worked.

I hope this helps.

n00bie’s picture

Hi revmachine,

Its good to know that someone got this to work for Drupal 5.x under windows using XAMPP because that is what I'm painstakingly trying to do since about a week now. But I haven't been able to figure out how to install ffmpeg.

You seem to have explained how to do so using a one liner - "http://www.videohelp.com/tools/ffmpeg - got the ffmpeg binary here, created a directory for it, and entered it into the environment path." But I'm a complete novice here and don't understand your instructions.

Would it be possible to provide a bit more explicit steps on how to get ffmpeg installed under windows using XAMPP?

attheshow’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)
neillodwyer’s picture

Here's a handy guide to installing ffmpeg on Ubuntu 9.04 Jaunty Jackalope:
http://ubuntuforums.org/showthread.php?t=786095