Ffmpeg list located and uploads work but the video does not play or buffer?

Mark Lashmar Posted in Performance and Scalability 2 weeks ago

Hi team,
I have recently upgraded my ossn to a VPS server and all is working fine just one small detail is bothering me
The FFMPEG is loaded, all works well except when it comes to playback.
The video does not play. Could you give me an indication what I need to do, please.
At times I get an error message "error loading his resource"
Thanks
Mark

Replies
German ~Z~ Man Replied 2 days ago

What still makes me wonder:
In the beginning you said you migrated your complete site.
And since you were able to upload and play videos with your former site without problems there MUST be videos in the data directory.

Now you say: "I checked the data folder and could not find anything in the sub directory Objects that matches the video. Over 10k folders."

So, either you didn't really migrate correctly or you did not search correctly.

Talking about my site, running a find . -name "*mp4*" in the ossn_data/object directory gives

./645/video/file/5a970d2f94fa88d16dd245a161caa568.mp4

and if your migration is okay, you should see a lot of lines like that. So please verify again.

German ~Z~ Man Replied 3 days ago

Hello Mark,
my first candidate to check would be ffmpeg, because there are several versions around, some not working at all, some are missing necessary codecs, etc...
So, the idea is running ffmpeg manually from the command line the same way as Ossn would do.
Let's use a simple input video for testing,
I'd recommend to use the file video.mp4 which comes with the VideoBackground component.
So unzip that component locally and upload video.mp4 to your home directory on the server ...
(/home/mark) or where ever it is located.
Next, login via ssh, proceed to your home directory and run ls -l to verify that video.mp4 is there.
Now, try converting video.mp4 manually with the command

/usr/local/bin/ffmpeg -i ./video.mp4 -vcodec libx264 -profile:v baseline -level 3 outfile.mp4

If everything is running smoothly, you should see the newly created file outfile.mp4 short time later,
if not, you may get any kind of error messages which would be of interest.

Zuang Mark Lashmar Replied 3 days ago

Morning Z
Yes that is the issue, the script is not actively creating the folder. I have checked the php scripts and find no fault. It seems that there is a server process that is causing this error. I am trouble shooting the server and when fault is found will post the results.
Thank for you assistance
Stay safe!

German ~Z~ Man Replied 4 days ago

Hmm,
I thought I just explained the mechanism.
If you see that number (in my example 645) in the url, there should be a corresponding subdirectory 645 in the objects directory, too. If not, it couldn't be created for some reason and you should find something helpful in your error_log

Zuang Mark Lashmar Replied 4 days ago

Hi Z
Thanks for the information. I checked the data folder and could not find anything in the sub directory Objects that matches the video. Over 10k folders. It did not write or store the video although it say it has been loaded successfully. I am going to check the video script to see where it is placing the videos so that I can narrow down the fault.
Thank you for your help.
Regards
Mark

German ~Z~ Man Replied 4 days ago

Okay Mark,
let's verify whether the video in question is playable in your browser at all ...
1. choose any video on your site and have a look at the corresponding url. it should look something like:

https://YOURSITE/video/view/645/VIDEONAME

Remember the number, in this example 645
2. Login to your VPS by FTP, SSH ... whatever ... and enter your OSSN data directory
3. Proceed to the subdirectory object/645/video/file
and you should find your video file, named something like 5a970d2f94fa88d16dd245a161caa568.mp4
4. open a new browser window and (according to my example) enter the following link

https://YOURSITE/video/file/645/YOUR_HEX_CODE.mp4

Actually, a link like that is what the player will receive.
So, if the browser will play the file flawlessly, we need to investigate further why the player is not able to fetch the resource...

Zuang Mark Lashmar Replied 4 days ago

Hi Arsalan

I have installed ossn on an linux CentOS7 server. The root is /usr/local/bin/ and ossn has found the ffmpeg.
When you upload the video video is loaded and converted but after success it will produce the thumbnail and the ossn media play is posted. However once you click on the video to play it will have a short loading icon then stop. In the left top hand corner the error message will appear. "error loading his resource" however the playbar loading will still be active only if the mouse is on the thumbnail
I have the latest Video version (video 5.7) as I updated the site with the premum 5.2 software.
I cannot find the reason why the video will not play. Busy checking the conf files to see if anything is not in place.
Thank you for your concern
Stay safe, Mark

Zuang Mark Lashmar Replied 2 weeks ago

Thanks Z I will ask the IP to fix the problem. I was not sure if there was a mistake on my side.
Thank you much appreciated for your assistance.

Mark

German ~Z~ Man Replied 2 weeks ago

Good I have asked,
because that means: you have a general problem with the server/player.
Ffmpeg is only involved in the uploading/converting process. And since your older videos have been converted already, they should play.
Honestly myself I'm not really firm with that component, but hopefully your log will help Arsalan to get an idea.

Zuang Mark Lashmar Replied 2 weeks ago

Hi there,
@ Z no they do not play. Error message as reported. I will enable the reporting and get the error message.
@ Arsalan its the linux path /usr/local/bin/ and the ffmpeg is found! "FFMPEG Binary found at /usr/local/bin/ffmpeg"
Thanks Guys