
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (22)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (7466)
-
Is there any way that I can speed up the ffmpeg processing time
20 mai 2020, par Ahmed Al-RayanI am facing a problem with the processing process. I use a real joint server in a digital hosting package of $ 10 and use cloud service from Amazon s3. The problem is when uploading a video, whatever the size of the video, whether its size is 1 megabyte or 2 Giga. After the upload process, the processing process starts to upload, there is no problem But when the processing process takes a very long time so that I cannot complete it, what is the solution to that, is there a problem for me or is this process normal ?
 I use laravel-ffmpeg and through laravel queue I am cutting the video into several qualities I will attach the code to you below.



public function handle()
{
 //180p
 $lowBitrate1 = (new X264('aac'))->setKiloBitrate(613);
 //270p
 $lowBitrate2 = (new X264('aac'))->setKiloBitrate(906);
 //360p
 $midBitrate1 = (new X264('aac'))->setKiloBitrate(1687);
 //540p
 $midBitrate2 = (new X264('aac'))->setKiloBitrate(2227);
 //720p
 $highBitrate1 = (new X264('aac'))->setKiloBitrate(4300);
 //1080
 $highBitrate2 = (new X264('aac'))->setKiloBitrate(7917);

FFMpeg::fromDisk('s3')
 ->open($this->movie->path)
 ->exportForHLS()
 ->onProgress(function ($percent) {
 $this->movie->update([
 'percent' => $percent
 ]);
 })
 ->setSegmentLength(10)// optional
 ->addFormat($lowBitrate1)
 ->addFormat($lowBitrate2)
 ->addFormat($midBitrate1)
 ->addFormat($midBitrate2)
 ->addFormat($highBitrate1)
 ->addFormat($highBitrate2)
 ->toDisk('s3')
 ->save("public/Movies/{$this->movie->id}/{$this->movie->id}.m3u8");
}//end of handle



-
Evolution of Multimedia Fiefdoms
1er octobre 2014, par Multimedia Mike — GeneralI want to examine how multimedia fiefdoms have risen and fallen through the years.
Back in the day, the multimedia fiefdoms were built around the formats put forth by competing companies : there was Microsoft/WMV, Apple/MOV, and Real/RM as the big contenders. On2 always wanted to be a player in this arena but could never quite catch a break. A few brave contenders held the line for open source and also for the power users who desired one application that could handle everything (my original motivation for wanting to get into multimedia hacking).
The computer desktop was the battleground for internet-based media stream. Whatever happened to those days ? Actually, if memory serves, Flash-based video streaming stepped on all of them.
Over the last 6-7 years, the battleground has expanded to cover mobile devices, where Flash’s impact has… lessened. During this time, multimedia technology pretty well standardized on a particular stack, namely, the MPEG (MP4/H.264/AAC) stack.
The belligerents in this war tried for years to effectively penetrate new territory, namely, the living room where the television lived. This had been slowgoing for years due to various user interface and content issues, but steadily improved.
Last April, Amazon announced their entry into the set-top box market with the Fire TV. That was when it suddenly crystallized for me that the multimedia ecosystem has radically shifted. Now, the multimedia fiefdoms revolve around access to content via streaming services.
Off the top of my head, here are some of the fiefdoms these days (fiefdoms I have experience using) :
- Netflix (subscription streaming)
- Amazon (subscription, rental, and purchased streaming)
- Hulu Plus (subscription streaming)
- Apple (rental and purchased media)
I checked some results on Can I Stream.It ? (which I refer to often) and found a bunch more streaming fiefdoms such as Google (both Play and YouTube, which are separate services), Sony, Xbox 360, Crackle, Redbox Instant, Vudu, Target Ticket, Epix, Sony, SnagFilms, and XFINITY StreamPix. And surely, these are probably just services available in the United States ; I know other geographical regions have their own fiefdoms.
What happened ?
When I got into multimedia hacking, there were all these disparate, competing ecosystems. As a consumer, I didn’t care where the media came from, I just wanted to play it. That’s what inspired me to work on open source multimedia projects. Now I realize that I have the same problem 10-15 years later : there are multiple competing ecosystems. I might subscribe to fiefdoms X and Y, but am frustrated to learn that something I’d like to watch is only available through fiefdom Z. Very few of these fiefdoms can be penetrated using open source technology.
I’m not really sure about the point about this whole post. Multimedia technology seems really standardized these days. But that’s probably just my perspective because I have spent way too long focusing on a few areas of multimedia technology such as audio and video coding. It’s interesting that all these services probably leverage the same limited number of codecs. Their differentiation comes from the catalog of content that each is able to license for streaming. There are different problems to solve in the multimedia arena now.
-
PHP : Convert file with FFMPEG and upload to S3 using shell_exec() and aws cli tools
18 septembre 2017, par andreaemI need a script that handle the upload of a video file from
dropzone.js
, convert tom4v
then generate 5 thumbnails using the name of file appending-(number)
to each jpg file (eg :file-1.jpg
,file-2.jpg
,file-3.jpg
etc) and finally upload to s3 using shell_script (or maybe if there is a better way to do this).Recap
- Upload file in a temp dir
- Convert file to
.m4v
- Generate 5 thumbnails from video
- Upload the converted video to Amazon S3
- Delete local video file
Here is my code, at the moment I don’t know where the file goes and nothing seems to be uploaded to Amazon S3 (doing the upload in command-line works, so the credentials are ok).
Dropzone.js
$("#dZUpload").dropzone({
url: "/ajax/admin/admin.acceptVideo.php",
maxFilesize: 200,
renameFile: new Date,
acceptedFiles: "video/*",
addRemoveLinks: true,
success: function (file, response) {
var imgName = response; file.previewElement.classList.add("dz-success");
console.log("Successfully uploaded :" + imgName);
$('#form_video').val(file);
},
error: function (file, response) {file.previewElement.classList.add("dz-error");
}
}).autoDiscover = false;
Dropzone.prototype.defaultOptions.dictRemoveFile = "Rimuovi file";
Dropzone.on("addedfile", function(file) {
var cancelLink = Dropzone.createElement('<a>Cancel upload</a>');
file.previewElement.appendChild(cancelLink);
cancelLink.addEventListener("click", function(e) {
e.preventDefault();
myDropzone.cancelUpload(file);
});
});PHP
$target_dir = "/var/www/html/example.com/web/temp/";
$target_file = $target_dir . basename($_FILES["file"]["name"]);
$uploadOk = 1;
$imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
// Check if image file is a actual image or fake image
if(isset($_POST["submit"])) {
$check = getimagesize($_FILES["file"]["tmp_name"]);
if($check !== false) {
echo "File is a video - " . $check["mime"] . ".";
$uploadOk = 1;
} else {
echo "File is not an image.";
$uploadOk = 0;
}
}
// Check if file already exists
if (file_exists($target_file)) {
echo "Sorry, file already exists.";
$uploadOk = 0;
}
// Check file size
if ($_FILES["fileToUpload"]["size"] > 200000000) {
echo "Sorry, your file is too large.";
$uploadOk = 0;
}
// Allow certain file formats
if($imageFileType != "mp4" && $imageFileType != "mov" && $imageFileType != "avi" && $imageFileType != "m4v" ) {
echo "Sorry, only MP4 MOV AVI M4V files are allowed.";
$uploadOk = 0;
}
// Check if $uploadOk is set to 0 by an error
if ($uploadOk == 0) {
echo "Sorry, your file was not uploaded.";
// if everything is ok, try to upload file
} else {
if (move_uploaded_file($_FILES["file"]["tmp_name"], $target_file)) {
S3Up(VideoConvert(basename( $_FILES["file"]["name"]),random_int('1','9999')));
echo "The file ". basename( $_FILES["file"]["name"]). " has been uploaded.";
} else {
echo "Sorry, there was an error uploading your file.";
}
}
function VideoConvert($video, $id) {
shell_exec('ffmpeg -i ' . $video . ' /var/www/html/example.com/web/temp/' . $id . '.m4v');
for ($i=0;$i <= 5;$i++) {
shell_exec('ffmpeg -i ' . $video .' -vf "select=gte(n\,' . $i .'00)" -vframes 1 ' .$id . '-' . $i. '.jpg');
}
return '/var/www/html/example.com/web/temp/' . $id . '.m4v';
}
function S3Up($video) {
shell_exec('aws s3 cp ' . $video .' s3://example-video/ --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers');
sleep(1);
//shell_exec('rm '. $video);
}Here is my error.log line relating to s3 upload :
error.log
example.mp4: No such file or directory
Traceback (most recent call last):
File "/usr/local/bin/aws", line 19, in <module>
import awscli.clidriver
File "/usr/local/lib/python2.7/dist-packages/awscli/clidriver.py", line 17, in <module>
import botocore.session
File "/usr/local/lib/python2.7/dist-packages/botocore/session.py", line 26, in <module>
import botocore.credentials
File "/usr/local/lib/python2.7/dist-packages/botocore/credentials.py", line 22, in <module>
from dateutil.parser import parse
ImportError: No module named dateutil.parser
</module></module></module></module>How can I improve this ? I’ve tried using aws php api but got some problems with credentials, cli tools don’t have.
Behavior
At the moment
dropzone.js
stop uploading at 50% if I put a file of 8 MB, php maxUploadSize directive is set to 201M, php upload temp folder is inside the site root directory and permissions set to 7777. File where uploaded if I put a smallest file of 200Kb but don’t convert and make a 0 byte file.