Forums » SEPHP Help and Tips

Youtube Videos Not Generating Thumbnails

    • 29 posts
    July 23, 2017 6:36 AM EDT

    Well, I dont know if this is a general issue or server specific, but for some strange reasons, I noticed that youtube videos shared on my site are not generating thumbnails.

    This is strange because, while trying to nail down the issue I have tried localhost and it worked there.

    I also have tried vimeo videos on production and it worked too.

    I thought this would be permission issue, but once Vimeo worked, then I knew it has to be a youtube thing.

    So, does any one know how to go about correctly debugging this?

    Any help would be appreciated!

     

    Thanks.

     Note: I am on:

    php5.6

    Centos

    GD enabled


    This post was edited by Wale at July 23, 2017 6:37 AM EDT
    • 626 posts
    July 23, 2017 6:45 AM EDT
    Wale said:

    Well, I dont know if this is a general issue or server specific, but for some strange reasons, I noticed that youtube videos shared on my site are not generating thumbnails.

    This is strange because, while trying to nail down the issue I have tried localhost and it worked there.

    I also have tried vimeo videos on production and it worked too.

    I thought this would be permission issue, but once Vimeo worked, then I knew it has to be a youtube thing.

    So, does any one know how to go about correctly debugging this?

    Any help would be appreciated!

     

    Thanks.

     Note: I am on:

    php5.6

    Centos

    GD enabled

    Wale, welcome to the community!

    Someone else not too long ago, recently posted an issue very similar to this.

    Someone took a look at it and found that what fixed the issue, was turning the setting RegisterGlobals to Off in server configuration.

    If you are familiar on how to do this, then you can make the change on your side. Or I can recommend you someone who can do it from the Social engine Side.

    Hope this helps!

    If not, I've some other suggestions we can try.

    • 29 posts
    July 23, 2017 6:48 AM EDT

    Elshara!

    You are a genius!

    Thanks...and whew that was quick!

    I will try that and get back to you with the result.

     

    Thanks man!

    • 626 posts
    July 23, 2017 6:50 AM EDT
    Wale said:

    Elshara!

    You are a genius!

    Thanks...and whew that was quick!

    I will try that and get back to you with the result.

     

    Thanks man!

     

    No problem. I'm here if you need anything else!

    • 29 posts
    July 23, 2017 6:55 AM EDT

    Alas...register_globals are turned off by default on php.56

    I did a double check and its off.

    I just read this post:

    https://community.socialengine.com/forums/topic/56/video-thumbnails-blank

    But unable to wrap my head around what you meant here:

    Having said this, thumbnails not posting does appear to be a youtube API issue. I've had that happen when they upgraded their API, so maybe you can try creating a Google API key to see if this helps fix the problem.

    • 626 posts
    July 23, 2017 7:06 AM EDT
    Wale said:

    Alas...register_globals are turned off by default on php.56

    I did a double check and its off.

    I just read this post:

    https://community.socialengine.com/forums/topic/56/video-thumbnails-blank

    But unable to wrap my head around what you meant here:

    Having said this, thumbnails not posting does appear to be a youtube API issue. I've had that happen when they upgraded their API, so maybe you can try creating a Google API key to see if this helps fix the problem.

     

    Hey Wale. Sorry that didn't work out for you. I'll do my best to explain and provide alternatives.

    Google, back in 2014 decided to create a new API for Youtube which means, their default API didn't work.

    Non technical terms means, automatically posting of videos from a software account, instead of your own, isn't possible unless someone creates one with unlimited domain authorization access.

    Back in Social Engine 4.8X days, social engine created the ability for Youtube Videos to post through the new API settings. But you as the web master, had to create the authorization for Google to use your account to connect the site to it, to post them.

    That's what I meant when I said API keys may have something to do with the problem.

    However. If videos post, but no thumb nail is generated, this is another issue entirely.

    Recently, with the introduction of version 4.9, social engine provided a solution to this problem, when they implemented something called Iframely. Pretty much this is an embed service replacement and so this means essentially, your videos can be embedded without having to create an API authorization key and secret. Like you do if you wanted to enable social sign up and sign in from facebook and twitter.

    Now by default, here's how things are set up.

    http://support.socialengine.com/php/customer/portal/articles/2766234-iframely?b_id=4311

    It appears as if Social engine no longer requires you to provide your Google API credentials. Which means the above text was simply not helpful.

    Okay next solution. Tell me if you can successfully upload new videos. Then we can go from here.

    • 626 posts
    July 23, 2017 7:12 AM EDT
    Wale said:

    Alas...register_globals are turned off by default on php.56

    I did a double check and its off.

    I just read this post:

    https://community.socialengine.com/forums/topic/56/video-thumbnails-blank

    But unable to wrap my head around what you meant here:

    Having said this, thumbnails not posting does appear to be a youtube API issue. I've had that happen when they upgraded their API, so maybe you can try creating a Google API key to see if this helps fix the problem.

     

    Also another thing you can try, is see if your max uploadsize is set to a decent number. So something like 1g. And your post max size is set to about 1g to. You can go lower but it helps so the thumbnails actually get created depending on your server environment. Something between 128 - 512 MB can be set as a decent size. Some people accept 256M 32m and 64m as well.

    • 29 posts
    July 23, 2017 7:13 AM EDT

    Wow...that was helpful, at least I now know what not to look at.

    Thanks.

    Tell me if you can successfully upload new videos. 

    If by this you mean "Add Videos" then yes.

    I dont have the "Upload" feature just yet.

    All I have right now is for people to add videos by adding their youtube, vimeo links.

    Vimeo is working fine.

    Youtube is also working, locally. Except on production.

     

    • 626 posts
    July 23, 2017 7:20 AM EDT
    Wale said:

    Wow...that was helpful, at least I now know what not to look at.

    Thanks.

    Tell me if you can successfully upload new videos. 

    If by this you mean "Add Videos" then yes.

    I dont have the "Upload" feature just yet.

    All I have right now is for people to add videos by adding their youtube, vimeo links.

    Vimeo is working fine.

    Youtube is also working, locally. Except on production.

     

     

    Sorry about that. I had no idea you couldn't just upload a Google API key anymore. I thought Iframely was actually optional but was simply set as the default. Guess I was wrong and learned from this two.

    Okay anyways. I figured the videos were posting. So try seeing what your post size and max size is in the php.ini configuration file. I don't know what your server folder structure is so I can't help you there. If you're familiar with ftp I can point you in the right direction to check it. Do you or do you not have root access? This will determine most likely, where it is located.

    If you find it, try updating the post mzx size and upload max size and then post a new video. To see if the thumbnails upload. I'm also wondering if your max execution time should be set to something higher in case the process times out prior to the images remotely being found and copied to the public folder in your social engine installation directory.

    • 29 posts
    July 23, 2017 7:29 AM EDT

    Thanks man.

    I have access to the server, I am on VPS.

    As suggested, I changed my post_max_size to 512mb, max_execution_time to 300 and upload_max_filesize to 512mb as well.

    I then cleared the cache and readded the video...

    Still thumbnail not showing.

    But I just noticed that the opcache.max_file_size is set to 0...

    Do you think this is normal?

    I will try to change and see though.

     

    Thanks again!

    • 626 posts
    July 23, 2017 7:51 AM EDT
    Wale said:

    Thanks man.

    I have access to the server, I am on VPS.

    As suggested, I changed my post_max_size to 512mb, max_execution_time to 300 and upload_max_filesize to 512mb as well.

    I then cleared the cache and readded the video...

    Still thumbnail not showing.

    But I just noticed that the opcache.max_file_size is set to 0...

    Do you think this is normal?

    I will try to change and see though.

     

    Thanks again!

     

    I'm not an expert on this, so I will link you to an article on who is.

    https://www.scalingphpbook.com/blog/2014/02/14/best-zend-opcache-settings.html

    Not a lot of information is found about this error relating to social engine on the internet. Unfortunately. As it is recently a new problem.

    If videos from Vimeo post with thumbnails, then this may be an issue Youtube has to fix or Iframely. As there may be no setting on your server which may be causing this, other than clearing server cache I can think of.

    • 626 posts
    July 23, 2017 7:57 AM EDT

    I'll tell you what though.

    I'll link you to someone on here who knows how to actually code in such a way they can show up on any server configuration and can provide work around access to this kind of stuff.

    Wale, meet hard core developer, Social Engine Add Ons.

    https://community.socialengine.com/profile/SocialEngineAddOns

    I doubt they'd charge for having to fix this sillly issue. Let me know if sending a message to them works out for you because although I'm skilled at basic configuration, they know what they're doing and can apply the fix right away. They also tell you what they did to fix the problem so you have full documentation.

    Try sending them a friend request and see if they can help. I'm not sure what else I can do to fix this particular issue other than second guessing what isn't the problem, because it's related if it were. Server logs might provide you the most information. Perhaps they'd be an entry in your server error log. That's found in the root folder of your social engine directory. The main go to directory where the files are found in other words.

    • 29 posts
    July 23, 2017 8:07 AM EDT

    I will do just that!

    Thanks Elshara and if anything comes up, I will keep you posted.

    You've been amazing.

    • 626 posts
    July 23, 2017 2:52 PM EDT
    Wale said:

    I will do just that!

    Thanks Elshara and if anything comes up, I will keep you posted.

    You've been amazing.

     

    Thanks for the complement! Very much appreciated. I try my best but I am not an expert I apologize I'm just a client volunteer here. Doesn't mean I can't try some things you know. I believe in community effort. You're amazing two.

    This and any other issue you have, guaranteed, will be solved by the end of the week from start to finish if not sooner.