By Haki Saki on Wednesday, 08 March 2017
Posted in General
Replies 17
Likes 0
Views 204
Votes 0
A user is getting the following error when trying to upload a 2mb/mp4 video (attached) How should I start to troubleshoot this?
Hi there,

It seems that your current 'Path to FFMpeg ' as you can see at Backend>Components>EasySocial>Settings>Videos is invalid as shown https://screencast.com/t/NJB8eoyvC7B. Maybe you can consult with your web service provider regarding this as they will now where those path is. Please advice.
·
Wednesday, 08 March 2017 11:34
·
0 Likes
·
0 Votes
·
0 Comments
·
OK, so I put the correct path in per my hosting service and now when you try to upload a local video to a post it just hangs - "Encoding your video... 0%" - thoughts? (its a 2mb mp4 and permission is set at 8 mb limit)
·
Wednesday, 08 March 2017 12:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

It seems that your current path still invalid, as you can see here https://screencast.com/t/FVsYyKKknvt7, By the way, once you have changed them, it should not shown this messages "The path you specified is invalid. Please enter a different path to FFMpeg" if your path already correct .

Maybe you can refer to this docs https://stackideas.com/docs/easysocial/administrators/configuration/videos-encoding , in case maybe you havent enable "PHP:passthru" as stated on the docs.

Please advice.
·
Wednesday, 08 March 2017 12:45
·
0 Likes
·
0 Votes
·
0 Comments
·
Here is the response from my host:

"For some reason the Easy social component cannot detect the ffmpeg binary, although the correct path is set. I managed to find the PHP code where the check is made, but I am not a developer and it does not mean much to me. It is in the file:

administrator/components/com_easysocial/themes/default/settings/form/pages/videos/general.php

Code:
<div class="panel-body">
<div class="form-group">
<?php echo $this->html('panel.label', 'COM_EASYSOCIAL_VIDEOS_SETTINGS_FFMPEG_PATH'); ?>

<div class="col-md-7">
<?php echo $this->html('grid.inputbox', 'video.ffmpeg', $this->config->get('video.ffmpeg')); ?>

<?php if ($this->config->get('video.ffmpeg') && !JFile::exists($this->config->get('video.ffmpeg'))) { ?>
<div class="t-text--danger">
<b><?php echo JText::_('COM_EASYSOCIAL_VIDEOS_SETTINGS_FFMPEG_PATH_NOT_FOUND');?></b>
</div>
<?php } ?>
</div>
</div>


I would suggest you to get in touch with the Easy social support and ask them to check the problem. If they suggest a server side fix, please let us know and we will gladly implement it for you."

Thoughts?
·
Thursday, 09 March 2017 02:58
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi there,

After checking on your site, it seems that your current ffmpeg version is using older version that is v0.78.5 as shown below, as we required at least v2.8 as stated here https://stackideas.com/docs/easysocial/administrators/welcome/minimum-requirements

ffmpeg version 0.7.5, Copyright (c) 2000-2011 the FFmpeg developers
built on May 8 2013 09:41:07 with gcc 4.1.2 20080704 (Red Hat 4.1.2-50)
configuration: --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --prefix=/usr --libdir=lib64 --shlibdir=lib64 --disable-doc --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --enable-avfilter --enable-libdirac --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
libavutil 50. 43. 0 / 50. 43. 0
libavcodec 52.122. 0 / 52.122. 0
libavformat 52.110. 0 / 52.110. 0
libavdevice 52. 5. 0 / 52. 5. 0
libavfilter 1. 80. 0 / 1. 80. 0
libswscale 0. 14. 1 / 0. 14. 1
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/hakisaki/public_html/media/com_easysocial/videos/149/29707c854eb7a3748cead6b65174314d':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 1970-01-01 00:00:00
encoder : Lavf53.24.2
Duration: 00:00:05.80, start: 0.000000, bitrate: 1457 kb/s
Stream #0.0(und): Video: h264 (Main), yuv420p, 640x480 [PAR 1:1 DAR 4:3], 1066 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc
Metadata:
creation_time : 1970-01-01 00:00:00
Stream #0.1(und): Audio: aac, 48000 Hz, 5.1, s16, 384 kb/s
Metadata:
creation_time : 1970-01-01 00:00:00
[MOV/3GP/MP4/3G2 muxer @ 0x102b1e0] [Eval @ 0x7ffebffaddf0] Undefined constant or missing '(' in 'faststart'
[MOV/3GP/MP4/3G2 muxer @ 0x102b1e0] Unable to parse option value "faststart"
Invalid value 'movflags' for option 'faststart'


Maybe you can update them first and see how it goes
Please advice.
·
Thursday, 09 March 2017 11:18
·
0 Likes
·
0 Votes
·
0 Comments
·
After my host update the version and now the upload process stalls mid-way through..here is there most recent comments:

"I checked the case thoroughly and notice that the video upload stalls at different percentage each time, however each time it stalls - the load increases and the running process takes up all of the server's reousrces. I am attaching results of the top command while uploading the video:

Code:
top - 13:47:28 up 172 days, 12:41, 2 users, load average: 34.70, 23.34, 8.00
Tasks: 84 total, 2 running, 81 sleeping, 0 stopped, 1 zombie
Cpu(s): 27.7%us, 17.8%sy, 0.0%ni, 41.6%id, 0.0%wa, 0.0%hi, 12.9%si, 0.0%st
Mem: 2097152k total, 1954804k used, 142348k free, 0k buffers
Swap: 0k total, 0k used, 0k free, 474756k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
29692 hakisaki 20 0 290m 70m 11m R 98.5 3.5 0:22.75 /home/hakisaki/ffmpeg/ffmpeg -y -i /home/hakisaki/public_html/media/com_easysocial/videos/157/9394b65525d1e7c3f717f66d8c894dbb -strict -2 -acodec aac -vcodec libx264 -crf 23 -ab 64k -vf scale=-2:'min(ih,720)' -m
29311 root 20 0 12980 1996 1708 R 1.9 0.1 0:00.81 top -S -d 1 -c
1 root 20 0 19292 268 0 S 0.0 0.0 2629:10 /sbin/init


As you may see - the process takes up all of the server's resources. In this case what I can recommend would be the following course of action would be best to contact the plugins developers so they could check why the plugin requires such resource usage.

If the above is not possible, you may consider the options below:

1) Updating the plugin in question, as currently you are using its outdated version;
2) Permanently increase the server's CPU and RAM. You may do that via your user area > Add services > Cloud Hosting > Upgrade."

Thoughts?
·
Friday, 10 March 2017 04:11
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Haki,

It shouldn't takes up all of the server's resources when server encoding the video unless that video size is big.

I did try upload 400kb video on your site, it also encoding until half way then caused site down a few second.

Can you upload your FTP and Cpanel access so I can better have a check again?
·
Friday, 10 March 2017 16:54
·
0 Likes
·
0 Votes
·
0 Comments
·
That information is in the first message (hidden)
·
Saturday, 11 March 2017 01:19
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,

Are you currently on a shared hosting or are you running your own cloud instance (vps) ? When a video is uploaded, it is sent to ffmpeg to encode it into a web play-able format (flv)

If it is a shared host and the hosting provider is hosting a lot of customers on the same server, you will most likely hit this kind of issues because there isn't enough CPU to process and encode the video. Which results into zombie process being spawned and it will hog up the CPU / memory. I believe your hosting provider should understand that.

The question is, if it is a shared hosting, does your provider allow you to run ffmpeg? If they do, they would need to look into their server as encoding a 400kb video shouldn't be doing this much of damage.
·
Saturday, 11 March 2017 14:43
·
0 Likes
·
0 Votes
·
0 Comments
·
Here is the response I received from my host.

Your website is actually hosted on a Cloud plan with the following resources:

Code:
1 CPU core
1 GB RAM


It seems that it is not enough to handle the process of uploading the video. I recreated it on my end and attached to the server error logs. Here is the error message when the uploading process failed(it stopped on 76%):
Code:

[Sat Mar 11 09:45:22 2017] [error] Execute of /home/hakisaki/public_html/index.php stopped because of load 35.97
[Sat Mar 11 09:45:22 2017] [error] Execute of /home/hakisaki/public_html/index.php stopped because of load 35.97
[Sat Mar 11 09:45:22 2017] [error] Execute of /home/hakisaki/public_html/index.php stopped because of load 35.97


Here is the server load before starting the upload:

Code:
09:44:55 up 174 days, 8:38, 2 users, load average: 0.18, 8.11, 2.95


Here it is a few seconds after starting the upload:

Code:
09:45:19 up 174 days, 8:39, 2 users, load average: 25.20, 8.91, 3.22


and here it is when the process was interrupted by our monitoring service:

Code:
09:45:34 up 174 days, 8:39, 2 users, load average: 52.77, 11.11, 3.95


Right after killing the process, the load level goes back to normal. It will be best to contact your developer and consider upgrading the server resources, so it could handle such processes better. I am unable to provide you with the exact amount of resources that would be enough.

If you still have any questions, do not hesitate to contact us again.

*** It seems odd that I would need yet a larger plan w/ SiteGround to upload videos. I already pay $60/mth for hosting so if neither of you guys can figure this out I would recommend putting some type of footnote on the Upload Video feature in ES.
·
Saturday, 11 March 2017 23:56
·
0 Likes
·
0 Votes
·
0 Comments
·
If you are already paying $60 / month for your hosting, I would suggest that you move out of Siteground. We have lots of customers running on a cloud instance from Linode at only $20 / month and their video encoding works perfectly fine.
·
Sunday, 12 March 2017 16:04
·
0 Likes
·
0 Votes
·
0 Comments
·
Any other hosting suggestions? We may need a little more "managed" services than Linode seems to offer..I don't want to get bogged down on the technical side of hosting..make sense?
·
Wednesday, 15 March 2017 00:46
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi haki,

Maybe you can refer to this docs https://stackideas.com/docs/easysocial/administrators/welcome/getting-started as we have referred those web hosting provider that might help solved your issues.

Please advice
·
Wednesday, 15 March 2017 13:42
·
0 Likes
·
0 Votes
·
0 Comments
·
I already use a Cloud Acct w/ Siteground (1 of the 3 on your list) - I'm hesitant to switch if I am going to have similar issues
·
Thursday, 16 March 2017 00:42
·
0 Likes
·
0 Votes
·
0 Comments
·
Can I get ES feedback on this statement from my host?

"Currently the cloud server has 1 CPU core, I do not think there is a cloud plan out there with less than 1 CPU core and as the developer has told you "CPU is needed to process and encode the video". In this case you could consider adding 1-2 more CPU cores and 1-2 GB of RAM" - to do their recommendation, that would bump my hosting costs up to about $80/mth

Thoughts?
·
Thursday, 16 March 2017 02:52
·
0 Likes
·
0 Votes
·
0 Comments
·
There is really nothing we could do here because you are running on a hosting which is restrictive in terms of it's cpu usage. To be honest, I am not entirely sure how to help you as it seems like the only way for you to enable video uploads on your shared host on siteground is to add more cpu.

The other alternative for you is to switch to linode and setup a cloud instance there at $20 / month or $40 / month. This will definitely be good enough. The only downside, is that you need to setup and provision it yourself unless you get their managed services
·
Thursday, 16 March 2017 18:24
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post