
Recherche avancée
Autres articles (67)
-
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 -
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)
Sur d’autres sites (8653)
-
avcodec/ilbcdec : Remove dead code
9 mai 2024, par Michael Niedermayer -
How do I remove ffmpeg video watermark code ?
26 juillet 2019, par D. MessierTrying to remove the code that adds a watermark to some of our videos, but can’t find the correct solution
Working with pre-existing code. I am unfamiliar with Bash and ffmpeg. We are trying to remove the code that adds a watermark to certain videos. There are plenty of examples on how to add the watermark. But using them to figure out how to remove it has been unsuccessful.
Original Code
FFREPORT=file=$folder/ffmpeg.log:level=40 ~/tools/ffmpeg/ffmpeg -ss $startTime -i $folder/0 -i assets/watermark.png -filter_complex "[0:v]scale='if(gt(iw,ih),$size1w,trunc(oh*a/2)*2)':'if(gt(iw,ih),trunc(ow/a/2)*2,$size1h)'[bg];[bg][1:v]overlay=20:(main_h-overlay_h-20),split=5[in1][in2][in3][in4][in5];[in1]scale='if(gt(iw,ih),$size1w,trunc(oh*a/2)*2)':'if(gt(iw,ih),trunc(ow/a/2)*2,$size1h)'[out1];[in2]scale='if(gt(iw,ih),$size2w,trunc(oh*a/2)*2)':'if(gt(iw,ih),trunc(ow/a/2)*2,$size2h)'[out2];[in3]scale='if(gt(iw,ih),$size3w,trunc(oh*a/2)*2)':'if(gt(iw,ih),trunc(ow/a/2)*2,$size3h)'[out3];[in4]scale='if(gt(iw,ih),$size4w,trunc(oh*a/2)*2)':'if(gt(iw,ih),trunc(ow/a/2)*2,$size4h)'[out4];[in5]scale='if(gt(iw,ih),$size4w,trunc(oh*a/2)*2)':'if(gt(iw,ih),trunc(ow/a/2)*2,$size4h)'[out5]" \
Attempted Change
I removed
-i assets/watermark.png
and[bg];[bg][1:v]overlay=20:(main_h-overlay_h-20),
FFREPORT=file=$folder/ffmpeg.log:level=40 ~/tools/ffmpeg/ffmpeg -ss $startTime -i $folder/0 -filter_complex "[0:v]scale='if(gt(iw,ih),$size1w,trunc(oh*a/2)*2)':'if(gt(iw,ih),trunc(ow/a/2)*2,$size1h)';split=5[in1][in2][in3][in4][in5];[in1]scale='if(gt(iw,ih),$size1w,trunc(oh*a/2)*2)':'if(gt(iw,ih),trunc(ow/a/2)*2,$size1h)'[out1];[in2]scale='if(gt(iw,ih),$size2w,trunc(oh*a/2)*2)':'if(gt(iw,ih),trunc(ow/a/2)*2,$size2h)'[out2];[in3]scale='if(gt(iw,ih),$size3w,trunc(oh*a/2)*2)':'if(gt(iw,ih),trunc(ow/a/2)*2,$size3h)'[out3];[in4]scale='if(gt(iw,ih),$size4w,trunc(oh*a/2)*2)':'if(gt(iw,ih),trunc(ow/a/2)*2,$size4h)'[out4];[in5]scale='if(gt(iw,ih),$size4w,trunc(oh*a/2)*2)':'if(gt(iw,ih),trunc(ow/a/2)*2,$size4h)'[out5]" \
The error I’m getting is "Cannot find a matching stream for unlabeled input pad 0 on filter Parsed_split_1"
-
AJAX won't execute all of the php code
27 septembre 2016, par hermanboy07I want a progressbar to be shown while a video-file is being uploaded. I’m using JS and AJAX to track progress of the file-upload php, and send the file. The php file contains a ffmpeg command that grabs some frames from the video. Essentially the php file creates a random folder, and puts both the video and the frames in it. when the php is called by
if(isset($_FILES['file']))
it works just fine. But when i try to use AJAX it only uploads the video, but ignores the ffmpeg command and mysql_query.Javascript :
function uploadFile(){
var file = _("file1").files[0];
var formdata = new FormData();
formdata.append("file1", file);
var ajax = new XMLHttpRequest();
ajax.upload.addEventListener("progress", progressHandler, false);
ajax.open("POST", "upload.php");
ajax.send(formdata);Upload.php
$name = $_FILES['file1']['name'];
$type = explode(".",$name);
$type = end($type);
$tmp = $_FILES['file1']['tmp_name'];
$uploadOk = 1;
$exp = explode(".",$name);
$filename = rand().$exp[0];
$path = "videos/" . $filename . "/" . $name;
$ffmpeg = "/usr/local/bin/ffmpeg";
$size = "320x180";
if($type != 'mp4' && $type != 'MP4'){
$message = "Only mp4 format is supported!";
$uploadOk = 0;
}else{
mkdir("videos/".$filename);
// ffmpeg function
for($num = 1; $num <= 15; $num++){
$interval = $num * 3;
shell_exec("$ffmpeg -i $tmp -an -ss $interval -s $size /videos/$filename/thumb$num.png");}
move_uploaded_file($tmp, $path);
mysql_query("INSERT INTO table (name, url) VALUES('$name', '$path')");Why dosen’t AJAX execute the complete php ?