
Recherche avancée
Autres articles (104)
-
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 (...) -
Mise à disposition des fichiers
14 avril 2011, parPar défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...) -
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 (5033)
-
Want to crop video in 1:1 aspectration using ffmpeg but it gives error Working Directory : null Environment : null
14 septembre 2017, par MaheshI have used below command for crop video from originally captured by default camera. But when i was execute command it gives below error.
final String[] cmd={"-i", "/storage/emulated/0/DCIM/ZyfVideo/VID_20170914_153804.mp4","-s", "480x480" ,"-vf" ,"crop=480:480","setdar=1:1","setsar=1:1 ","/storage/emulated/0/Movies/SpoofApp/VDO_20170914_153811.mp4"};
Error Logcat :
09-14 15:38:11.874 3872-4039/com.spoof.app E/FFmpeg: Exception while trying to run: [Ljava.lang.String;@427ce088
java.io.IOException: Error running exec(). Command: [/data/data/com.spoof.app/files/ffmpeg, -i, /storage/emulated/0/DCIM/ZyfVideo/VID_20170914_153804.mp4, -s, 480x480, -vf, crop=480:480, setdar=1:1, setsar=1:1 , /storage/emulated/0/Movies/SpoofApp/VDO_20170914_153811.mp4] Working Directory: null Environment: null
at java.lang.ProcessManager.exec(ProcessManager.java:211)
at java.lang.Runtime.exec(Runtime.java:173)
at java.lang.Runtime.exec(Runtime.java:128)
at com.github.hiteshsondhi88.libffmpeg.ShellCommand.run(ShellCommand.java:10)
at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:38)
at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:10)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by: java.io.IOException: No such file or directory
at java.lang.ProcessManager.exec(Native Method)
at java.lang.ProcessManager.exec(ProcessManager.java:209)
at java.lang.Runtime.exec(Runtime.java:173)
at java.lang.Runtime.exec(Runtime.java:128)
at com.github.hiteshsondhi88.libffmpeg.ShellCommand.run(ShellCommand.java:10)
at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:38)
at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:10)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841) -
Laravel FFmpeg error ffprobe running command -show_streams -print_format json is not running How i can resolve it ?
12 octobre 2019, par Shahzad WarisI’m using laravel FFmpeg Package v4 to change the Dimension of the video.
This is my queue log.[2019-10-12 15:14:17] local.INFO : ffprobe running command
"C :/FFmpeg/bin/ffprobe.exe"
C :\wamp64\www\creamer\creamer\storage\app\public\videos1570870350.mp4
-show_streams -print_format json [2019-10-12 15:14:17] local.ERROR : ffprobe failed to execute command "C :/FFmpeg/bin/ffprobe.exe"
C :\wamp64\www\creamer\creamer\storage\app\public\videos1570870350.mp4
-show_streams -print_format json [2019-10-12 15:14:17] local.ERROR : Unable to probe
C :\wamp64\www\creamer\creamer\storage\app\public\videos1570870350.mp4
"exception" :"[object] (FFMpeg\Exception\RuntimeException(code : 0) :
Unable to probe
C :\wamp64\www\creamer\creamer\storage\app\public\videos1570870350.mp4
at
C :\wamp64\www\creamer\creamer\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\FFProbe.php:263,
Alchemy\BinaryDriver\Exception\ExecutionFailureException(code : 0) :
ffprobe failed to execute command \"C :/FFmpeg/bin/ffprobe.exe\"
C :\wamp64\www\creamer\creamer\storage\app\public\videos1570870350.mp4
-show_streams -print_format json at C :\wamp64\www\creamer\creamer\vendor\alchemy\binary-driver\src\Alchemy\BinaryDriver\ProcessRunner.php:100)
[stacktrace]0 C :\wamp64\www\creamer\creamer\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\FFProbe.php(206) :
FFMpeg\FFProbe->probe(’C :\wamp64\www\c...’, ’-show_streams’,
’streams’)1 C :\wamp64\www\creamer\creamer\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\FFMpeg.php(92) :
FFMpeg\FFProbe->streams(’C :\wamp64\www\c...’) [internal
function] : Illuminate\Queue\Console\WorkCommand->handle() 1 :
https://github.com/pascalbaljetmedia/laravel-ffmpeg?ref=madewithlaravel.comThis is Queue code :
namespace App\Jobs;
use App\Video;
use FFMpeg;
use FFMpeg\Coordinate\Dimension;
use FFMpeg\Format\Video\X264;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class ConvertVideoForDownloading implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public $video;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct(Video $v)
{
$this->video = $v;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
// create a video format...
$lowBitrateFormat = (new X264)->setKiloBitrate(500);
// open the uploaded video from the right disk...
FFMpeg::fromDisk('local')
->open('public\videos' . $this->video->videoLink)
// add the 'resize' filter...
->addFilter(function ($filters) {
$filters->resize(new Dimension(960, 540));
})
// call the 'export' method...
->export()
// tell the MediaExporter to which disk and in which format we want to export...
->toDisk('local')
->inFormat($lowBitrateFormat)
// call the 'save' method with a filename...
->save($this->video->id . '.mp4');
// update the database so we know the convertion is done!
// $this->video->update([
// 'converted_for_downloading_at' => Carbon::now(),
// ]);
}
} -
Promise chaining and resolution
23 janvier 2019, par Shourya SharmaI am trying to convert videos one by one with the help of promises. i am using ffmpeg for conversion and multer for uploading multiple files.
multer uploads multiple files at once after which i have to chain the conversions one by one. as of now it just converts the 1st file.
i thought chaining of promises ..like in an array should work but i am confused if i can define new promises in an array as ffmpeg also returns a promise
My router :
const router = require('express').Router();
const multer = require('multer');
const ffmpeg = require('ffmpeg');
let str;
const storage = multer.diskStorage({
destination: (req, file, cb) => {
cb(null, './uploads');
},
filename: (req, file, cb) => {
str = file.originalname.replace(/\.[^/.]+$/, "");
str = str.replace(/[^a-z0-9+]+/gi, '_') + '.' + file.originalname.replace(/^.*\./, '');
cb(null, str);
}
});
const upload = multer({ storage: storage }).array('files', 12);
router.post('/upload', (req, res, next) => {
// req.files is an array of files
// req.body will contain the text fields, if there were any
function uploadFile() {
return new Promise((resolve, reject) => {
upload(req, res, (err) => {
if (err) {
res.send(err) // Pass errors to Express.
reject(`Error: Something went wrong!`);
} else if (req.files == undefined) {
res.send(`No File selected.`);
resolve();
} else if (!err && req.files.length > 0) {
res.status(201).send(`${req.files.length} File(s): ${req.files} uploaded successfully.`);
console.log('uploaded');
resolve();
}
});
});
}
uploadFile().then(() => {
try {
var process = new ffmpeg('./uploads/' + str);
process.then(function (video) {
console.log('The video is ready to be processed');
video.addCommand('-hide_banner', '');
video.addCommand('-y', '');
video.addCommand('-c:a', 'aac');
video.addCommand('-ar', '48000');
video.addCommand('-c:v', 'h264');
video.addCommand('-profile:v', 'main');
video.addCommand('-crf', '20');
video.addCommand('-sc_threshold', '0');
video.addCommand('-g', '50');
video.addCommand('-keyint_min', '50');
video.addCommand('-hls_time', '4');
video.addCommand('-hls_playlist_type', 'vod');
video.addCommand('-vf', 'scale=-2:720');
video.addCommand('-b:v', '1400k');
video.addCommand('-maxrate', '1498k');
video.addCommand('-bufsize', '2100k');
video.addCommand('-b:a', '128k');
video.save('./converted/' + str, function (error, file) {
if (!error)
console.log('Video file: ' + file);
});
}, function (err) {
console.log('Error: ' + err);
});
} catch (e) {
console.log(e.code);
console.log(e.msg);
}
}).catch((err) => {
console.log(Error, err);
});
});
module.exports = router;