Problem/Motivation

I'm having difficulties getting the Video Module to play any videos. After I uploaded the video, I proceeded to view it and got this error.

Notice: Undefined index: in theme_video_formatter_player() (line 78 of /var/www/drupal/sites/all/modules/video/video.theme.inc).

$theme_function = variable_get('video_extension_' . $video->player, $defaults[$video->player]);

$video->player is null for some reason

I also got this warning in the recent log messages:

Theme key "" not found.

There was a very similar issue that was closed already, so I created a new one. The previous one was solved by installing flowPlayer. I would like to use an HTML5 player that is backed up with flash for maximum device compatibility.

My web server is Ubuntu, and FFMPEG will be used for transcoding.

I have the following Media related modules installed and enabled:

Video 7.x-2.5
Video UI 7.x-2.5
Video.js 7.x-2.0
Libraries 7.x-2.0-alpha2+1-dev
Zencoder API 7.x-2.5

Am I totally missing something here? Do I need to install a different player module or am I just lost in a sea of configuration?

Thanks,
Jake

Comments

Jorrit’s picture

Assigned: Unassigned » Jorrit
Status: Active » Postponed (maintainer needs more info)

Video.js has its own Flash fallback, so you don't need to use a Flash player for that. Are there no other errors in the log messages? What are the file names of the transcoded files?

jSnake04’s picture

Notice: Undefined index: dimensions in TranscoderAbstractionFactory->createJob() (line 186 of /var/www/drupal/sites/all/modules/video/includes/TranscoderFactory.inc).

I have a few transcoding errors, but decided to postpone working on that until I got the video playback working so I can demo the site to a client. I bypassed the conversion and uploaded an mp4.

I was digging around and noticed the code that sets $video->player based on the presets is clearing out the player var with an empty string for some reason.

Starting at line 51 of VideoHelper.inc:

// add player to the video object
if (!empty($video->files)) {
    // get the preset and check for output file type to set as player
    $video_preset = new Preset();
    $presets = $video_preset->properties();
    foreach ($presets as $preset) {
        $video->player = $preset['settings']['video_extension'];
    }
}

As a quick and dirty work-around I added this line after line 68 in Video.Theme.inc:

$video->player = strtolower(pathinfo($variables['item']['filename'], PATHINFO_EXTENSION));

My goal is to provide a working video player for the largest possible range of devices. I am open to any suggestions you may have.

Jorrit’s picture

$preset['settings']['video_extension'] is related to the preset settings. Could you post the result of the following query:

SELECT * FROM video_preset

For some reason, no extension is registered for your preset. I am also interested in a screenshot of the preset screen for every enabled preset.

Jorrit’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closed because of lack of response. Unfortunately, I am unable to investigate the issue using the information you provided. Please try 2.6 or the latest -dev version.

de_chris’s picture

Updating to the latest dev 7.x-2.6+36-dev solved this issue for me.

Jorrit’s picture

That is great, thanks for letting know.