
Recherche avancée
Autres articles (93)
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Menus personnalisés
14 novembre 2010, parMediaSPIP utilise le plugin Menus pour gérer plusieurs menus configurables pour la navigation.
Cela permet de laisser aux administrateurs de canaux la possibilité de configurer finement ces menus.
Menus créés à l’initialisation du site
Par défaut trois menus sont créés automatiquement à l’initialisation du site : Le menu principal ; Identifiant : barrenav ; Ce menu s’insère en général en haut de la page après le bloc d’entête, son identifiant le rend compatible avec les squelettes basés sur Zpip ; (...) -
Des sites réalisés avec MediaSPIP
2 mai 2011, parCette page présente quelques-uns des sites fonctionnant sous MediaSPIP.
Vous pouvez bien entendu ajouter le votre grâce au formulaire en bas de page.
Sur d’autres sites (5810)
-
How to get the correct result file data if I use Web Worker on ffmpeg.js ?
23 avril 2019, par SuperBerryI 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 0I 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.
-
C# FFmpeg Command Prompt | Weird Result
16 février 2018, par sword1stI have really weird problem with ffmpeg when it’s running with process in C#. Here is my code for video splitting :
private void splitVideo()
{
Label.CheckForIllegalCrossThreadCalls = false;
vlcControl1.Stop();
label1.Text = "Process Started!";
for (int i = 0; i < listBox2.Items.Count; i++)
{
string first = listBox2.Items[i].ToString().Split('-').First();
string last = listBox2.Items[i].ToString().Split('-').Last();
Directory.CreateDirectory(paths[listBox1.SelectedIndex].ToString() + "\\tempSplitFolder");
string parameter2 = "-i " + paths[listBox1.SelectedIndex].ToString() + "\\" + "clip.mp4" + " -ss " + first + " -to " + last + " -async 1 " + "-c copy "
+ paths[listBox1.SelectedIndex].ToString() + "\\tempSplitFolder\\" + i + ".mp4";
Control.CheckForIllegalCrossThreadCalls = false;
process1.StartInfo.UseShellExecute = false;
process1.StartInfo.RedirectStandardOutput = true;
process1.StartInfo.FileName = "ffmpeg";
process1.StartInfo.Arguments = parameter2;
process1.StartInfo.RedirectStandardError = true;
process1.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process1.StartInfo.CreateNoWindow = true;
process1.Start();
ffreader = process1.StandardError;
label1.Text = ffreader.ReadLine();
while (!process1.HasExited)
{
label1.Text = ffreader.ReadLine();
}
}But all output videos 262 bayt sized and corrupted. I can’t play that clips. When i remove "-c copy" part from my parameter2 variable it’s fine. But i don’t wanna re-encode videos cuz it’s time consuming. I can use this code with "-c copy" on ffmpeg there is no problem with the code. But why it’s acting weird and giving me corrupted videos i have no idea. Here my parameter2 variable in debug mode :
-i D:\TestMainFolder\TestFolder\clip.mp4 -ss 00:22:00 -to 00:22:20 -async 1 -c copy D:\TestMainFolder\TestFolder\tempSplitFolder\0.mp4
If i run this command manually with ffmpeg -i D :\etcetcetc.. it’s working. I’m really lost i need fresh eyes guys. Thanks a lot ! :)
-
FFMPEG - cut video result in longer cut
27 octobre 2023, par Pier Giorgio MisleyI'm trying to cut the last 8 seconds of a video I got ; the problem is that ffmpeg is picking the last 10 seconds instead and I don't really know why. I checked and there is no offset between "0:00:00" and the effective start of the video, so why should it take more seconds ?


this is my code :


ffmpeg.exe -ss 00:01:02 -i "F:\temp\input.mp4" -c copy -t 00:00:08 "D:\temp\1_output.mp4"



this is the output :




ffmpeg version N-90893-gcae6f806a6 Copyright (c) 2000-2018 the FFmpeg


developers built with gcc 7.3.0 (GCC) configuration : —enable-gpl


—enable-version3 —enable-sdl2 —enable-bzlib —enable-fontconfig —enable-gnutls —enable-iconv —enable-libass —enable-libbluray —enable-libfreetype —enable-libmp3lame —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libopenjpeg —enable-libopus —enable-libshine —enable-libsnappy —enable-libsoxr —enable-libtheora —enable-libtwolame —enable-libvpx —enable-libwavpack —enable-libwebp —enable-libx264 —enable-libx265 —enable-libxml2 —enable-libzimg —enable-lzma —enable-zlib —enable-gmp —enable-libvidstab —enable-libvorbis —enable-libvo-amrwbenc —enable-libmysofa —enable-libspeex —enable-libxvid —enable-libaom —enable-libmfx —enable-amf —enable-ffnvcodec —enable-cuvid —enable-d3d11va —enable-nvenc —enable-nvdec —enable-dxva2 —enable-avisynth libavutil 56. 17.100 / 56. 17.100 libavcodec 58. 19.100 / 58. 19.100 libavformat 58. 13.100 / 58. 13.100 libavdevice 58. 4.100 /


- 

- 4.100 libavfilter 7. 21.100 / 7. 21.100 libswscale 5. 2.100 / 5. 2.100 libswresample 3. 2.100 / 3. 2.100 libpostproc 55. 2.100 / 55. 2.100 Input #0,




mov,mp4,m4a,3gp,3g2,mj2, from 'F :\temp\input.mp4' : Metadata :


major_brand : isom


minor_version : 512


compatible_brands : isomiso2avc1mp41


encoder : Lavf58.13.100 Duration : 00:01:10.34, start : 0.000000, bitrate : 14542 kb/s


Stream #0:0(und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p, 576x1024, 14346 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)


Metadata :


handler_name : VideoHandler


Stream #0:1(und) : Audio : aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 193 kb/s (default)


Metadata :


handler_name : SoundHandler Output #0, mp4, to 'D :\temp\1_output.mp4' : Metadata :


major_brand : isom


minor_version : 512


compatible_brands : isomiso2avc1mp41


encoder : Lavf58.13.100


Stream #0:0(und) : Video : h264 (High) (avc1 / 0x31637661), yuv420p, 576x1024, q=2-31, 14346 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc


(default)


Metadata :


handler_name : VideoHandler Stream #0:1(und) : Audio : aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 193 kb/s (default)


Metadata :


handler_name : SoundHandler Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help frame= 252


fps=0.0 q=-1.0 Lsize= 3089kB time=00:00:07.99 bitrate=3164.7kbits/s


speed=1e+003x video:2841kB audio:240kB subtitle:0kB other


streams:0kB global headers:0kB muxing overhead : 0.283155%




I don't really understand what i'm doing wrong


Thanks