After upload, all videos have 00:00 duration


#1

Hello to all!
I would initially like to mention that I am new to the community and, of course, if you are asking for your support in an incorrect way, please tell me how I should do it. Concerning my question:

I have inherited a kaltura installation (kaltura-server-11.18.0-1.noarch version) that has an anomaly associated with the duration of the videos. Any video that is imported gets the information of duration 00:00. We equated updating kaltura to the latest version and probably the problem disappeared. However, I decided to run a test and install the same version on another machine (11.18.0-1). I notice that the problem has been exceeded.

Therefore, a number of issues were raised, namely:

  • If the problem in a new installation of the same version is exceeded, will the problem with the original machine upgrade be solved?
  • Did the problem initially not happen and for any reason of bad configuration, started to happen? Could the problem be associated with, for example, the installation of a new flavor?

Has anyone heard of this problem? Do you have any idea what I can do to resolve this?


#2

Hi @trm_1981,

The root cause is explained in this commit:

Newer versions rely on the kaltura-mediainfo package which is of version 0.7.61 rather than the mediainfo package available from the RHEL/CentOS/EPEL repos which is of a higher version.

While it is highly recommend that you upgrade all packages to the latest version, to solve this particular issue, you can install kaltura-mediainfo from the current stable Kaltura repo onto an older version and then change the directives in the following files:
/opt/kaltura/app/configurations/local.ini:bin_path_mediainfo
/opt/kaltura/app/configurations/batch/batch.ini:params.mediaInfoCmd
to point to /opt/kaltura/bin/mediainfo instead of /usr/bin/mediainfo.

After making the change, reload your Apache.

This will take care of future entries, for previously ingested entries, you will need to either update the entry.length_in_msecs column like so:

mysql> update entry set length_in_msecs=$LENGTH_IN_MS where id='$ENTRY_ID';

Or using the API, calling media->update() for instance, here is a code sample using the PHP client:

<?php
$entryId = '';
$mediaEntry = new KalturaMediaEntry();
$mediaEntry->msDuration = ;
$result = $client->media->update($entryId, $mediaEntry);

Getting video Duration using PHP library
#3

Perfect! Thanks a lot jess!
For now its working perfectly!


#4

Hi jess,

Me and my colleague (@trm_1981) have been doing some test with this feature of calculating the video duration. If we change the configuration from using the default mediainfo of the operating system, to the kaltura-mediainfo package, the system retrieves and stores the duration correctly, but this new video does not play in Microsoft Edge browser or iPad/iPhones.

I re-installed a clean system with Kaltura CE 11.18 and using the defaults (mediainfo) from OS (CentOS Linux release 7.4.1708 (Core)), the video plays in every browser, after changing to kaltura-mediainfo and resubmitting the same video, the duration is calculated correctly, but the video doesn’t play in those browsers. But the older video, submitted with the OS media info, still plays with out a problem.

Do you have any idea why this is happening?

Here are the version of all kaltura packages installed (these versions are needed so that the installation in our test env is successful and is the same version of our production env).

kaltura-lame-3.99.5-3.x86_64
kaltura-segmenter-1.0-3.x86_64
kaltura-postinst-1.0.31-18.noarch
kaltura-kvpm-v1.0.6-1.noarch
kaltura-clipapp-1.3-2.noarch
kaltura-kdp-v2.7.0-1.noarch
kaltura-widgets-1.0.0-8.noarch
kaltura-dwh-11.3.0-1.noarch
kaltura-server-11.18.0-1.noarch
kaltura-sphinx-2.2.1-19.x86_64
kaltura-mediainfo-0.7.61-7.x86_64
kaltura-a52dec-0.7.4-11.x86_64
kaltura-html5-studio-v2.0.5-1.noarch
kaltura-sshpass-1.05-1.x86_64
kaltura-base-11.18.0-7.noarch
kaltura-front-11.18.0-1.noarch
kaltura-krecord-1.0.0-1.noarch
kaltura-kdpwrapper-v11.0-1.noarch
kaltura-kmc-v5.40.2-4.noarch
kaltura-kcw-1.0.0-6.noarch
kaltura-kdp3-v3.9.9-2.noarch
kaltura-kclip-v1.1.2.1-2.noarch
kaltura-pentaho-4.2.1-2.x86_64
kaltura-batch-11.18.0-1.noarch
kaltura-librtmp-2.3-2.x86_64
kaltura-nginx-1.8.1-7.x86_64
kaltura-monit-5.18-1.x86_64
kaltura-libmediainfo-0.7.61-7.x86_64
kaltura-release-13.4.0-4.noarch
kaltura-x264-0.140-2.20140104.x86_64
kaltura-libopencore-amr-0.1.3-1.x86_64
kaltura-libfaac-1.28-1.x86_64
kaltura-libass-0.9.11-2.x86_64
kaltura-ffmpeg-aux-2.1.3-1.x86_64
kaltura-kupload-1.0.0-1.noarch
kaltura-kdp3wrapper-v37.0-1.noarch
kaltura-flexwrapper-v1.2-1.noarch
kaltura-html5lib-v2.45-1.noarch
kaltura-mencoder-3.4.6-9.x86_64
kaltura-ffmpeg-2.7.2-2.x86_64

Thank you for the help.


#5

Hi @amanadas,

CE 11.18 is rather old [latest stable is 13.5.0] and therefore, so is the HTML5 player version you have.
I recommend you open a trial account on our SaaS and try to ingest the file and play it with the latest version of the player. If that works, which I suspect it will, you should upgrade your CE to the latest stable version.
There are upgrade instructions here:

Technically speaking, it is possible to upgrade ONLY the player but I would advise against it and will not be able to offer official support in the event something goes wrong.

If you have to try that, these are the steps:

  • Upgrade the latest kaltura-html5lib RPM
  • Edit the html5_version in /opt/kaltura/app/configurations/local.ini
  • Edit $BASE_DIR/web/flash/kmc/v5.40.2/config.ini
  • Edit /opt/kaltura/apps/studio/v2.0.5/studio.ini
  • Run php $BASE_DIR/app/deployment/uiconf/deploy_v2.php --ini=$BASE_DIR/web/flash/kmc/v5.40.2/config.in
  • Run php $BASE_DIR/app/deployment/uiconf/deploy_v2.php --ini=/opt/kaltura/apps/studio/v2.0.5/studio.ini
  • Reload Apache

#6

Thank you @jess,

I already tested other version in docker and the same videos on those versions plays normally. I was hopping to solve this problem before the upgrade. I also tried to upgrade only the html5libs but with 11.18 the player v2.62 does not work (at least I was not able to make it work).

We know that we have to do an upgrade and we are going to do it… let’s see how it goes.


#7

Hi @amanadas,

Seeing how you already attempted to only upgrade the player, I suggest you go through the list of steps I provided and see if that works for you although generally speaking, like I said, that’s not the best practice.


#8

Hi @jess,

I tried one more time and installed the latest kaltura-html5lib RPM and did the configuration as you suggested, but i still have the same problem. Something changes when kaltura-mediainfo is used, because the delivery type changes from http to hls.

This video was uploaded with OS mediainfo

The next post has the other image.


#9

This video was uploaded with Kaltura-mediainfo

Do you know why there is this change in behavior? The type of video/encoding changes?


#10

Hi @amanadas,

Sorry but I don’t understand. mediainfo has nothing to do with playback. It is only used to retrieve metadata about the video.
HLS is the default playback method for the player. This is true to all players from version 2.48.1 and above. Why is that an issue?


#11

Sorry for this, I am very new to the Kaltura platform, and maybe there is something not configured for version 11.18 that has to be done.

When the video has 00:00 duration the video plays well, when the video has the duration calculated the video does not play. What I see is the change in deliverytype. I think the problem is not in the mediainfo library but in the way the system handles the new information available when playing the video.


#12

Hi @jess,

In our production system we have reverted the change of using kaltura-mediainfo, and for the videos that have been submitted and have duration different from 0 we are going to change that field directly in the database.

For example, for video 0_3kapjaj1 doing:

update entry set length_in_msecs = 0 where id = ‘0_3kapjaj1’

solves our problem. The video without any more changes, plays in Microsoft EDGE and in iOS devices. The version of kaltura is 11.18 with html5lib 2.45.

Meanwhile we are going to start the migration to one of the latest versions.