
Recherche avancée
Médias (91)
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Core Media Video
4 avril 2013, par
Mis à jour : Juin 2013
Langue : français
Type : Video
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
-
Exemple de boutons d’action pour une collection collaborative
27 février 2013, par
Mis à jour : Mars 2013
Langue : français
Type : Image
-
Exemple de boutons d’action pour une collection personnelle
27 février 2013, par
Mis à jour : Février 2013
Langue : English
Type : Image
Autres articles (31)
-
Ajouter notes et légendes aux images
7 février 2011, parPour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
Modification lors de l’ajout d’un média
Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...) -
Supporting all media types
13 avril 2011, parUnlike most software and media-sharing platforms, MediaSPIP aims to manage as many different media types as possible. The following are just a few examples from an ever-expanding list of supported formats : images : png, gif, jpg, bmp and more audio : MP3, Ogg, Wav and more video : AVI, MP4, OGV, mpg, mov, wmv and more text, code and other data : OpenOffice, Microsoft Office (Word, PowerPoint, Excel), web (html, CSS), LaTeX, Google Earth and (...)
-
Configuration spécifique pour PHP5
4 février 2011, parPHP5 est obligatoire, vous pouvez l’installer en suivant ce tutoriel spécifique.
Il est recommandé dans un premier temps de désactiver le safe_mode, cependant, s’il est correctement configuré et que les binaires nécessaires sont accessibles, MediaSPIP devrait fonctionner correctement avec le safe_mode activé.
Modules spécifiques
Il est nécessaire d’installer certains modules PHP spécifiques, via le gestionnaire de paquet de votre distribution ou manuellement : php5-mysql pour la connectivité avec la (...)
Sur d’autres sites (2321)
-
FFMPEG progress bar in php
16 mars 2017, par Mick JackI am using ffmpeg to convert a video file large files take a long time to get encode. i will like to show a progress bar with a percentage/time remaining
i saw and tried this example but for some reason the progress bar is not showing.
Html form
<form action="upload.php" method="post" enctype="multipart/form-data">
<label for="file"><span></span></label>
<input type="file" />
<br />
Please enter video title:
<br />
<input />
<br />
<input type="submit" value="Submit" />
</form>
<div title="test">
<h5>Encoding percentage</h5>
<code class="echappe-js"><script src="https://code.jquery.com/jquery-2.1.1.min.js" type="text/javascript"></script><script><br />
$(document).ready(function(){<br />
setInterval(function(){<br />
$("#screen").load('progress.php')<br />
}, 10000);<br />
});<br />
</script>upload.php ffmpeg script
shell_exec("C:\\ffmpeg\\bin\\ffmpeg.exe -y -i ".$target_file." -c:v libx264 -s:v 854x480 -c:a copy \"{$newFileName}\" > logfile.txt 2>&1"); // script to encode video
Progress.php
$content = @file_get_contents('blocks.txt');
if($content){
//get duration of source
preg_match("/Duration: (.*?), start:/", $content, $matches);
$rawDuration = $matches[1];
//rawDuration is in 00:00:00.00 format. This converts it to seconds.
$ar = array_reverse(explode(":", $rawDuration));
$duration = floatval($ar[0]);
if (!empty($ar[1])) $duration += intval($ar[1]) * 60;
if (!empty($ar[2])) $duration += intval($ar[2]) * 60 * 60;
//get the time in the file that is already encoded
preg_match_all("/time=(.*?) bitrate/", $content, $matches);
$rawTime = array_pop($matches);
//this is needed if there is more than one match
if (is_array($rawTime)){$rawTime = array_pop($rawTime);}
//rawTime is in 00:00:00.00 format. This converts it to seconds.
$ar = array_reverse(explode(":", $rawTime));
$time = floatval($ar[0]);
if (!empty($ar[1])) $time += intval($ar[1]) * 60;
if (!empty($ar[2])) $time += intval($ar[2]) * 60 * 60;
//calculate the progress
$progress = round(($time/$duration) * 100);
echo "Duration: " . $duration . "<br />";
echo "Current Time: " . $time . "<br />";
echo "Progress: " . $progress . "%";
}
?>
Lt (mod) gte () in ffmpeg. Cut 1 second and loop 1 second video
Sorry my language is limited.
I need help with ffmpeg.
Let's say I have a 1-minute video. Every 10 seconds, the video cuts 1 second at seconds 6 and repeats 1 second at seconds 10.
This means there will be 1,2,3,4,5,7,8,9,10,10.
I searched Lt (mod) gte () in ffmpeg but couldn't do it yet.
Please help me. Thanks so much


How to get the correct result file data if I use Web Worker on ffmpeg.js ?
I have tried to use FFMPEG.js (https://github.com/Kagami/ffmpeg.js) to convert mp3 files on the browser/client side, and I followed the usage of the page of Web Worker. However, the worker works well on the converting and it seems the file has been converted, but I cannot get the correct result file data back.
Here my code is :
<code class="echappe-js"><script><br />
<br />
var stdout = "";<br />
var outputhtml="";<br />
var stderr = "";<br />
var outputfile;<br />
<br />
var sampleVideoData;<br />
<br />
function retrieveSampleVideo() {<br />
var oReq = new XMLHttpRequest();<br />
oReq.open("GET", "short.mp3", true);<br />
oReq.responseType = "arraybuffer";<br />
<br />
oReq.onload = function (oEvent) {<br />
var arrayBuffer = oReq.response;<br />
if (arrayBuffer) {<br />
sampleVideoData = new Uint8Array(arrayBuffer);<br />
}<br />
};<br />
<br />
oReq.send(null);<br />
}<br />
<br />
function getDownloadLink(fileData, fileName) {<br />
var a = document.createElement('a');<br />
a.download = fileName;<br />
var blob = new Blob([fileData]);<br />
var src = window.URL.createObjectURL(blob);<br />
a.href = src;<br />
a.textContent = 'Click here to download ' + fileName + "!";<br />
document.body.appendChild(a);<br />
}<br />
<br />
var worker = new Worker("ffmpeg-worker-mp4.js");<br />
<br />
retrieveSampleVideo();<br />
<br />
var memfs =[]; <br />
<br />
//[, {name: "input.mp3", data: output}];<br />
<br />
worker.onmessage = function(e) {<br />
var msg = e.data;<br />
<br />
switch (msg.type) {<br />
case "ready":<br />
console.log("ready: " + msg.data);<br />
alert(sampleVideoData.length);<br />
memfs.push({name: "input.mp3", data: sampleVideoData});<br />
memfs.push({name: "output.mp3", data: outputfile});<br />
<br />
worker.postMessage({type: "run", MEMFS: memfs, arguments: ["-i", "input.mp3", "-y", "output.mp3"]});<br />
<br />
<br />
break;<br />
case "stdout":<br />
console.log("stdout: " + msg.data);<br />
stdout += msg.data + "\n";<br />
outputhtml+=msg.data + "<br>";<br />
<br />
break;<br />
case "stderr":<br />
console.log("stderr: " + msg.data);<br />
stderr += msg.data + "\n";<br />
outputhtml+=msg.data + "<br>";<br />
<br />
break;<br />
<br />
case "exit":<br />
<br />
console.log("Process exited with code " + msg.data);<br />
console.log(stdout);<br />
document.write(outputhtml);<br />
<br />
getDownloadLink(outputfile, "output.mp3");<br />
worker.terminate();<br />
<br />
<br />
break;<br />
}<br />
};<br />
<br />
</script>
And the console output looks good :
stderr: ffmpeg version n3.1.2 Copyright (c) 2000-2016 the FFmpeg developers index.html:66:4
stderr: built with emcc (Emscripten gcc/clang-like replacement) 1.36.7 () index.html:66:4
stderr: configuration: --cc=emcc --enable-cross-compile --target-os=none --arch=x86 --disable-runtime-cpudetect --disable-asm --disable-fast-unaligned --disable-pthreads --disable-w32threads --disable-os2threads --disable-debug --disable-stripping --disable-all --enable-ffmpeg --enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-swscale --enable-avfilter --disable-network --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --enable-decoder=vp8 --enable-decoder=vp9 --enable-decoder=theora --enable-decoder=mpeg2video --enable-decoder=mpeg4 --enable-decoder=h264 --enable-decoder=hevc --enable-decoder=png --enable-decoder=mjpeg --enable-decoder=vorbis --enable-decoder=opus --enable-decoder=mp3 --enable-decoder=ac3 --enable-decoder=aac --enable-decoder=ass --enable-decoder=ssa --enable-decoder=srt --enable-decoder=webvtt --enable-demuxer=matroska --enable-demuxer=ogg --enable-demuxer=avi --enable-demuxer=mov --enable-demuxer=flv --enable-demuxer=mpegps --enable-demuxer=image2 --enable-demuxer=mp3 --enable-demuxer=concat --enable-protocol=file --enable-filter=aresample --enable-filter=scale --enable-filter=crop --enable-filter=overlay --disable-bzlib --disable-iconv --disable-libxcb --disable-lzma --disable-sdl --disable-securetransport --disable-xlib --disable-zlib --enable-encoder=libx264 --enable-encoder=libmp3lame --enable-encoder=aac --enable-muxer=mp4 --enable-muxer=mp3 --enable-muxer=null --enable-gpl --enable-libmp3lame --enable-libx264 --extra-cflags=-I../lame/dist/include --extra-ldflags=-L../lame/dist/lib index.html:66:4
stderr: libavutil 55. 28.100 / 55. 28.100 index.html:66:4
stderr: libavcodec 57. 48.101 / 57. 48.101 index.html:66:4
stderr: libavformat 57. 41.100 / 57. 41.100 index.html:66:4
stderr: libavfilter 6. 47.100 / 6. 47.100 index.html:66:4
stderr: libswscale 4. 1.100 / 4. 1.100 index.html:66:4
stderr: libswresample 2. 1.100 / 2. 1.100 index.html:66:4
stderr: [mp3 @ 0x812380] Warning: not compiled with thread support, using thread emulation index.html:66:4
stderr: Input #0, mp3, from 'input.mp3': index.html:66:4
stderr: Metadata: index.html:66:4
stderr: encoder : Lavf57.66.101 index.html:66:4
stderr: Duration: 00:00:03.02, start: 0.023021, bitrate: 128 kb/s index.html:66:4
stderr: Stream #0:0: Audio: mp3, 48000 Hz, stereo, s16p, 128 kb/s index.html:66:4
stderr: Metadata: index.html:66:4
stderr: encoder : Lavc57.75 index.html:66:4
stderr: [mp3 @ 0x8240f0] Warning: not compiled with thread support, using thread emulation index.html:66:4
stderr: [libmp3lame @ 0x81b8a0] Warning: not compiled with thread support, using thread emulation index.html:66:4
stderr: [mp3 @ 0x80b0f0] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead. index.html:66:4
stderr: Output #0, mp3, to 'output.mp3': index.html:66:4
stderr: Metadata: index.html:66:4
stderr: TSSE : Lavf57.41.100 index.html:66:4
stderr: Stream #0:0: Audio: mp3 (libmp3lame), 48000 Hz, stereo, s16p index.html:66:4
stderr: Metadata: index.html:66:4
stderr: encoder : Lavc57.48.101 libmp3lame index.html:66:4
stderr: Stream mapping: index.html:66:4
stderr: Stream #0:0 -> #0:0 (mp3 (native) -> mp3 (libmp3lame)) index.html:66:4
stderr: Press [q] to stop, [?] for help index.html:66:4
stderr: size= 47kB time=00:00:03.00 bitrate= 129.6kbits/s speed=10.9x index.html:66:4
stderr: video:0kB audio:47kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.489831% index.html:66:4
Process exited with code 0
I have set the output into the memfs in the code :
memfs.push(name : "output.mp3", data : outputfile) ;
But I cannot get the result file data in outputfile to create the blob downloadd link.