Videos Component Question

Bob Weston Posted in Technical Support 5 days ago

I have been hunting around trying to find some information regarding the videos component in relation to thumbnails but cannot find anything. When I upload videos to my site there is never a thumbnail. I am wondering if there is something I need to set to make this happen. I noticed there is a file called VideoThumb.php in the classes folder of the component which looks like it controls the creation of the thumbnail. I changed it from 5 seconds to 25 seconds to see if maybe 5 seconds was too early... but I never see a thumbnail.. can anyone help with this?

Replies
German Arsalan Shah Replied 2 days ago

Its mp4 because videos after conversion are set to mp4 i have checked the video to upload a avi and it worked for me see a video : https://www.loom.com/share/7627732575414f91a6d221303255f8c6

Therefore conclusion is that there is issue with your end. Therefore you don't need to worry about videos component. You should resolve the issue first. You may try to download latest product and replace your videos component with new release at least to try. (5.10)

German Bob Weston Replied 3 days ago

correct me if I am wrong but it looks to me that the addVideo function in the Videos.php only allows two types (.mp4 and .mov):

enter image description here

I am a coder but not a PHP coder..
Is this the function that controls what video type you may upload?
If so, what would i have to add for .avi to work?

My FFMPEG will convert almost anything, but this code is limiting it to just a couple.

German Bob Weston Replied 3 days ago

I have the the problem that I am running centos 7.8 and the yum repositories only go up to 2.8.15..
I know you said in a different thread that you use debian or something.. I can manually install FFMPEG on centos but it is very tricky and takes hours to get everything working.. maybe I should just backup my site and install a different operating system

German Arsalan Shah Replied 3 days ago

You can change the command as you need because we don't support ffmpeg tools 2.x as 2.x have those codes as experimental its very outdated version. You are using 7 years old version.

German Bob Weston Replied 3 days ago

Hi Arsalan,

I said that because the php function still worked regardless of that setting because the videos are uploading to the proper place and converting, they also play, just the thumbnail is missing. Now Z told me that .avi don't work so I am trying to figure out why.. .avi converts fine from command line using the following code:

ffmpeg -i INPUT.avi -c:v libx264 -crf 19 -strict experimental OUTPUT.mp4

if I use the code in the PHP from command line, it won't convert:

ffmpeg -i INPUT -vcodec libx264 -profile:v -level 3 OUTPUT.mp4

If I could change the php to adapt to the code that works, the .avi problem would be solved I believe

German Arsalan Shah Replied 3 days ago

Just to add,

Bob, 2 days ago i said : Does your php user have authorization to execute php exec function and can seek outside public html ?

You said yes everything is ok :) and today you said it included in your disabled function list : exec

Video component supported only the files that are listed and these files are checked before processing take place.

AVI format didn't worked on ffmpeg 2.x with the codec command used for conversion.

German Bob Weston Replied 3 days ago

Line 21 of /components/Videos/plugins/default/forms/videos/add.php label says:

<label><?php echo ossn_print('video:com:file');?> (<?php echo ossn_video_max_size();?> MB)  Allowed formats (.3gp, .mov, .avi, .wmv, .mp4)</label>

although FFMPEG converts much more..

German Bob Weston Replied 3 days ago

That is not the case, something is not right when doing it through PHP and I don't know what can be blocking it. I just tried to upload a .flv file and the OSSN told me that the file format isn't supported. I uploaded the .flv file to my server and ran the linux command and it accepts the file format and creates a thumb..

German Bob Weston Replied 3 days ago

Hi Z,

I just took it out of the disable function.. I added 2> log.txt to my conversion code in root to look at what it is doing, I see in the log that .avi is not allowed, do u know what I have to do to enable that?
This is in the log, I would post the who thing but it is long:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '656550dff7f545b0c33a5ef37f3674d8.mp4':

so that tells me only mov,mp4,m4a,3gp,3g2,mj2 are allowed

German ~Z~ Man Replied 3 days ago

He Bob,
from within PHP, ffmpeg gets executed via exec,
so it needs to be enabled in your ini file.
I was just trying to upload a short .avi file and it fails - which makes sense if ffmpeg can't be executed.