ISSUE SUMMARY:
When uploading a video file it starts to be converted by ffmpeg but after a period of time the video is gone at all in the frontend. When uploading to a group as a group video all members get informed about the new video by email and the link really works fine - you can see the video - but there is no post on the board and no video thumbnail in the video section of this group. All tests have been tried with different video formats and file sizes, while *.mp4 files and file sizes of 80-500 MB are normal.
STEPS TO REPLICATE:
1 Entering the group "Test"
2 Entering the group videos
3 Klick on "upload new group video"
4 Starting the upload after entering all needed information, upload works fine - demo video file can be found at
www.b4netzwerk.de/trustweaver_11-2016.zip
(86 MB)
5 After video upload the video is starting to be converted by the activated cron job
SOMETIMES:
When uploading a larger file of appr. 180 MB the process bar starts to grow but flips back to zero and starts to grow again. This repeats several times and finally quits with the error message "undefined error" - then the progress bar is full. No video is starting to be converted by ffmpeg, no result at all. VERY disappointing!
Hi,
You still need increase your php configuration, its seems your server still cant handle the FFMPEG converting which I get Internal Server Error on cron job, indeed you need lot of ram for it, especially to convert mp4 files.
I suggest you to use s3 amazon storage for this and use zencoder as well.. I think that is the one of the solutions.
thank you
I gave 4GB of ram to the scripts now - same behaviour. No change at all - and a video of round about 85 MB is not too big.
And the upload with the flipping back progress bar has nothing to do with this, too. As I already mentioned - I use a asset management tool, that works with big images and videos, too - works with ffmpeg in all sizes and formats as a charm. And I would really like to prevent using external services to store confidential business information.
By the way -if the upload is finished, the video gets converted and all emails are sent to the group members - I think, the problem is not the server and not the memory.
I was able to fix a part of the issue as described above. When uploading a video it suddenly disappeared because the cron job ran into a timeout. The problem was not the timeout or the memory in the php.ini - it was a far too small value in the configuration of the webserver itself. I found that out by testing a lot of uploads and searching in the server logs for repeating errors... there I found one line:
"(104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server"
Searching the internet about this error lead me to the solution:
Hi Alexander,
Ah, seems your server is unstable when processing the large request, because my last test I could upload the file successfully, but failed to convert it.. seems you still need to tweak your server, anyway do you have professional sys-admin to help ? maybe you can consult with him for this matter.
thank you
Okay - I saw a warning in the server logs:
mod_fcgid: HTTP request length 134225920 (so far) exceeds MaxRequestLen (134217728)
Found a solution in the web:
Then open your Apache vhost configuration and add the FcgidMaxRequestLen directive with a big enough value (in bytes), for example
FcgidMaxRequestLen 2000000
This value is on different places:
I added to the following definitions to the .htaccess file:
AddType audio/aac .aac
AddType audio/mp4 .mp4 .m4a
AddType audio/mpeg .mp1 .mp2 .mp3 .mpg .mpeg
AddType audio/ogg .oga .ogg
AddType audio/wav .wav
AddType audio/webm .webm
AddType video/mp4 .mp4 .m4v
AddType video/ogg .ogv
AddType video/webm .webm
The cron job gives be a report as follows:
<messages><message>Could not convert video</message><message>No temporary videos to delete.</message><message>No files to transfer.</message><message>No Videos to transfer.</message><message>No avatars or cover of users needed to be transferred</message><message>No avatars or cover of groups needed to be transferred</message><message>No avatars or cover of events needed to be transferred</message><message>Removed Pending Invitation for Past Event</message></messages>