Hello,

I am converting flash videos locally (via manual ffmpeg execution) so as to save time by uploading the (much smaller) flv video and its thumbnail rather than the original mpeg.

How do I make flashvideo play existing flvs? I can't even get it to play a simple flv I upload. Uploading an mpeg and letting cron convert it works so the settings are right.

Thanks in advance,
Fanis

Comments

travist’s picture

You just upload the FLV file as if you would any other video file.... I just tested it and it should work. Note: You will still need to make sure that you run the cron cycle.

Thanks,

Travis.

nexxer’s picture

Thanks for the quick reply.

I ran cron without issues (no problems in log), the new flv appears in the database in flashvideo and files properly, however it still displays the "Video currently not available" image. Is there something else I'm missing?

Fanis

hannesk’s picture

hi nexxer,
i've run into the same problem, so maybe my solution could also work for you:

in file flashvideo.module find this line (around 1128):
if(!$create_thumbnail && $extension == 'flv') {
and change it to:
if(!$create_thumbnail && $extension == 'dlv') {

also find this line (around 1169):
$ffmpeg_data = shell_exec($command);
and replace it with:
if (!$create_thumbnail && $extension == 'flv') {
rename($filepath, $output_path);
} else {
$ffmpeg_data = shell_exec($command); // Execute the command.
}

this solved my problem, maybe it can help you also.

and hi travist,
thank you very much for this nice module and the great work.

Best Regards
Hannes

mbria’s picture

Category: support » bug

Same issue when uploading FLVs.

Module is unable to rename a file to the initial name:

warning: rename(/var/www/web3/web/files/16_busy.flv,/var/www/web3/web/files/video/original/16_busy.flv) [function.rename]: No such file or directory in /var/www/web3/web/sites/all/modules/flashvideo/flashvideo.module on line 1173.

Seams obvius that a avoid an unusefull rename will fix the issue so looks like hannesk solution will work.

Back in 10 minutes with feedback...

mbria’s picture

Category: bug » support

Read the warning. Could I be more stupid?

Rename is perfectly working... what fails is my brain, so forget comment #4.

Sorry for the noise. Back to "support request" status.

travist’s picture

I am trying to figure out the problem here... You guys can't get already converted videos to be able to be uploaded. This should be working. I am interested what is different from your configuration than with mine. Feel free to email me and maybe we can work through this...

Thanks,

Travis.

aznboy’s picture

I don't think there is an issue here...just send the video to your import folder and run cron and your good as gold...use pathauto to change url...I think that's what this thread was about

nexxer’s picture

This is how I'm trying this:

1) Create content --> Video (a type I have Flashvideo enabled for)
2) Attach new file: I attach an existing working .flv from my local system
3) Add a title, select categories, set body to [video] (input format = Full HTML but tried with the others too)
4) Hit Submit and I get this:

* Created new alias videos/testvid for node/743
* Your Video has been created.

Logs show "video: added Testvid."

5) Run cron.php, get no errors, and logs show "Cron run completed."
6) Go back to the video page, refresh, get the "Video currently not available" image.

Am I doing something wrong?

travist’s picture

Are you using any path altering... such as Locale Module, or Private downloads? The FlashVideo should work for all path altering situations, but there might be something that is messing it up.

Let me know... Travis.

nexxer’s picture

I am using the Locale and Pathauto modules. I'm not sure how Locale would affect flv.. please advise.

Fanis

travist’s picture

Locale actually will change the path by adding your language setting to the path, like www.example.com/en for English. There might be a bug in FlashVideo module where its paths are not correct for this example. I will do some testing before I release the next version and see if I can fix this issue.

Try this... Just to test my theory, disable the Locale module and see if FlashVideo works... it it does then I know that is the issue.

Thanks,

Travis.

nexxer’s picture

I'll do so later today, but the way I have Locale setup it doesn't add the language code in the path. Each node of mine has a unique name, regardless of language.

I have http://localhost/some-title and http://localhost/translated-title

Fanis

The AL’s picture

This is literally the series of steps I went through, and for me it works fine. The problem for me is that it only works in FF and Safari. In IE7, the video block appears, and the audio plays, but the flash itself is just a white square with no interface.

dsnydernc’s picture

Agreed - this is an issue with the module attempting to rename the FLV file. Thanks for the tip Hannesk, this minor change has solved the problem for me.

travist’s picture

Status: Active » Closed (fixed)

I don't understand the issue here.... I also don't understand the change that Hannesk made to the module. In fact I think it is just a coincidence that his situation was even fixed from that change. I am changing the status of this to closed since I have tested uploading existing FLV files and it works just fine.

yan’s picture

I had the exact same problem:

1) I uploaded a flv file
2) I saved the node
3) I ran cron
4) I just got the "Video currently not available" image

Doing the changes hannesk suggested in #3 did the trick for me. But I didn't really understand what went wrong. I then read the troubleshooting pages on travist's site, where it says:

The next thing that could cause this is if the Mimetype (found in the files table) of that video is something that is not recognized by the FlashVideo module. You can actually see the list of valid mimetypes that the FlashVideo module will look for by just going to the FlashVideo Settings and under Global Settings you will see a text box called Flash Mime Types. If you do not see the same Mime type as you see in your database representing the converted video, then all you will need to do to fix your problem is to just add that mime type to this text box.

I found out that this was the problem: The mime header isn't set correctly (i.e. to one of the types supported by default) without hannesk's suggested changes. Without changing anything in flashvideo.module, the mime header in the "files" table is set to "video/x-flv". When I do what hannesk suggests, it is "flv-application/octet-stream". The first version doesn't work, the second does.

When I add "video/x-flv" to the Flash Mime Types under Global Settings, the problem disappears. Shouldn't there be more mime types by default then since there are no problems playing them once they're in the list?

travist’s picture

I will add video/x-flv to the list of mimetimes in the next version. Hopefully this will close this issue.

Thanks for looking into this for me yan!

ardee-1’s picture

Status: Closed (fixed) » Active

I had a similar problem that cost me several days. When I upload existing FLVs, the mimetype is "video/flv", which is also not recognized by this module. If I add that type, all is fine. So I have two questions:

1) Why are the videos that I upload being given mimetype "video/flv" in the files table?

2) In case this might bite somebody else, can you add video/flv as one of the default types handled?

Thanks!

travist’s picture

Status: Active » Closed (fixed)