Download & Extend

FlashVideo and FileField Paths Integration

Project:FlashVideo
Version:6.x-1.5
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Issue tags:CCK, cck filefield, filepath, FlashVideo, output, output directory, user directory

Issue Summary

first, i would like to say thanks for this great module. but i am having a little trouble. i have viewed the tutorial and checked open and closed issues but i can't find a solution. i have created a site where media uploads to user's individual directories and i'm trying to include video. i have flashvideo integrated with cck. i have created the 3 required cck fields, one for the raw video, one for the converted video, and one for the thumbnail. each one has the path setting of the userfolder, and each field type is "file" and each widget type is "upload". the flashvideo settings are all properly designated to the proper cck fields. when i upload a video, the raw video uploads to its proper designation, but the thumbnail and the .flv file is created in the /files directory. is there something wrong with my settings or is it even possible? do i need to be using, for example, "flashvideo_output_dir" to specify the directory, if so where do i specify it. thank you in advance and i apologized if this question has been already answered or if i'm missing something obvious.

Comments

#1

I don't believe you are missing anything overly obvious because I too have set up a video content type with fields as you have described and wondered why flashvideo didn't respect the paths I gave them, but I guess it simply works from the ones you set within the flashvideo module itself. Is there anything we're both missing here? I too would like to be able to use for example files/video/username/output/ as my file structure for the converted flvs and thumbs.

#2

Hey guys,

I spent some time looking into this issue and realized that the FlashVideo CCK module just was not working. I have since then fixed it and checked it in. I am sure Mark will issue the next beta for you guys to check it out.

Thanks.

Travis.

#3

Version:6.x-1.x-dev» 6.x-1.5-beta2
Status:active» fixed

This fix is in 1.5-beta2 from yesterday's code sprint.

#4

Status:fixed» active

thank you for the update, but i seem to still be having the same problem, the output flv and the thumb is still being created in the /files directory and not in the directory i specified in the path setting of my cck fields. i downloaded the 6.x-1.5-beta2 version and i am using it along side with FileField version 6.x-3.0-alpha7. and also, this time the original video disappears (although the folder is created), and i do not have " Delete Original Video" selected. any ideas? i appreciate your help and hard work.

#5

Yes I have also tested with the latest flashvideo and filefield and get similar results to above. However, the original video does get uploaded correctly for me and also the output flv and jpg gets created but in files/ and not in the path according to my CCK settings. However, NOW the video doesn't even work at all, in that nothing gets displayed when viewing the node, even though it is getting converted fine with the message:-

* FlashVideo successfully created: wmv-test_74.jpg
* FlashVideo successfully created: wmv-test_74.flv
* Video testwmv has been created.

So I don't know what to suggest. I've taken a look into the db and the filefield paths seem fine, and also the node refs in the flashvideo table seem to correspond correctly.

One thing, I have still got my Player.swf in the files/Player.swf and not anywhere else. Is this now where flashvideo looks when it comes to playing the videos. I ask this because it states in the flashvideo settings that Player.swf needs to be in the output directory, which of course now could depend on a moving target using CCK with username tokens etc.

#6

Component:Miscellaneous» Code
Category:support request» bug report

No matter what I try I can't get flashvideo to work as outlined above.

#7

Neil,

I will spend some time this weekend to try and debug this issue some more. I thought that I had it working before I left DrupalCon, but I could be wrong.

Thanks,

Travis.

#8

Thanks Travis, really appreciated, this is a great module!

#9

I just wanted to update on my troubleshooting attempts. I'm afraid I made an error with the video template, and in fact the videos do show up when I have the correct template in place. Sorry about that.

So, as I see it, the current problem is a case of this module apparently still ignoring the path settings for the output cck fields, and no matter what I set them to they end up being put directly into sites/default/files/example.jpg and sites/default/files/example.flv.

However, the Output Directory setting within the flashvideo module FFMPEG settings still works fine as before. I'm guessing I need to make this blank for cck to take over? Which one is meant to have priority in any case?

#10

Any luck in getting this sorted out Travis?

#11

Hi, what is the news?

Thanks

#12

Version:6.x-1.5-beta2» 6.x-1.x-dev
Assigned to:Anonymous» attheshow
Status:active» fixed

Just checked in a fix for this. The setup that chelseadrive initially outlined was configured using the Token module (user token). Flashvideo will now use those tokens for the output files in addition to the initial file that is uploaded.

#13

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

#14

Hello, many thanks for this great module!!! Also your tutorials and videos are very helpful...

I know this post is a bit old..but I was wondering if anyone could clarify what is the fix for this because I am using I am using your 6.x-1.5 and I currently have the same setup and issue mention above by chelseadrive.

Essentially, after conversion, the flv and jpg files are placed under the root of the "files" folder even though the CCK filefieldpath for the flashvideo is set to the user's directory (e.g. files/videos/userid using tokens).

I set the path for the flashvideo CCK field using node tokens as per filefield paths module. Also, I left the output directory blank before I enabled Use the CCK FileField module for uploads.

The only way I have found that the flv and jpeg go to the user's directory is when I use the parameter flashvideo_output_dir on node creation. However, users can set this to anything so I can't really use this, unless there is a way to set the default using tokens and then hide it?

I am currently using: FlashVideo 6.x-1.5, CCK 6.x-2.6, FileField 6.x-3.2, and FileField Paths 6.x-1.3

Thanks,

-KH

#15

Status:closed (fixed)» active

setting to active

#16

The ffmpeg conversion is working with the CCK field upload. The upload in the form places the video into the proper folder and then ffmpeg converts them to flv and jpeg into the converted_video folder.
/sites/default/files/upload_video
/sites/default/files/converted_video
/sites/default/files/import_video

When I view the page source the flashvideo object is looking at the following.
/system/files/player.swf << this is where it should be?!
/system/files/upload_video/ << this is not consistent with cck & fileupload

It is obvious that I have a bad setting somewhere or the assumptions within flashvideo are incongruent with cck & fileupload which expects to be dealing with sites/default/files with specified subdirectories.

I know that this not the exact issue reported here but thought it might be related. I hope this helps to clear up what we are seeing. If I have missed a setting somewhere please let me know.

#17

An update on my progress here. I manually moved the converted videos to the folder /system/files/upload_video with no success. The player was no longer a white square. It was black with controls but complained of not finding a video in a folder named converted_video. So I changed the name of the folder to converted_video. I now have the player working and the thumbnail working, but only after a physical move.

The issue is now for me, where do I set the player to look into /sites/default/files as the root for the CCK fields? It could be the same concern as putting the files under the user's area as mentioned here.

#18

Status:active» postponed (maintainer needs more info)

I think the first thing that I need to do here is replicate the issue. One thing that would help is for you to send me some screen shots of the configuration that you are using. This will at least give me the ability to try and set the same parameters in my local host and try to replicate. Once I am able to replicate your issue, I can then fix the problem for good.

Thanks,

Travis.

#19

Travis,

Thanks for your kind offer. Attached please find a tar.gz with png images of the settings. Let me know if there are others you might need.

Sincerely,
Chris

AttachmentSize
Flash Video Settings.tar_.gz 180.47 KB

#20

Try this.... try setting the output directory to blank for the original video. I am thinking that it might not like having an output directory for the original video when using the CCK fields, but I could be wrong. If this works, then let me know as I might have a fix for it.

Thanks,

Travis.

#21

I am not sure that the change you want me to try will touch the issue here. When I have a problem that I cannot get my hands around I just go to my browser and look at the view page source on the page in question. Below is the resulting code from the current settings without any change. If you will notice the code is expecting all of the images and video that was converted to be in the root/system/files/converted_video directory. Just past the location of the player (i.e. root/system/files/player.swf). As mentioned above the filefield module in use with the CCK module is expecting all directory paths to be in the root/sites/default/files folder.

It is late for me therefore I will make the change in the (my) morning and test as you have requested, to make sure that I am not missing something in your suggested change. I will post that code here just after that change along with the results.

<div class="art-article"><div id="video-player" align="center">
  <object id="flashvideo" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="450" height="337" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">
  <param name="movie" value="http://xxx.xxxxxx.xxx/system/files/player.swf" />
  <param name="FlashVars" value="file=http://xxx.xxxxxx.xxx/system/files/converted_video/Movie1_57.flv&image=http://xxx.xxxxxx.xxx/system/files/converted_video/Movie1_57.jpg&rotatetime=&autostart=true" />
  <param name="quality" value="high" />
  <param name="wmode" value="window" />
  <param name="allowfullscreen" value="true" />    <embed name="flashvideo" allowScriptAccess="always" src="http://xxx.xxxxxx.xxx/system/files/player.swf"
    width="450"
    height="337"
    border="0"
    type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"
    wmode="window"
    allowfullscreen="true"    quality="high"
    flashvars="file=http://xxx.xxxxxx.xxx/system/files/converted_video/Movie1_57.flv&image=http://xxx.xxxxxx.xxx/system/files/converted_video/Movie1_57.jpg&rotatetime=&autostart=true" />

  </embed>
</object>      </div>

I want to thank you again for your attention to this issue.

#22

Travis,

I removed (made blank) the path entry for the CCK / filefield entry in the field maintenance of my flash content type.
To be consistent I did the same with the jpeg image CCK / filefield. ffmeg works perfectly and the resulting images and flv videos are located in the root/site/default/files directory. This is consistent with the instructional comments from CCK / filefield module shown under the two fields I just made blank.

Attached are images of those changes. Below is the text of the code from the page view source gathered by from browser after the changes above were made. Please note that the page code still expects the resulting image and flv video to be in root/system/files and the CCK / filefield only works in and above root/sites/default/files.

I could change the way ffmeg might place those converted files but would the FlashVideo module then be able to manage files (delete them) from the remove capability of CCK / filefield ? The ffmpeg might place them so the player could use them but the removal of content from a node might not be able to locate the ffmpeg generated files due to the fact that the attachments held by CCK / filefield would be expected in another location at the site. I believe that might be a goal of the module. I know that that does not work currently but it might also be due to the fact that my installation is not working anyway.

Changing the way CCK / filefield modules work might be one idea. Additional information stored for the use of FlashVideo module might also be another way to go. Perhaps a root field for use by FlashVideo module that could overide the requirement of CCK / filefield being located in the root/sites/default/files to being located in the root/system/files. Even the selection of the CCK checkbox located in the universal settings for FlashVideo could activate code to remedy this.

Don't know enough about your module, the CCK module or the filefield module to presume that my suggestions are valid. I do have over 30 years of experience with hardware and software that I tend to compartmentalize into a strong intuition about systems.

<div class="art-article"><div id="video-player" align="center">
  <object id="flashvideo" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="450" height="337" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">
  <param name="movie" value="http://xxx.xxxxxx.xxx/system/files/player.swf" />
  <param name="FlashVars" value="file=http://xxx.xxxxxx.xxx/system/files/converted_video/Movie1_57.flv&image=http://xxx.xxxxxx.xxx/system/files/converted_video/Movie1_57.jpg&rotatetime=&autostart=true" />
  <param name="quality" value="high" />

  <param name="wmode" value="window" />
  <param name="allowfullscreen" value="true" />    <embed name="flashvideo" allowScriptAccess="always" src="http://xxx.xxxxxx.xxx/system/files/player.swf"
    width="450"
    height="337"
    border="0"
    type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"
    wmode="window"
    allowfullscreen="true"    quality="high"
    flashvars="file=http://xxx.xxxxxx.xxx/system/files/converted_video/Movie1_57.flv&image=http://xxx.xxxxxx.xxx/system/files/converted_video/Movie1_57.jpg&rotatetime=&autostart=true" />
  </embed>
</object>      </div>

We are looking forward to resolving this issue as I am sure you are. Thanks so much for your kind attention. Please let me know if I can be of any assistance in providing additional info you may need.

AttachmentSize
Flash Video Settings - change request - 20100103 .tar_.gz 50.46 KB

#23

Just wanted to add here a small point of clarification. A portion of the section of code above reads as....

  <param name="FlashVars" value="file=http://xxx.xxxxxx.xxx/system/files/converted_video/Movie1_57.flv&image=http://xxx.xxxxxx.xxx/system/files/converted_video/Movie1_57.jpg&rotatetime=&autostart=true" />

should read in my meager opinion as...

  <param name="FlashVars" value="file=http://xxx.xxxxxx.xxx/sites/default/files/converted_video/Movie1_57.flv&image=http://xxx.xxxxxx.xxx/sites/default/files/converted_video/Movie1_57.jpg&rotatetime=&autostart=true" />

The operative difference between these two is root/system/files/converted_video/ and root/sites/default/files/converted_video/.

I was not sure if this difference was as evident as it should have been so I have emphasized it here. Of course it goes on to be more than that one quote above. I think it is repeated at least once due to my selection of additional support MS IE.

#24

Issue tags:+CCK

Hello Travis,

Attached find the screenshots with my current settings for flashvideo. Essentially, I am using the Flashvideo CCK plugin to allow users to upload videos to their blog. My file system path is set to a folder named "uploads."

CCK filepath settings:

Raw video (I named it Upload Videos): uploads/blog/[author-id]/videos --OK

Converted video (Flash Video): uploads/blog/[author-id]/videos -->Does not work, goes to uploads/

Thumbnail (Video Thumnail): uploads/blog/[author-id]/videos -->Does not work goes to uploads/

Everything else works for me, including converting, thumbnail generation, viewing the player, playing the flashvideo, etc.

Thanks!

KH

#25

Oops! attaching screenshots...

AttachmentSize
390212_flashvideo_userdir_cck.zip 347.76 KB

#26

KH,

Thanks for the info. I am going to look thru your setup. I am sure it will provide a great deal of insight on how to correct my setup. I do have one question does the removal of an uploaded video also remove the CCK entries and files resulting from the conversion to flv and jpeg? My files table was strife with entries that had been removed during testing. I now believe that was part of my issue!

I look forward to getting this to work and again appreciate your effort and content.

cperg

#27

I am missing a good bit of control fields on my content type edit form. Under workflow I have only the three: Default Options, Multilingual Support and Attachments. Obviously I have missed some critical modules or other settings. The Upload Path Settings group is not available. What should I have set or installed for these options to be present on my content type edit form?

Sincerely,
Chris

#28

In addition to the issues surrounding FlashPlayer we have found a couple of issues with a few other modules creating PHP errors relating to the database. I am sure most sites are tied to the MySQL database. We have a very strong need to have only PGSQL. I am thinking that perhaps our trouble is database related. I have a contractor now working on the determination of this.

#29

Issue tags:+cck filefield, +filepath

Unfortunately, I still can't get the converted flashvideo and thumbnail to go to the right directory (the one set by CCK). They are still going to the root of the "files" folder.

#30

Hey cperg,

I noticed that you are using Private file system? Hence the "system/files/...." file paths from the code you added earlier. When you navigate to those files, do you see them in the browser? I have had some issues with Private file systems in the past, so unless it is absolutely necessary you have them set to private, you might test them without Private file system enabled and see if you can get it to work... It is much easier to start with a configuration that works, and then slowly enable the features you want ( that might break it ) instead of trying to debug why it isn't working to begin with.

Also, you might try loading up the application called "Charles", which is a web debugging proxy, and let me know if that tells you if any errors are occurring with the player trying to read the private files. That might very well be your issue as well.

Please let me know if this was helpful.

Thanks,

Travis.

#31

Hello Travis,

I'm in crunch time to get this resolved and would greatly appreciate any help as soon as possible. My issue is different than cperg's, since I am using a public file system and everything else works ok, except the converted flashvideo and thumbnail are not going to the user directory, instead they both go to the root of the files folder.

For background, I am re-posting my issue from #14, #24, #25, and #29 below.

Issue:
The converted flashvideo and the thumbnail files are placed under the root of the "files" folder (mine is called uploads) even though the CCK filefieldpath for the flashvideo and for the thumbnail are set to the user's directory (e.g. uploads/blog/[author-uid]/videos).

It only works if...I use the parameter flashvideo_output_dir (on the node edit form), set it to user's directory, and convert videos immediately. However, users can set this to anything so I can't really use this :(

Attached find the screenshots with my current settings for flashvideo, see an overview of my current settings below.

CCK filepath settings:

Raw video (I named it Upload Videos): uploads/blog/[author-id]/videos --OK

Converted video (Flash Video): uploads/blog/[author-id]/videos -->Does not work, goes to uploads/

Thumbnail (Video Thumnail): uploads/blog/[author-id]/videos -->Does not work, goes to uploads/

Flashvideo Settings:

Output directory: is currently blank (I left it blank before I enabled the "CCK FileField module for uploads" setting).

Thanks!

KH

AttachmentSize
390212 flash video and thumbnail dont go to user directory 347.76 KB

#32

3dloco,

Thanks for consolidating all your previous posts into one. This saves me time from scanning up the issue queue. I would like to figure out what is going on with your situation, but honestly, it would probably be MUCH faster for me to just dive into your server and get it resolved rather than try to replicate it here. Since you are on a time crunch, this may be an option. Would you be willing to give me access to resolve this on a live server? If so, then contact me using my contact form and I can try and work out an expedited feature fix for you for an hourly fee. If you are unable to pay for this to be expedited, then I can still fix it for free, but it probably will not be in the "crunch" timeframe that you desire. Even still, it would be helpful to debug this on your server, so please let me know if you are willing to let me do that and this will get fixed much more quickly than if I tried to replicate on my local server.

Thanks,

Travis.

#33

Hello Travis,

I really appreciate your help and kind offer to dive into the server to help me resolve this issue! However, due to confidentiality server access option is not feasible.

After some more tests and digging around (see #646334: Some advice to improve the flashvideo project.), looks like this issue is due to the flashvideo not working with the filefield_paths module settings. Is filefield_paths currently supported?

To save time replicating this issue,

1) Use FlashVideo 6.x-1.5, CCK 6.x-2.6, FileField 6.x-3.2, and FileField Paths 6.x-1.3 http://drupal.org/project/filefield_paths.

2) Set the filefield path for the uploaded video, flashvideo and thumbnail using user tokens (either [author-uid] or [user-id]).

Thanks!

KH

#34

Hello Travis,

Any news...were you able to reproduce?

Thanks!

KH

#35

Hello Travis,

Just checking to see if you were able to reproduce....and whether flashvideo is compatible with filefield_paths...

Thanks,

KH

#36

With some paid help and afew more hours spent I have come to some conclusions concerning certain settings that I was not aware of root/admin/settings/file-system in my presvious posts was set to system/files. This set the operating player object code to look for the converted files to be in root/system/files. Once I had that corrected most of the player issues resolved.

I have located another issue that could be code related. It is the reason that no play list is possible on my flashvideo installation. After ffmpeg runs the converted flv and jpg are there in the correct folders as I set in the fields, but only the first entry of the upload is showing in the tables. The movies get converted but the records pointing to the converted files are just not in the database.

When I point to [video: index=1] it can't see the converted video on the server because the record needed to tell the php code that the file is there but the record is not. Please see the png file attached. I have more information from this but wanted to wait for questions if this of interest.

AttachmentSize
20100115 DB issuesCapture.PNG 183.28 KB

#37

cperg,

I think that is a bug in the Filefield plugin where it is not setting the video_index parameter in the FlashVideo table correctly. The FlashVideo module uses this index to find the right file when you use [video:index=1]. I will take a look at the code and see if anything is obvious. If not, then this might have to wait for Mark Jarrel to take a look since he implemented the FileField plugin.

Thanks,

Travis.

#38

One more point, while they are looking at the records that were not inserted. Please look closely at the files table. All of the uploaded files should be in root/sites/default/files since the path on the upload CCK field is blank as per your suggestion earlier. All of the uploaded avi files were given the path of root/sites/default/files/upload_files in the files table.

AttachmentSize
20100115 DB issuesCapture focus on incorrect path.PNG 21.7 KB

#39

Hello Travis,

I will like to follow up with you regarding my postings #31 and #33 (flashvideo+filefield_paths)...

As I mentioned to you previously, access to the server is not available and unfortunately, I do not have the budget to pay you for this.

In light of this, I would like to find out from you:
1) If you are working on this issue.
2) If yes, then a timeline of when you would be able to complete it, given the fact that you probably have other projects you are working on.

If not, then please let me know so that I don’t wait endlessly in limbo.

Thanks,

KH

#40

3dloco,

As of the current moment, I am not working on this issue. I am currently knee deep in another project that I must get squared away before I can tackle this issue. I will also soon be porting this module to Drupal 7 which might take some significant effort ( not quite sure on that one yet ).

So, as for a timeline, I am thinking that the next possible moment that I will have to get this squared away is about a month from now. I hope this answers your questions.

Thanks,

Travis.

#41

Here is a posting of the errors generated after "uploading" a 2nd video. These errors are only after a second video is updated and the record is saved. It seems to me that they are pointing to the issue surronding why the relation records are not in the table to point to more than one movie.

The movies are being converted to flv and jpg.
They are also being placed in the correct folders at the site.
Any "first" uploaded video on a movie (flashvideo) type node is completely visible.
The first uploaded video only has the rename warning error.
I use the [video:index=1] and no video.
The tag [video:index=0] works great.
The information is true for the thumbnail tag as well.

The Warning rename is irritating but I am not sure if it is another problem not completely related to this. I would just not consider that warning as a problem right now since it is showing after every upload and save. It does not affect the outcome on that first uploaded video.

I hope that this additional information might help to locate the trouble.

AttachmentSize
20100128 DB issues warnings and errors.PNG 38.23 KB

#42

Hello Travis,

Just checking if you have been able to work on supporting filefield_sources, and if so do you have news?

Thanks,

KH

#43

i think FlashVideo doesnt not support FileField Paths.
i am importing hundreds of video an want sort them with FileField Paths for example with [nid] other tokens in subdirs.

it would be nice to work on FileField Paths support.
as a simple workaround you can use
- Retroactive update
- Active updating
on the CCK field, which will move files later.

#44

Hello Haehnchen,

First of all I want to really thank you for posting this work around. Your solution is great and works for me and I can now have both the converted flashvideo and thumbnail on the user’s directory.

The only issue I notice is that I get this error message when saving/publishing a node:

The selected file /var/www/…/httpdocs could not be copied.

I suspect that this may happen because I am “converting videos immediately” after save/publishing the node instead of converting them during cron. However, I’m not sure. It could very well be another module or the filefield_paths itself.

Therefore, it would be most helpful if you can confirm whether you are getting this same error and if so if you have found a way around it.

Thanks again!

KH

#45

This post has more info on flashvideo + filefield paths #713372: filefield paths breaks flashvideo storage paths

#46

Subscribing.

#47

+1

#48

filefield_paths work with original video field "with token"

don't work with thumbnail field and finished video field :/

#49

Subscribing.

#50

Version:6.x-1.x-dev» 6.x-1.5
Assigned to:attheshow» Anonymous
Status:postponed (maintainer needs more info)» active

hey travist
this is a great module
so you have to solve a compability issue with filefield path module
n that could make this module more flexible than ever..

i am using flashvideo 6.x-1.5 , FileField 6.x-3.7 , FileField Paths 6.x-1.4

myCCK filepath settings:

Original video : files/video/[author-id] --> works fine ( Original video goes to " files/video/[author-id] ")

Converted video : files/video/[author-id] --> Does not work, ( Converted video goes to " files/ ")

Thumbnail : files/video/[author-id] --> Does not work, ( Thumbnail goes to " files/ ")

so solve this critical problem...

#51

Priority:normal» critical

flashvideo 6.x-1.5

flashvideo.module file at the line 1016
i found this , which look like a FileField Paths related codes..

$field = content_fields($field_name, $node_type); // Get array of info about the field.
$filefield_path = $field['widget']['file_path']; // Get the specific file path that was set for the field.
// If they have Token module installed, search the $filefield_path for tokens and get them replaced.
if (module_exists('token')) {
$filefield_path = token_replace($filefield_path, 'user', $account);
}
$output_directory = file_directory_path() .'/'. $filefield_path;
file_check_directory($output_directory, TRUE);
$newfile->filepath = file_directory_path() .'/'. $filefield_path .'/'. $newfile->filename;

#52

Title:flashvideo and user directories using cck. is it possible?» FlashVideo and FileField Paths Integration
nobody click here