How I Got Here:

I believe I have everything set up properly:

  1. FFMPEG is working correctly -- when videos are uploaded, they are moved from the original upload directory into a folder specified as that which should contain the original. Thumbnails and .FLV files are being generated in the directory I specified in FFMPEG settings, so everything seems to be functioning as it should.

    The settings of my CCK Filefields are as follows:
    • Label: Video Upload, name: field_video_upload, type: file upload, path: video_post_import
    • Label: Converted Video, name: field_converted_video, type: fie upload, path: blank (takes setting from FFMPEG setting since whenever this is populated, the converted video dumps into the user file directory root
    • Label: Converted Thumb, name: field_converted_thumb, type: file upload, path: blank (see above)
    • The original .MOV file is still listed in the Video Upload field as the attached file, and displays in a list within the node. The generated Flash file is not referenced in the node at all. If a [video] tag is used in the node body, the "Video is not available" default .PNG file displays. For the record, I tried this both before running cron, hoping to utilize the automatically converted files, as well as after running cron, with the same result.
    • In the course of exploring different options, I disabled the [video] tag and created a node-video-post.tpl.php file and included the following code:

      <?php
        if ($teaser): /* teaser */
          print flashvideo_get_thumbnail($node);
        else: /* full node */
          print flashvideo_get_video($node, $params);
          print $content;
        endif;
      ?>

      This has been uploaded to my site's theme directory, at the same level as the orignal node.tpl.php file. This file is completely ignored by Drupal. When I added the above code to the default node.tpl.php file, the node behaved as before, displaying "Video not available."

    • I have confirmed that the proper data is being entered into both the FlashVideo and the FFMPEG_data tables of MySql. Here are two entries confirming that everything is working as it should:
      • From ffmpeg_data:
        did 	fid 	created 	input_file 	output_file 	status 	data
        15 	144 	1237758012 	sites/default/files/original_video/stardust-test_0.mov 	sites/default/files/converted_video/stardust-test_0_144.flv 	1 	NULL
      • From flashvideo:
        fid Ascending 	nid 	oid 	status 	video_index 	width 	height 	play_counter 	flags
        144  	122  	144  	3  	0  	450  	337  	0  	0

      What's curious is that if I examine the files table, I find the following three entries:

      • 144 1 stardust-test_0.mov sites/default/files/original_video/stardust-test_0... video 367555 1 1237758009
      • 149 1 stardust-test_0_144.jpg sites/default/files/converted_video/stardust-test_... jpg 7670 1 1237758012
      • 150 1 stardust-test_0_144.flv sites/default/files/converted_video/stardust-test_... flv-application/octet-stream 271318 1 1237758012

      This tells me that the node references to the file & player flashvars are not being updated at any point, so that the only file associated with the created node is the original uploaded movie, not the converted .FLV file.

    • Following this lead, I constructed a View to pull in all the possible references. Here's the constructed Views query:
      SELECT node.nid AS nid,
         node_revisions.body AS node_revisions_body,
         node_revisions.format AS node_revisions_format,
         node.title AS node_title,
         flashvideo.nid AS flashvideo_nid,
         node_data_field_converted_video.field_converted_video_fid AS node_data_field_converted_video_field_converted_video_fid,
         node_data_field_converted_video.field_converted_video_list AS node_data_field_converted_video_field_converted_video_list,
         node_data_field_converted_video.field_converted_video_data AS node_data_field_converted_video_field_converted_video_data,
         node.type AS node_type,
         node.vid AS node_vid
       FROM node node 
       LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid
       LEFT JOIN flashvideo flashvideo ON node.nid = flashvideo.nid
       LEFT JOIN content_type_video_post node_data_field_converted_video ON node.vid = node_data_field_converted_video.vid
       WHERE node.type in ('video_post')
      

      This gave me some optimism. This View preview showed a number of nodes, the first being the ones I would see after created a Video Post type -- that is, the orignal .MOV file being listed and "Video Not Available" displayed. Below these were a number of nodes that had been created by Drupal, categorized as Video Posts, that were created automatically due to what I believe to be the "Convert Videos Immediately" option selected in the Edit FlashVideo Settings - Content Type Settings menu. These generated nodes had the title of the uploaded movie file as the node title, with all other content fields such as Taxonomy and Body empty, although it was still referencing the uploaded .MOV file from the node I created. On the plus side, once I edited this node and added the [video] tag into the body and saved the node, the <embed> tag showed up in the node body, pointing to the Player.swf file, and providing the proper FlashVars so that the desired video was playing!

      Hurray!

    • If I'm rambling at this point, bear with me, for I'm triple-checking everything as I'm writing this, and discovering some new details and possible solutions along the way.
    • If I deselect "Convert Videos Immediately," no nodes are generated, and none of the pertinent data is getting to the original node I create with the original video upload, even after running cron.
    Where I'm Going With This

    It appears at this point that the only way I can get this to work like I want is to select "Convert Videos Immediately," and edit the generated node that's created in the video conversion process. This behavior is unexpected and undocumented, but is a workaround if need be. I would prefer that I only have to deal with the node I originally create, obviously, instead of creating a node, editing the generated node, then deleting the original node. I would also prefer that since the end-users of this site aren't going to be the most tech-savvy folks, I'd like for Drupal to recognize the node-video-post.tpl.php file so that I can disable the [video] tag.

    Granted, in the course of writing this request, I did discover the workaround solution, but I can't imagine this is the designed process flow. Any suggestions would be most appreciated and I thank you in advance.

    Comments

    attheshow’s picture

    Status: Active » Postponed (maintainer needs more info)

    Dear mcskipperson,

    I'd like to help, but you've covered a lot of ground here and I'm not clear on what exactly your primary question is.

    Regarding Drupal ignoring your template file, I'd recommend doing some simple tests on this. Try adding a note to your template file (node-video-post.tpl.php) like the word "<h1>HELLO</h1>" that will appears somewhere on the page. If you don't see the word "HELLO" appearing, I'd recommend visiting admin/content/types/list and double checking under the "type" column to make sure you're using the correct name for your template file.

    The rest of what you mention seems to be outlining the specifics of your setup. Is there another specific question we can help answer?

    Steve Dondley’s picture

    I'm suspect this is caused by having a previous node revision on your site causes a node's vid (version id) to be different from the node's nid (node id). This module has a track record of not handle nids and vids properly. Do a search on vid in this issue queue and you'll see what I mean.

    Anonymous’s picture

    Version: 6.x-1.5-beta2 » 6.x-1.5-rc1
    Status: Postponed (maintainer needs more info) » Active

    What the question boils down to is why does the module create another node with the uploaded and successfully converted video file's filename as the node title rather than converting the video and assigning it to the original created node?

    For clarity's sake:
    1) I create a new node, attaching & uploading a video file
    2) Video file is converted succesfully, new video file is created, BUT A NEW NODE IS CREATED AS WELL, WITH THE NEW VIDEO FILE ATTACHED TO THE NEW NODE, NOT THE ORIGINAL NODE.
    3) The original node is essentially useless, but the newly created node is editable and serves all intents and purposes, displaying the converted, attached flash file using the [video] tag. I should stress that the video file attached to the original node is not the converted file; the [video] tag in the original node returns a "Video is Not Available" graphic.

    Long story short, the end result is achieved -- there is a node created with a Flash file attached that was converted from the file I originally uploaded, but this is not the node I created and attached the original raw movie file to. A second node is created in this process, blowing out all meta, such as title, node body, etc. Granted, there is a workaround, but I am sure this is not how this module is intended to work.

    Please advise.

    Thanks in advance.

    attheshow’s picture

    Status: Active » Postponed (maintainer needs more info)

    Thanks for the clarification. The problem is that I've never seen this "second node being created" issue before on any sites. I've never seen anyone report this issue either. It sounds like there's something strange in your setup, but I can't tell what from the information you've provided here. Please feel free to send me a direct message if you'd like me to login to your development site and see if I can figure out what the issue is.

    attheshow’s picture

    Dear mcskipperson,

    I experimented a little bit with the login you gave me for your site, but I didn't find any clear issues for what's happening with the dual nodes on your site. As I said, this isn't the normal behavior of the module. My only guess is that the FlashVideo processes are somehow coming into conflict with another module or setting on your site. I would recommend trying a process of elimination. You could go about temporarily disabling other modules and see if you can get the video posts working. If they do start working, then, one by one, you can re-enable the other modules. Whenever the upload process breaks, you've found the culprit. This is what I would try if I was administering the site.

    Anonymous’s picture

    Status: Postponed (maintainer needs more info) » Active

    Sweet Jeebus, I finally got it sorted out.

    What was causing the heretofore unheard of scenario of a second node being automatically created was that I had set the "Video Import Directory" value in FlashVideo Settings for the specific content type to the same directory listed in my content type's CCK filefield setting AND selected "Convert Videos Immediately." Once I changed the "Video Import Directory" to anything but what was listed in the CCK, Bob's your uncle.

    I'm completely throwing out a SWAG here, but I think it was running through the conversion twice since I had the directory for the file upload listed in two different spots, and in the process, created a second node that referred to the uploaded file.

    I did change the process since my initial post in that I changed over to uploading .flv files instead of .mov files in the hopes that sidestepping the conversion process would stop the automatic node creation, so I don't know if this would still work with file types other than .flv's being uploaded. The downside of my current setup is that all files are dumped into the default/files root folder rather than being organized, but frankly, I don't really care at this point. I serendipitously stumbled across this solution when I created a new content type that was going to include video files, and inadvertently set the uploaded file folder to something other than what was specified in the FlashVideo settings.

    Whether or not this interests you I'll leave to your good judgment; all I knows is that the documentation I have to write up for my client regarding content creation just got a lot lighter due to this happy accident.

    All said, it's a great module and I thank you for your time and efforts to make this available to the community.

    attheshow’s picture

    Status: Active » Postponed (maintainer needs more info)

    I'd like to check out the issue you described above and prevent other users from running into it. Can you walk me through the steps I could take to duplicate this issue?

    Anonymous’s picture

    This can be replicated by setting the Video Import Directory in FlashVideo Content Type settings to the same directory specified in "Path Settings" of that particular content type's video upload field.

    I haven't tried it without having "Convert Videos Immediately" in FlashVideo checked as I'm too close to launch to play around with it, but I seem to recall the same behavior (automatically creating a second node) occurring when I did the conversions through cron.

    When the same directory is specified in the two different locations, the problem occurs; when I change the FlashVideo Video Import Directory to any arbitrary setting, things work fine.

    It should be noted that while files are uploaded to the specified directory correctly, converted files are dumped into the root of default/files. This isn't the ideal situation, but my nodes display correctly now, which is my ultimate goal, so I'm not going to concern myself with this minor detail.

    Let me know if I can provide you with any more info, and thanks again for developing this and supporting it as well.

    attheshow’s picture

    Version: 6.x-1.5-rc1 » 6.x-1.x-dev
    Status: Postponed (maintainer needs more info) » Fixed

    I believe this should be fixed by changes implemented this week. Please let me know if you find that it still isn't working for you.

    Mixologic’s picture

    Priority: Critical » Normal
    Status: Fixed » Active

    Oh man.. I just spent the last 2.5 hours on this exact problem.

    Double node creation. First node has all my data, second node has the correct videos. just like above.

    It definitely has something to do with a naming collision.

    I created a cck type called "video".

    I went to /admin/settings/flashvideo/edit/video, and set it to "video_import" (Like it says to do in /admin/help/flashvideo), also I checked "Convert Videos Immediately" as I am uploading flv files and dont want to wait for the cron to make my thumbnails.

    the cck path settings on the three filefield fields were as follows:
    converted_file = video
    thumbnail =video
    uploaded_file = video_import

    So I think you can duplicate the bug when you set the path on the "import file" filefield that you are importing from to the same directory as the directory that is the automatic import. This also explains why my imported files were getting deleted leaving the "converted" files with the new filenames (even though they remained unchanged as they were flv's)

    By the way, Im running the July 29th version of the Dev branch.

    Oh, and this plus dash player makes for volcanoes of awesome btw. Seriously kick ass piece of work y'all have built. My client will be very happy delivering his videos from S3 now!

    Finally, I have

    The Video Import Directory is a directory located within your files directory dedicated specifically for video importing. The FlashVideo module will then scan all files within this directory and automatically add all video files to your drupal site, convert them, and move them to your output directory.

    attheshow’s picture

    Status: Active » Closed (fixed)

    Sorry, I hate to say it, but I think the issue you've outlined above (accidentally telling FileField to put uploaded videos into the import directory) falls more under the realm of "user error" than a bug in the module.