Videos Component Question

Bob Weston Posted in Technical Support 4 years 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
Indonesian Arsalan Shah Replied 4 years 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 4 years 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

Indonesian Arsalan Shah Replied 4 years 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 4 years 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 4 years 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 4 years 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 Michael Zülsdorff Replied 4 years 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.

German Bob Weston Replied 4 years ago

I do not wish to give anyone root access but I could create a sub-domain to reflect the actual website without users for testing purposes..
I had to revert back to ffmpeg 2.8.17 because 4.3.1 messed with a clipbucket website.
After I did some testing logged in as root in putty.
I went to the directory of one of the videos and ran the following command which is pretty much what is in the VideoThumb.php except I made the output in the same folder as the video:

ffmpeg -i 656550dff7f545b0c33a5ef37f3674d8.mp4 -an -ss 00:00:05 -r 1 -vframes 1 -y out.jpg

This worked and created an image at 5 seconds.
I am thinking the problem could be with the security in the php.ini.
This is my disable functions, could any of this block the PHP from generating the image?

disable_functions= show_source, system, shell_exec, passthru, exec, popen, proc_open

also, there is a file being generated with each video in a directory called "cover" but it is 0 bytes..
I will leave this at this info for now so I don't get logged out again ;)

German Bob Weston Replied 4 years ago

Wow.. I just spent about 15 minutes writing something.. and lost it all cause I got logged out..
I guess that is good to keep down long posts :))
I will try and summarize what I wrote again..

Indonesian Arsalan Shah Replied 4 years ago

Contact softlab24.com with ssh details, cpanel login details, website login details and they will check for you the problem.

Premium Version

Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.

$199 (Life Time)
Learn More

Other Questions