I just tried to post a video on my timeline, but when it posted, there was no video. Is it possible to upload videos? Do I have to adjust settings somewhere in order to enable videos to be uploaded? What is wrong?
Thanks!
Use the Html attribute to play the video here is a link to how it operates.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video
UPDATE:
I overthought the issue in my last post.
The bug is in add.php:
$extension = $file->getFileExtension($_FILES['video']['name']);
My AVI file was all caps, so I fixed the comparison by correcting for case:
$extension = strtolower($file->getFileExtension($_FILES['video']['name']));
The issue with FFMPEG failing on the AVI still occured.
Hello,
I just got my premium license and was messing around with the new features.
When playing with the Video Component I noticed that AVI files were not uploading. I found this strange because, although I was initially suspicious that there was something wrong with my server configuration, I noticed MP4 files were working. Upload form states that it will accept: .3gp, .mov, .avi, .wmv, .mp4
I opened up the code to track down the issue, and believe I found it in Video.php on lines 61-68:
/////////////////////////////////////
$this->file->setMimeTypes(array(
'mp4' => array('video/mp4'),
'mov' => array('video/mpeg', 'video/quicktime'),
));
$this->file->setExtension(array(
'mp4',
'mov'
));
/////////////////////////////////////
This code is only allowing MP4 and MOV files through the filter. I manually added ‘AVI’ to these arrays and it appeared to fix the issue, however, the video would not play. I inspected the file in the ossn_data folder using FFMPEG and saw that it had the same codec as the original upload file.
I added several more logs and realized that the command to convert the input file to H264 in the static convert method is never executed (line 317).
/////////////////////////////////////
$command = "{$converter}{$binfile} -i {$source} -vcodec libx264 -profile:v baseline -level 3 {$newfile} 1> {$progress} 2>&1";
/////////////////////////////////////
I decided to manually run this command against my uploaded file and still got an error:
[libx264 @ 0x563f20b38200] Error setting profile baseline.
[libx264 @ 0x563f20b38200] Possible profiles: baseline main high high10 high422 high444
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
So even if this command had run, it wouldn’t have worked on my video file. I was able to get it to work by tweaking the command to be:
$command = "{$converter}{$binfile} -i {$source} -vcodec libx264 -level 3 {$newfile} 1> {$progress} 2>&1";
So, to recap: the uploader doesn’t allow the advertised file formats (only permitting MOV and MP4), FFMPEG doesn’t execute against the file to convert it to a streamable format, and even it FFMPEG did run my file would have errored.
I can fix this in the source code on my server, however, an upgrade would wipe my patch out, so I wanted to bring this to attention.
for those looking for a "free alternative" - I would suggest just uploading your video to youtube (or one of the other sites that OSSN supports embedding for) and then paste the url in the post box. It should automatically create an embedded player for the content. I recognize that isn't quite the same as you need to upload your video to a 3rd party site, but I think that's the closest thing possible.
just to add the download page:
Ffmpeg is always free utlility you can install on your OS, its just your hosting provider that didn't have this option!
This might be a weird question, but is there a free ffmpeg solution that we can use with ossn? like a ffmpeg service?
you won't be able to use the Video component without having ffmpeg installed and working.
Arsalan,
I have my OSSN Network on a shared hosting plan that does not include ffmpeg features, i also have the v5.0 of the OSSN Network, if i pay for and download this video-upload component will it still work? Or do i need to upgrade my hosting service to a private one with ffmpeg features?
It make sense because the wall photos icon didn't allow to upload videos its only to upload photo.
You may see : https://www.softlab24.com/product/view/34/videos-upload
Due to the many requests in the past for additonal features and components we have decided to develope a premium version. Features like Hashtags, Videos, Polls, Events, Stories, Link Preview, etc included in it.
$199 (Life Time)