
Recherche avancée
Autres articles (25)
-
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Déploiements possibles
31 janvier 2010, parDeux types de déploiements sont envisageable dépendant de deux aspects : La méthode d’installation envisagée (en standalone ou en ferme) ; Le nombre d’encodages journaliers et la fréquentation envisagés ;
L’encodage de vidéos est un processus lourd consommant énormément de ressources système (CPU et RAM), il est nécessaire de prendre tout cela en considération. Ce système n’est donc possible que sur un ou plusieurs serveurs dédiés.
Version mono serveur
La version mono serveur consiste à n’utiliser qu’une (...) -
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 (4719)
-
NVIDIA Version Outdated Error when mine is updated
21 février 2021, par Agent MerlotI'm trying to encode stuff with my NVIDIA GeForce MX150 (Driver Version : 461.09).


import os

os.system(f'ffmpeg -i "Cells at Work Season 2 - Episode 07 - English Subbed.mp4" -c:a copy -c:v hevc_nvenc "07.mp4"')


Whenever I'm trying to run it, I'm getting this error.


[hevc_nvenc @ 0000017a8bdf7e40] Cannot load nvEncodeAPI64.dll

[hevc_nvenc @ 0000017a8bdf7e40] The minimum required Nvidia driver for nvenc is 436.15 or newer

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!


What bugs me is that it says that I need 436.15 or newer, and mine is 461.09. That means it should work, right ? Can anyone help ?


-
FFmpeg Throwing Up Error After Concat Attempt [closed]
8 mai 2021, par OrdinaryCarrot16I am trying to convert my DVDs using FFmpeg, while doing additional filtering and concatenation. The script I am making is very WIP, but it isn't working at the moment. It throws up the error : "No such filter : ''
Error initializing complex filters.
Invalid argument"


Am I using the correct syntax ?


:: Generate dummy file with blank video & audio streams (for spacing out portions when concating)
ffmpeg -y -f lavfi -i color=size=720x480:color=black:rate=30 -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -c:a aac -c:v libx264 -t 1 spacer_1_tmp.mkv
ffmpeg -y -f lavfi -i color=size=720x480:color=black:rate=30 -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=44100 -c:a aac -c:v libx264 -t 2 spacer_2_tmp.mkv

:: Extract intro
ffmpeg -y -avoid_negative_ts make_non_negative -ss 00:00:01 -to 00:00:24.900 -i "ADVENTURE TIME SEASON 1 DISC 1_t00.mkv" -c:v libx264 -crf 8 -preset veryfast -c:a aac -b:a 192k intro_tmp.mkv

:: Extract title card, episode, and credits
ffmpeg -y -avoid_negative_ts make_non_negative -ss 00:00:25.850 -to 00:00:32.500 -i "ADVENTURE TIME SEASON 1 DISC 1_t00.mkv" -c:v libx264 -crf 8 -preset veryfast -c:a aac -b:a 192k title_card_tmp.mkv
ffmpeg -avoid_negative_ts make_non_negative -ss 00:00:32.900 -to 00:11:16.950 -i "ADVENTURE TIME SEASON 1 DISC 1_t00.mkv" -c:v libx264 -crf 8 -preset veryfast -c:a aac -b:a 192k episode_tmp.mkv
ffmpeg -y -avoid_negative_ts make_non_negative -ss 00:11:17.950 -to 00:11:50.900 -i "ADVENTURE TIME SEASON 1 DISC 1_t00.mkv" -c:v libx264 -crf 8 -preset veryfast -c:a aac -b:a 192k credits_tmp.mkv

:: Merge all extracted components and encode into final video
ffmpeg -i spacer_1_tmp.mkv -i intro_tmp.mkv -i spacer_2_tmp.mkv -i title_card_tmp.mkv -i spacer_2_tmp.mkv -i episode_tmp.mkv -i spacer_2_tmp.mkv -i credits_tmp.mkv -i spacer_1_tmp.mkv -filter_complex "[0:0]setsar=1[v1];[0:1][a1];[1:0]setsar=1[v2];[1:1][a2];[2:0]setsar=1[v3];[2:1][a3];[3:0]setsar=1[v4];[3:1][a4];[4:0]setsar=1[v5];[4:1][a5];[5:0]setsar=1[v6];[5:1][a6];[6:0]setsar=1[v7];[6:1][a7];[7:0]setsar=1[v8];[7:1][a8];[8:0]setsar=1[v9];[8:1][a9];[v1][v2][v3][v4][v5][v6][v7][v8][v9][a1][a2][a3][a4][a5][a6][a7][a8][a9]concat=n=9:v=1:a=1[fv][fa]" -map "[fv]" -map "[fa]" -c:v libx264 -crf 20 -c:a aac -b:a 160k "Slumber Party Panic (S01E02).mp4"

pause



-
Why does File upload for moving image and Audio to tmp PHP folder work on Windows but only image upload portion works on Mac using MAMP ?
31 mai 2021, par YazdanSo according to my colleague who tested this on Windows says it works perfectly fine , but in my case when I use it on a Mac with MAMP for Moodle , the image files get uploaded to the correct destination folder without an issue whereas the audio files don't move from the tmp folder to the actual destination folder and to check if this was the case ... I just changed and gave a fixed path instead of
$fileTmpLoc
and the file made it to the correct destination. Sorry I know the first half of the code isn't the main issue but I still wanted to post the whole code so one could understand it easily, moreover I am just beginning to code so please "have a bit of patience with me" . Thanks in advance


// this file contains upload function 
// checks if the file exists in server
include("../db/database.php");
require_once(dirname(__FILE__) . '/../../../config.php');
global $IP;

$ajaxdata = $_POST['mediaUpload'];

$FILENAME = $ajaxdata[1];
$IMAGE=$ajaxdata[0];
// an array to check which category the media belongs too
$animal= array("bird","cat","dog","horse","sheep","cow","elephant","bear","giraffe","zebra");
$allowedExts = array("mp3","wav");
$temp = explode(".", $_FILES["audio"]["name"]);
$extension = end($temp);



$test = $_FILES["audio"]["type"]; 


if (
 $_FILES["audio"]["type"] == "audio/wav"||
 $_FILES["audio"]["type"] == "audio/mp3"||
 $_FILES["audio"]["type"] == "audio/mpeg"
 &&
 in_array($extension, $allowedExts)
 )
 {

 // if the name detected by object detection is present in the animal array
 // then initialize target path to animal database or to others
 if (in_array($FILENAME, $animal)) 
 { 
 $image_target_dir = "image_dir/";
 $audio_target_dir = "audio_dir/";
 } 
 else
 { 
 $image_target_dir = "other_image_dir/";
 $audio_target_dir = "other_audio_dir/";
 } 
 // Get file path
 
 $img = $IMAGE;
 // decode base64 image
 $img = str_replace('data:image/png;base64,', '', $img);
 $img = str_replace(' ', '+', $img);
 $image_data = base64_decode($img);

 //$extension = pathinfo( $_FILES["fileUpload"]["name"], PATHINFO_EXTENSION ); // jpg
 $image_extension = "png";
 $image_target_file =$image_target_dir . basename($FILENAME . "." . $image_extension);
 $image_file_upload = "http://localhost:8888/moodle310/blocks/testblock/classes/".$image_target_file;
 
 
 $audio_extension ="mp3";
 $audio_target_file= $audio_target_dir . basename($FILENAME. "." . $audio_extension) ;
 $audio_file_upload = "http://localhost:8888/moodle310/blocks/testblock/classes/".$audio_target_file;

 // file size limit
 if(($_FILES["audio"]["size"])<=51242880)
 {

 $fileName = $_FILES["audio"]["name"]; // The file name
 $fileTmpLoc = $_FILES["audio"]["tmp_name"]; // File in the PHP tmp folder
 $fileType = $_FILES["audio"]["type"]; // The type of file it is
 $fileSize = $_FILES["audio"]["size"]; // File size in bytes
 $fileErrorMsg = $_FILES["audio"]["error"]; // 0 for false... and 1 for true
 
 if (in_array($FILENAME, $animal)) 
 { 
 $sql = "INSERT INTO mdl_media_animal (animal_image_path,animal_name,animal_audio_path) VALUES ('$image_file_upload','$FILENAME','$audio_file_upload')";
 } else {
 $sql = "INSERT INTO mdl_media_others (others_image_path,others_name,others_audio_path) VALUES ('$image_file_upload','$FILENAME','$audio_file_upload')";
 }

 // if file exists
 if (file_exists($audio_target_file) || file_exists($image_target_file)) {
 echo "alert";
 } else {
 // write image file
 if (file_put_contents($image_target_file, $image_data) ) {
 // ffmpeg to write audio file
 $output = shell_exec("ffmpeg -i $fileTmpLoc -ab 160k -ac 2 -ar 44100 -vn $audio_target_file");
 echo $output;
 
 // $stmt = $conn->prepare($sql);
 $db = mysqli_connect("localhost", "root", "root", "moodle310"); 
 // echo $sql;
 if (!$db) {
 echo "nodb";
 die("Connection failed: " . mysqli_connect_error());
 }
 // echo"sucess";
 if(mysqli_query($db, $sql)){
 // if($stmt->execute()){
 echo $fileTmpLoc;
 echo "sucess"; 
 echo $output;
 }
 else {
 // echo "Error: " . $sql . "<br />" . mysqli_error($conn);
 echo "failed";
 }

 }else {
 echo "failed";
 }

 
 
 
 }
 
 // $test = "ffmpeg -i $outputfile -ab 160k -ac 2 -ar 44100 -vn bub.wav";
 } else
 {
 echo "File size exceeds 5 MB! Please try again!";
 }
}
else
{
 echo "PHP! Not a video! ";//.$extension." ".$_FILES["uploadimage"]["type"];
 }

?>



I am a student learning frontend but a project of mine requires a fair bit of backend. So forgive me if my question sounds silly.


What I meant by manually overriding it was creating another folder and a index.php file with
echo "hello"; $output = shell_exec("ffmpeg -i Elephant.mp3 -ab 160k -ac 2 -ar 44100 -vn bub.mp3"); echo $output;
so only yes in this caseElephant.mp3
was changed as the initial tmp path so in this case as suggested by Mr.CBroe the permissons shouldn't be an issue.

Okay I checked my
Apache_error.log
only to find out ffmpeg is indeed the culprit ... I had installedffmpeg
globally so I am not sure if it is an access problem but here is a snippet of the log

I checked my php logs and found out that
FFmpeg
is the culprit.
Attached is a short log file

[Mon May 31 18:11:33 2021] [notice] caught SIGTERM, shutting down
[Mon May 31 18:11:40 2021] [notice] Digest: generating secret for digest authentication ...
[Mon May 31 18:11:40 2021] [notice] Digest: done
[Mon May 31 18:11:40 2021] [notice] Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/1.0.2o PHP/7.2.10 configured -- resuming normal operations
sh: ffmpeg: command not found
sh: ffmpeg: command not found
sh: ffmpeg: command not found