• 3789
  • More

Video Uploads not working on own server.

I did read other topics that are having issues with the video uploads, here is my findings on this problem.

Server 1

[libx264 @ 0x68a0b40] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 AVX512 

Video uploads tests:

  • MOV Uploaded from iPhone. FAILED
  • MP4 Uploaded from Android. FAILED
  • MP4 Uploaded from PC (downloaded from internet). SUCCESS

This is one of my customer's server. Intel Xeon Processor (Skylake, IBRS) 1 Core

Server 2

[libx264 @ 0x6879400] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2

Video uploads tests:

  • MOV Uploaded from iPhone. SUCCESS
  • MP4 Uploaded from Android. SUCCESS
  • MP4 Uploaded from PC (downloaded from internet). SUCCESS

This is my testing server. CPU Intel(R) Xeon(R) Gold 6140 CPU 1 Core


Differences:

    It is trying to use AVX512 of cpu from "Server 1" to convert files and it FAILS. My testing server does not include this capability so it is not trying to use that, all videos are uploaded and converted with no issues.

IMPORTANT:  The videos from Android and iOS were taken with the camera and uploaded from the respective devices, but I did test uploading the original videos (MOV and MP4) from the PC and it failed encoding too, so it does not matter from where I upload the files.


Recommendations to try to fix this:

  1.     Alternative 1 Compile ffmpeg without AVX512 support and replace the file from 
  2.     Alternative 2 Install ffmpeg from the source, change route to ffmpeg (BX_SYSTEM_FFMPEG) to only 'ffmpeg' on file 'inc/header.inc.php'

    None of this recommendations has been tested. Do it on your own risk if you know how. I won't provide tutorials for it neither support if something gets broken.

    My Customers who are hosted on UNA Cloud, have not reported this issue to me at the date that this was posted, I think this only affects certain newest CPUs.

    

If one of this recommendations works for you please comment your results, including your server's hardware specs, operative system name/version. This way we can help others who may have the same issue.

UPDATE:

I originally tough that this was a problem with the cpu capabilities, now that I could fix the issue in the My Customer's server, I found out that his problem was other.

When trying to run the ffmpeg to convert MOV file to MP4 directly in the ssh console, the error was:

Error while opening decoder for input stream #0:0 : Resource temporarily unavailable

So it turns out that the server is trying to convert the video using resources that are not available, in this case it means that is trying to use more than 1 core in his server, while in my server the video is converted with no issues with the same command. So, here is what I did to fix it.

Set the number of threads that I want that ffmpeg use. In my case, I have a Video Watermark module, in which I did add the threads limit into the code in the php files to only 1 core.

Once the module is enabled for watermarking videos, those videos can be converted with no issues. I will release a new update of my Watermarks Module soon that will include this fix.

I think that UNA Team should be adding a way to set the threads limit in Studio to avoid this issues with this servers.

This topic was posted for UNA version 11 and below, new versions may already fixed this issue if the UNA Team fix it.

MSolutions.

💓 0 😆 0 😲 1 😥 0 😠 0 0
Replies (10)
    Not logged in users can't 'Comments Post'.
    MSolutions
    •  ·  Premium
    • 4139 views
    • 8 votes
    • More
    Experienced developer building Amazing Stuff as Freelancer since 10 years ago.I'm making quality APPs/Modules for UNA, follow me to get notified when …
    4
    2
    1
    2
    2