
Recherche avancée
Autres articles (98)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 0.2 est la première version de MediaSPIP stable.
Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...) -
MediaSPIP Core : La Configuration
9 novembre 2010, parMediaSPIP Core fournit par défaut trois pages différentes de configuration (ces pages utilisent le plugin de configuration CFG pour fonctionner) : une page spécifique à la configuration générale du squelettes ; une page spécifique à la configuration de la page d’accueil du site ; une page spécifique à la configuration des secteurs ;
Il fournit également une page supplémentaire qui n’apparait que lorsque certains plugins sont activés permettant de contrôler l’affichage et les fonctionnalités spécifiques (...) -
MediaSPIP version 0.1 Beta
16 avril 2011, parMediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)
Sur d’autres sites (5546)
-
ffmpeg transcode to live stream
14 septembre 2016, par brayancastropI need to display a ip camera stream in an html video tag, i have figured out how to transcode to a file from the rtsp stream like this
ffmpeg -i "rtsp://user:password@ip" -s 640x480 /tmp/output.mp4
now i need to be able to be able to live stream the rtsp input in a video tag like this
<video src="http://domain:port/output.mp4" autoplay="autoplay"></video>
I was trying to do something like this in my server (an ubuntu micro instance on amazon) in order to reproduce the video in the video tag but didn’t work
ffmpeg -i "rtsp://user:password@ip" -s 640x480 http://localhost:8080/stream.mp4
instead i got this log
[tcp @ 0x747b40] Connection to tcp://localhost:8080 failed: Connection refused
http://localhost:8080/stream.mp4: Connection refusedi don’t really understand what’s happening, not sure if it’s sending the output to that url or serving the output there and this, i’ve been checking the ffmpeg man docs but i didn’t find any example related to this use case and also other questiones like this one FFmpeg Stream Transcoding which is similar to my last try without success
btw, this is the camera i’m using DS-2CD2020F-I(W) - http://www.hikvision.com/en/Products_accessries_157_i5847.html
they offer an httppreview but it’s just an img tag source which updates but appears to be unstableThis is my first time trying to do something like this so any insight about how to achieve it will be really usefull and appreciated
-
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



-
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.