
Recherche avancée
Autres articles (59)
-
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. -
La sauvegarde automatique de canaux SPIP
1er avril 2010, parDans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...) -
Script d’installation automatique de MediaSPIP
25 avril 2011, parAfin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
La documentation de l’utilisation du script d’installation (...)
Sur d’autres sites (5881)
-
FFMPEG : Specifying Output Stream Type When Combing Multiple Filters
7 mai 2021, par Leonard BednerI currently have 3 separate
ffmpeg
commands that do the following :

- 

- Overlay a watermark on a video :
ffmpeg -i samplegreen.webm -i foregrounds/myimage.png -r 30 -filter_complex "overlay=(W-w)/2:H-h" -af "adelay=700" output.mp4
- Overlay the results of 1) onto a beach video :
ffmpeg -i backgrounds/beachsunsetmp4.mp4 -i output.mp4 -filter_complex "[1:v]chromakey=0x005d0b:0.1485:0.03[ckout];[0:v][ckout]overlay[o]" -map [o] -map 1:a -shortest somefolder/sample_video.mp4
- Merge the audio of the results of 2) with another audio file :
ffmpeg -i somefolder/sample_video.mp4 -i backgrounds/beachsunsetmp4.mp3 -filter_complex '[0:a][1:a]amerge=inputs=2[a]' -map 0:v -map '[a]' -c:v copy -ac 2 -shortest anotherfolder/sample_video.mp4








Now, this all works as intended, however, I was looking into attempting to combine them all into a single command, combining all the filters, like so :


ffmpeg -i samplegreen.webm -i foregrounds/myimage.png -r 30 -i backgrounds/beachsunsetmp4.mp4 -i backgrounds/beachsunsetmp4.mp3 -filter_complex \
 "[0]overlay=(W-w)/2:H-h[output_1]; \
 [output_1]chromakey=0x005d0b:0.1485:0.03[ckout]; \
 [2:v][ckout]overlay[output_2]; \
 [output_2][3:a] amerge=inputs=2 [output_3]" \
 -af "adelay=700" -map [output_3] shortest final.mp4



It fails with the following error (
Media type mismatch between the 'Parsed_overlay_2' filter output pad 0 (video) and the 'Parsed_amerge_3' filter input pad 0 (audio)
) :

ffmpeg version 4.3.2 Copyright (c) 2000-2021 the FFmpeg developers
 built with Apple clang version 11.0.0 (clang-1100.0.33.17)
 configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.2_1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librtmp --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox
 libavutil 56. 51.100 / 56. 51.100
 libavcodec 58. 91.100 / 58. 91.100
 libavformat 58. 45.100 / 58. 45.100
 libavdevice 58. 10.100 / 58. 10.100
 libavfilter 7. 85.100 / 7. 85.100
 libavresample 4. 0. 0 / 4. 0. 0
 libswscale 5. 7.100 / 5. 7.100
 libswresample 3. 7.100 / 3. 7.100
 libpostproc 55. 7.100 / 55. 7.100
Input #0, matroska,webm, from 'samplegreen.webm':
 Metadata:
 encoder : Chrome
 Duration: N/A, start: 0.000000, bitrate: N/A
 Stream #0:0(eng): Video: vp8, yuv420p(progressive), 1280x720, SAR 1:1 DAR 16:9, 1k tbr, 1k tbn, 1k tbc (default)
 Metadata:
 alpha_mode : 1
 Stream #0:1(eng): Audio: opus, 48000 Hz, mono, fltp (default)
Input #1, png_pipe, from 'foregrounds/myimage.png':
 Duration: N/A, bitrate: N/A
 Stream #1:0: Video: png, rgba(pc), 350x86, 25 tbr, 25 tbn, 25 tbc
Input #2, mov,mp4,m4a,3gp,3g2,mj2, from 'backgrounds/beachsunsetmp4.mp4':
 Metadata:
 major_brand : mp42
 minor_version : 0
 compatible_brands: mp42mp41
 creation_time : 2021-02-16T18:24:40.000000Z
 Duration: 00:00:32.53, start: 0.000000, bitrate: 3032 kb/s
 Stream #2:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720, 3027 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default)
 Metadata:
 creation_time : 2021-02-16T18:24:40.000000Z
 handler_name : ?Mainconcept Video Media Handler
 encoder : AVC Coding
[mp3 @ 0x7f86cf809000] Estimating duration from bitrate, this may be inaccurate
Input #3, mp3, from 'backgrounds/beachsunsetmp4.mp3':
 Metadata:
 date : 2021-02-18 06:49
 id3v2_priv.XMP : <?xpacket begin="\xef\xbb\xbf" id="W5M0MpCehiHzreSzNTczkc9d"?>\x0a\x0a \x0a s
 Stream #3:0: Audio: mp3, 48000 Hz, stereo, fltp, 128 kb/s
[Parsed_overlay_2 @ 0x7f86cd4039c0] Media type mismatch between the 'Parsed_overlay_2' filter output pad 0 (video) and the 'Parsed_amerge_3' filter input pad 0 (audio)
[AVFilterGraph @ 0x7f86cd402a40] Cannot create the link overlay:0 -> amerge:0
Error initializing complex filters.
Invalid argument



As far as I can tell, the issue is that the filter,
amerge
, wants 2 audio streams. Normally, I could take the input stream argument (which is a video), and make it use the audio by doing something like[0:a][1:a]amerge=inputs=2[results]
. However, since my input stream is the output of a preceding filter, that doesn't seem to work (i.e. [output_2:a]). It bombs out with :

[matroska,webm @ 0x7fecca000000] Invalid stream specifier: output_2:a.
 Last message repeated 1 times
Stream specifier 'output_2:a' in filtergraph description [0]overlay=(W-w)/2:H-h[output_1]; [output_1]chromakey=0x005d0b:0.1485:0.03[ckout]; [2:v][ckout]overlay[output_2]; [output_2:a][3:a] amerge=inputs=2 [output_3] matches no streams.



So all of that said... Is there a way to specify that I'd like to use the audio stream from the output of a preceding filter ? Or any other ways to combine all of these filters into a single command ?


Thanks.


Any help would be greatly appreciated !


- Overlay a watermark on a video :
-
Transcoding with custom commands using streamio-ffmpeg
14 avril 2017, par ACIDSTEALTHI’m trying to transcode a video file using
streamio-ffmpeg
with some custom commands, but nothing I try seems to work. I want to transcode the video with the following options :ffmpeg -i input.mp4 -vf
"format=yuv444p,
drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max,
drawtext=font='OpenSans-Regular,Sans':text='CUSTOM TEXT':fontcolor=0xFFFFFF:fontsize=24:x=(w-tw)/2:y=(h/PHI)+th,
format=yuv420p"
-c:v libx264 -c:a copy -movflags +faststart output.mp4I’ve tried the following code combinations without success :
-
Tried removing the line breaks and converting the command string to an array, following the instructions in the docs.
video = FFMPEG::Movie.new('input.mp4')
opts = %w(ffmpeg -i input.mp4 -vf "format=yuv444p, drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max, drawtext=font='OpenSans-Regular,Sans':text='CUSTOM TEXT':fontcolor=0xFFFFFF:fontsize=24:x=(w-tw)/2:y=(h/PHI)+th, format=yuv420p" -c:v libx264 -c:a copy -movflags +faststart output.mp4)
video.transcode('output.mp4', opts)But this yields the error :
[NULL @ 0x7f962100e200] Unable to find a suitable output format for 'ffmpeg'
ffmpeg: Invalid argument
from /Users/ACIDSTEALTH/.gem/ruby/2.3.0/gems/streamio-ffmpeg-3.0.2/lib/ffmpeg/transcoder.rb:112:in `validate_output_file' -
Tried stripping out the input file name and output file name since the gem seems to handle that for you.
video = FFMPEG::Movie.new('input.mp4')
opts = %w(-vf "format=yuv444p, drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max, drawtext=font='OpenSans-Regular,Sans':text='CUSTOM TEXT':fontcolor=0xFFFFFF:fontsize=24:x=(w-tw)/2:y=(h/PHI)+th, format=yuv420p")
video.transcode('output.mp4', opts)Which returns this error :
[NULL @ 0x7fd0a9008c00] Unable to find a suitable output format for 'drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max,'
drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max,: Invalid argument
from /Users/ACIDSTEALTH/.gem/ruby/2.3.0/gems/streamio-ffmpeg-3.0.2/lib/ffmpeg/transcoder.rb:112:in `validate_output_file' -
Tried removing the
-vf
flag and just running everything within the quotation marks.video = FFMPEG::Movie.new('input.mp4')
opts = %w(format=yuv444p, drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max, drawtext=font='OpenSans-Regular,Sans':text='CUSTOM TEXT':fontcolor=0xFFFFFF:fontsize=24:x=(w-tw)/2:y=(h/PHI)+th, format=yuv420p)
video.transcode('output.mp4', opts)This returns another error :
[NULL @ 0x7fab8101fe00] Unable to find a suitable output format for 'format=yuv444p,'
format=yuv444p,: Invalid argument
from /Users/ACIDSTEALTH/.gem/ruby/2.3.0/gems/streamio-ffmpeg-3.0.2/lib/ffmpeg/transcoder.rb:112:in `validate_output_file' -
Tried removing the
format
arguments since ffmpeg is clearly complaining about those.video = FFMPEG::Movie.new('input.mp4')
opts = %w("drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max, drawtext=font='OpenSans-Regular,Sans':text='CUSTOM TEXT':fontcolor=0xFFFFFF:fontsize=24:x=(w-tw)/2:y=(h/PHI)+th")
video.transcode('output.mp4', opts)Again another error :
[NULL @ 0x7fc7f880a800] Unable to find a suitable output format for 'drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max,'
drawbox=y=ih/PHI:color=0x000000@0.4:width=iw:height=48:t=max,: Invalid argument
from /Users/ACIDSTEALTH/.gem/ruby/2.3.0/gems/streamio-ffmpeg-3.0.2/lib/ffmpeg/transcoder.rb:112:in `validate_output_file' -
Tried building a hash from the command string and feeding that into the
transcode
method.video = FFMPEG::Movie.new('input.mp4')
opts = {
'-vf' => {
format: 'yuv444p',
drawbox: {
y: 'ih/PHI', color: '0x000000@0.4', width: 'iw', height: '48', t: 'max'
},
drawtext: {
font: 'OpenSans-Regular,Sans', text: snap.title, fontcolor: '0xFFFFFF', fontsize: '24', x: '(w-tw)/2', y: '(h/PHI)+th'
},
format: 'yuv420p'
}
}
video.transcode('output.mp4', opts)I also tried a variation without the
-vf
flag :video = FFMPEG::Movie.new('input.mp4')
opts = {
format: 'yuv444p',
drawbox: {
y: 'ih/PHI', color: '0x000000@0.4', width: 'iw', height: '48', t: 'max'
},
drawtext: {
font: 'OpenSans-Regular,Sans', text: snap.title, fontcolor: '0xFFFFFF', fontsize: '24', x: '(w-tw)/2', y: '(h/PHI)+th'
},
format: 'yuv420p'
}
video.transcode('output.mp4', opts)
These both produced an
output.mp4
video file but the output file was unchanged from the input. There was no text overlay.Nothing I try seems to work. What am I doing wrong here ?
-
-
Help us Reset The Net today on June 5th
This blog post explains why the Piwik project is joining ResetTheNet online protest and how you can help make a difference against mass surveillance. It also includes an infographic and links to useful resources which may be of interest to you.
Snowden revelations, a year ago today
On June 5, 2013 the Guardian newspaper published the first of Edward Snowden’s astounding revelations. It was the first of a continuous stream of stories that pointed out what we’ve suspected for a long time : that the world’s digital communications are being continuously spied upon by nation states with precious little oversight.
Unfortunately, mass surveillance is affecting the internet heavily. The Internet is a powerful force that can promote democracy, innovation, and creativity, but it’s being subverted as a tool for government spying. That is why Piwik has decided to join Reset The Net.
June 5, 2014 marks a new year : a year that will not just be about listening to the inside story of mass surveillance, but a new year of fighting back !
How do I protect myself and others ?
Reset the Net is asking everyone to help by installing free software tools that are designed to protect your privacy on a computer or a mobile device.
Reset the Net is also calling on websites and developers to add surveillance resistant features such as HTTPS and forward secrecy.
Participate in ResetTheNet online protest
Have you got your own website, blog or tumblr ? Maybe you can show the Internet Defense League’s “Cat Signal !” on your website.Get the code now to run the Reset the Net splash screen or banner to help make privacy viral on June 5th.
Message from Edward Snowden
Evan from FFTF sent us this message from Edward Snowden and we thought we would share it with you :
One year ago, we learned that the internet is under surveillance, and our activities are being monitored to create permanent records of our private lives — no matter how innocent or ordinary those lives might be.
Today, we can begin the work of effectively shutting down the collection of our online communications, even if the US Congress fails to do the same. That’s why I’m asking you to join me on June 5th for Reset the Net, when people and companies all over the world will come together to implement the technological solutions that can put an end to the mass surveillance programs of any government. This is the beginning of a moment where we the people begin to protect our universal human rights with the laws of nature rather than the laws of nations.
We have the technology, and adopting encryption is the first effective step that everyone can take to end mass surveillance. That’s why I am excited for Reset the Net — it will mark the moment when we turn political expression into practical action, and protect ourselves on a large scale.
Join us on June 5th, and don’t ask for your privacy. Take it back.
– Message by Edward Snowden
ResetTheNet privacy pack infographic
Additional Resources
Configure Piwik for Security and Privacy
- Turn on automatic SSL redirection in your Piwik.
- Configure Piwik for advanced Privacy.
- Best security practises for Piwik.
More info
- Learn why this matters (EFF)
- Data Privacy Day – Why is privacy important ? (Piwik)
- Web Analytics Privacy (Piwik)