I've tried this on a local XAMPP install (got ffmpeg working - shows up in my phpinfo and works via command line). When I setup drupal+flashvideo however, it fails to run the conversion (or so I think because its not reporting any errors either).

I've followed a couple tutorials and tried several different configurations:
http://ironlasso.com/install_ffmpeg-php_windows.html
http://www.travistidwell.com/node/4
http://www.canarypromo.com/birdfeed/2008/05/31/ffmpeg-the-flashvideo-mod...

Using the tools at the bottom of this page:
FFMPEG & FLVTool for Window - http://www.iepak.com/30/topicdetail.aspx

I've now also purchased (and am waiting on a support ticket) with citrix host (recommended from travistidwell.com). I thought a linux enviornment would make this easier. Especially with FFmpeg already installed. However the same thing is happening. File uploads fine, but then conversion doesnt happen.

In the most basic form I've tried this (and get nothing back):
exec("/usr/local/bin/ffmpeg -i /home/xxxxxxxx/public_html/test/linetexture2.mov -f flv -acodec mp3 -ab 64 -ac 1 /home/xxxxxxxx/public_html/test/test.flv");

I realize in this second scenario its more likely a hosting issue than a problem with flashvideo, though I cant understand why flashvideo doesn't log it to the ffmpeg_data table even though "Log Conversion Data." is checked under flashvideo's module settings for ffmpeg.

Note, in all the scenarios above (while I'm testing) I'm running cron after each upload. I also have the option checked to have it try to convert it immediately. The flash player is working and just states "video not available".

I have a file sitting in video_import (default bulk conversion directory) which never seems to trigger.

I have my upload dir (file system confg) set to "files". videos are being uploaded, attached, and properly linked to under domain.com/files/

I setup post max size and all that in php.ini correctly.

ffmpeg dir for citrix hosting should be: usr/local/bin/ffmpeg (set in flashvideo settings).

"Output Directories reference from Drupal Root" is checked - original dir set to "files" and output dir set to "files/converted".

Proper folders are writable.

ffmpeg command on citrix host is "-i @input -f flv -acodec mp3 -ar 22050 -ab 64k -ac 1 @output". This worked on the command line version of Windows and is otherwise the default for flashvideo.

Comments

attheshow’s picture

Dear btmalon,

Something I've done on my own setup to test and see why Drupal can't run the conversion command successfully is to grab the ffmpeg command that's being run and try it in the devel module's (http://drupal.org/project/devel) "Execute PHP" block. Here's what I pasted into my "Execute PHP" block:

print shell_exec('"/usr/local/bin/ffmpeg -i /home/xxxxxxxx/public_html/test/linetexture2.mov -f flv -acodec mp3 -ab 64 -ac 1 /home/xxxxxxxx/public_html/test/test.flv" 2>&1');

You should see any errors printed out in a standard Drupal message if you follow this tip. I've also attached a screenshot to this comment so you can see better what I'm talking about. I hope this helps.

btmalon’s picture

I was able to get the conversion working from an exec command. However, there is another problem. I'm almost sure something is wrong with the pathing setup that I'm using. Attaching/uploading a file works fine, but yields no converted files.

Setup:
Drupal 6.6
Flashvideo 6.x-1.4 (just upgraded)
Linux (cirtex hosted server)

Global Settings:
checked: Enable the FlashVideo for this Node Type
checked: Change Node Status after Conversion.
checked: Convert videos immediately.
import dir: video_import
window mode: none
ffmpeg command: -i @input -ar 22050 -ab 32 -f flv -s 320×240 @output
ffmpeg thumbnail: -y -i @input -vframes 1 -ss @thumbtime -an -vcodec mjpeg -f rawvideo -s "@thumbsize" @output
ffmpeg path: usr/local/bin/ffmpeg
checked: Output Directories reference from Drupal Root.
original dir: files/original (writable)
output dir: files/converted (writable)
checked: Log Conversion Data

After running cron manually as well, sql tables are as follows...

files table:
fid:14 uid:1 filename:line3.mov filepath:files/line3.mov filemime:video/quicktime filesize:6035297 status:1 timestamp:1228900517
(status before I hit "save" on the node is 0, after is 1)

flashvideo table:
[empty]

ffmpeg_data table:
[empty]

file system path: files (writable)

i'm using a .mov file to be converted into a .flv - the same file converts via successfully via exec. I assume since ffmpeg_data is empty that it doesnt ever get that far.

using this on a script in the same dir as the mov file does a successful conversion which produces "video.flv" (which I have tested in a player and works):
exec("/usr/local/bin/ffmpeg -i line3.mov -ar 22050 -ab 32 -f flv -s 320×240 video.flv");

If anyone is willing to help troubleshoot or have ideas on configuration changes, please let me know.

btmalon’s picture

Still not able to get this working. Willing to pay someone to help out... Let me know how to contact you if so.

travist’s picture

btmalon,

It really seems that the FlashVideo is not even triggering for this node type. Are you sure you have it enabled in the Flashvideo settings (I know that is a stupid question, but I need to cover all my bases here). I might have some time later this week to debug for you. Just contact me on my personal email, and we can set something up.

Thanks,

Travis.

tbrix’s picture

It seems I have the exact same problem on cirtexhosting as well. If I manually put a video in the import folder and run cron, then the video .avi is moved from the video_import to files folder. But is not converted....

If I run the coneverter via php shell_exec() like this:

define('FFMPEG_LIBRARY', '/usr/local/bin/ffmpeg');
$exec_string = FFMPEG_LIBRARY.' -i sites/default/files/test.avi -f flv -acodec mp3 -ar 22050 -ab 64k -ac 1 sites/default/files/test.flv';
echo(shell_exec($exec_string)); //where exxc is the command used to execute shell command in php

I get an 0 kb test.flv file.

btmalon did you solve this?

Hope somenone can assist me.

/Thomas

btmalon’s picture

It ended up being a conflict with the FCKeditor module. It was rewriting the global config textarea boxes (for things like mime type) when I hit save. It added in a beginning and ending paragraph tag. When flash video went to process, it was exploding it all wrong because of those. Setting up an exclude path in this area: http://domain.com/admin/settings/fckeditor/editg ("Paths to exclude/include:") fixed it.

The path I used is: */flashvideo/*

This should work for you too if its the same issue. Considering how common FCKeditor is, I'm shocked it never came up before.

btmalon’s picture

Also note, you'll need to get the original paths back they way they were (tricky if you dont know what their orginal formatting looked like). They are (in order):

[avi, video/avi, 0]
[mpeg, video/quicktime, 0]
[mpg, video/quicktime, 0]
[mov, video/quicktime, 0]
[rm, application/vnd.rn-realmedia, 0]
[flv, flv-application/octet-stream, flash]
[playlist, 0, flash]
[wmv, video/x-ms-wmv, 0]
[3gp, video/3gpp, 0]
[mp4, video/mp4, 0]
[dir, application/x-director, 0]
[dcr, application/x-director, 0]
[ogg, application/ogg, 0]
[youtube, 0, youtube]
[googlevideo, 0, googlevideo]
[brightcove, 0, brightcove]

And

flv-application/octet-stream
application/octet-stream
application/x-flash-video
video/x-flv

Worst case, do a dummy install of drupal/flashvideo locally (or anywhere) and grab them. There's probably a better way, but its an option :)

darraghp’s picture

Hooray for btmalon. Removing the paragraph tags and updating the mime type text boxes as above worked for me. You ended 3 days of beating my head off a brick wall.

attheshow’s picture

Status: Active » Closed (fixed)