I've been searching for a few days for the procedure to get video thumbnails to display in the node edit and node view when video is uploaded from the local drive. I'm using core 7.8 with File Entity 7.x-1.x-dev, Media 7.x-2.x-dev, MediaFront 7.x-1.x-dev modules.

I've created a content type name video and added the following fields:
1. fieldname: "video_upload" file type: "file" Widget: "media file selector"
2. fieldname: "image_upload" file type: "image" Widget: "image"
3. fieldname: "media_player" file type "media player" Widget:"media player"

Under the admin/structure/types/manage/video/display menu, I've set the video_upload field's display format to "Rendered File" with a view mode of "Default". Under the same menu, I've set the image_upload fields display format to "image" with a view mode of "original".

Under the admin/config/media/file-types/manage/video/file-display the following are set:
1. Default display: "Rendered file" view mode: "Default"
2. Preview display: "Rendered file" view mode: "Preview"
3. Small display: "Rendered file" view mode: "Small"
4. Large display: "Rendered file" view mode: "large"
5. Original display: "Rendered file" view mode: "original"

With the above configuration I can play mp4 videos but, the video thumbnail is not displayed once videos are uploaded to the media library, nor are the thumbnail displayed in the node add/edit or preview or node view.

I also notice that when I edit a node created from the video content type, I get the following:

Notice: Trying to get property of non-object in theme_file_link() (line 701 of C:\public_html\Drupal7\modules\file\file.module).
Notice: Trying to get property of non-object in theme_file_icon() (line 739 of C:\public_html\Drupal7\modules\file\file.module).
Notice: Trying to get property of non-object in file_icon_path() (line 781 of C:\public_html\Drupal7\modules\file\file.module).
Notice: Trying to get property of non-object in file_icon_map() (line 823 of C:\public_html\Drupal7\modules\file\file.module).
Notice: Trying to get property of non-object in file_icon_path() (line 796 of C:\public_html\Drupal7\modules\file\file.module).
Notice: Trying to get property of non-object in file_icon_path() (line 796 of C:\public_html\Drupal7\modules\file\file.module).
Notice: Trying to get property of non-object in file_icon_path() (line 796 of C:\public_html\Drupal7\modules\file\file.module).
Notice: Trying to get property of non-object in file_icon_path() (line 796 of C:\public_html\Drupal7\modules\file\file.module).
Notice: Trying to get property of non-object in theme_file_link() (line 708 of C:\public_html\Drupal7\modules\file\file.module).
Notice: Trying to get property of non-object in theme_file_link() (line 708 of C:\public_html\Drupal7\modules\file\file.module).
Notice: Trying to get property of non-object in theme_file_link() (line 714 of C:\public_html\Drupal7\modules\file\file.module).

I've spent several days trying to figure out how to get the media module, file_entity and mediafront to properly work together. Any help would be much appreciated.

Comments

rwilson0429’s picture

Status: Active » Fixed
rwilson0429’s picture

Status: Fixed » Active
rwilson0429’s picture

Sorry, i thought it was fixed but, thumbnails for videos uploaded from local computer still shows a generic image.

Xomby’s picture

I could use this functionality myself. But don't have time at the moment to work on it.
As far as I know, they expect you to provide your own image file, or is that what you're doing?

I wasn't planning on teaching my users how to make their own image stills (far beyond their capabilities), so I planned on doing this in an automagical way...

Essentially, the following needs to happen (braindump):
User selects a video to upload (VIDEO!)
System recognizes that a video is being uploaded
System pulls a frame out of the video to use as a thumbnail (or multiple, and gives user choice of picking one)
System sets that thumbnail to be the image uploaded to the node
video+thumbnail are both now in node.

rwilson0429’s picture

No, I was not providing my own image but the 'braindump' will hopefully get me started in the right direction.

The steps you outlined seems logical and may be a good candidate for the Rules module. If I'm lucky, I'll find someway to do it with Rules. The hardest part, if possible at all, would be to get Rules to pull a frame out of the video. That would truly be 'automagical'.

It would probably be helpful if these steps were outlined in the documentation also.

Xomby’s picture

Indeed, probably using some sort of FFMPEG hook (as I know the CLI method to pull a frame from a video file is REALLY simple for FFMPEG), if possible.

I think there's already a module that implements FFMPEG, maybe we can hook that to get the function we need out of it.

devin carlson’s picture

devin carlson’s picture

Xomby’s picture

Any progress by anyone on getting something like this going? I've come full circle with my projects, and see this now re-entering my TODO list for the upcoming month.

rwilson0429’s picture

Using the latest dev versions (7.x-2.x-dev)of MediaFront module and Media (7.x-2.x-dev), I've been able to get a thumbnail view of videos uploaded from my local computer.
I've created a a MediaFront preset for node full view and preview. I then created a content type name video and added the following fields:

  • fieldname: "video_image_upload"; file type: "image"; Widget: "image"
  • fieldname: "video_upload" file type: "file"; Widget: "media file selector"

The MediaFront Module adds configurable MediaFront Settings to the content type manage field form (admin/structure/types/manage/[YOUR-VIDEO-CONTENT-TYPE]/fields/[YOUR-VIDEO-IMAGE-FIELD]). Under the MediFront settings for the video image field, set 'Field-Type' to Image; set Preview Style to 'square_thumbnail' (or any other display you want for your preview).

On the video content type manage display page, /admin/structure/types/manage/[YOUR-VIDEO-CONTENT-TYPE]/display, set your video image field format to 'image'. Click the cog for the field and set your desired image style.

Set the video file format to MediaFront Player and select a MediaFront preset (you must create a MediaFront Preset. See readme file in the MediaFront module for details).

Now when I create a video content, I upload the video file from my local computer into the video_upload field and I upload an image to be displayed as the thumbnail view of the video into my video_image_upload field. And, presto, the image is displayed as a video thumbnail in both the default view and the teaser view.

devin carlson’s picture

Status: Active » Fixed

It looks like rwilson0429's solution in #10 should work nicely.

Media players/formatters should be responsible for displaying video thumbnails, not the Media module itself.

Status: Fixed » Closed (fixed)

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