
Recherche avancée
Autres articles (53)
-
Personnaliser en ajoutant son logo, sa bannière ou son image de fond
5 septembre 2013, parCertains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;
-
Ecrire une actualité
21 juin 2013, parPrésentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
Vous pouvez personnaliser le formulaire de création d’une actualité.
Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...) -
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
Sur d’autres sites (8885)
-
ffmpeg - color-grading video material AND display original source as picture-in-picture, using -filter_complex
5 octobre 2019, par raventhis is my first post on this forum, so please be gentle in case I accidentally do trip over any forum rules that I would not know of yet :).
I would like to apply some color-grading to underwater GoPro footage. To quicker gauge the effect of my color settings (trial-and-error, as of yet), would like to see the original input video stream as a PIP (e.g., scaled down to 50% or even 30%), in the bottom-right corner of the converted output movie.
I have one input movie that is going to be color graded. The PIP should use the original as an input, just a scaled-down version of it.
I would like to use ffmpeg’s "-filter_complex" option to do the PIP, but all examples I can find on "-filter_complex" would use two already existing movies. Instead, I would like to make the color-corrected stream an on-the-fly input to "-filter_complex", which then renders the PIP.
Is that doable, all in one go ?
Both the individual snippets below work fine, I now would like to combine these and skip the creation of an intermediate color-graded TMP output which then gets combined, with the original, in a final PIP creation process.
Your help combining these two separate steps into one single "-filter_complex" action is greatly appreciated !Thanks in advance,
raven.[existing code snippets (M$ batch files)]
::declarations/defines::
set "INPUT="
set "TMP="
set "OUTPUT="
set "FFMPG="
set "QU=9" :: quality settings
set "CONV='"0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1 0 -1 0:0 -1 0 -1 5 -1
0 -1 0:0 -1 0 -1 5 -1 0 -1 0'"" :: sharpening convolution filter
::color-grading part::
%FFMPG% -i %INPUT% -vf convolution=%CONV%,colorbalance=rs=%rs%:gs=%gs%:bs=%bs%:rm=%rm%:gm=%gm%:bm=%bm%:rh=%rh%:gh=%gh%:bh=%bh% -q:v %QU% -codec:v mpeg4 %TMP%
::PIP part::
%FFMPG% -i %TMP% -i %INPUT% -filter_complex "[1]scale=iw/3:ih/3
[pip]; [0][pip] overlay=main_w-overlay_w-10:main_h-overlay_h-10" -q:v
%QU% -codec:v mpeg4 %OUTPUT%
[/existing code] -
Using ffmpeg to watermark a folder of videos
25 août 2018, par user5947524I am using the code below to watermark individual videos one-by-one in a folder :
ffprobe -v quiet -show_entries stream=width,height -of default=noprint_wrappers=1 dave.mp4
ffmpeg -i logo.png -y -v quiet -vf scale=width*0.15:-1 scaled.png
ffmpeg -i dave.mp4 -i scaled.png -filter_complex "overlay=10:main_h-overlay_h-10" dave2.mp4The first line gets the width and the height of a video, second line scales the watermark for that video, third line creates a new video watermarked.
How can I make run for a full folder of 1000 videos ?
I tried the code below but it corrupted the videos :
for %%a in ("C:\Users\Work\Desktop\test2\*.mp4") do (
ffprobe -v quiet -show_entries stream=width,height -of default=noprint_wrappers=1 "%%a"
ffmpeg -i logo.png -y -v quiet -vf scale=width*0.15:-1 scaled.png
ffmpeg -i "%%a" -i scaled.png -filter_complex "overlay=10:main_h-overlay_h-10" "C:\Users\Work\Desktop\test2\%%~na.mp4"
)The error I get is :
[mov,mp4,m4a,3gp,3g2,mj2 @ 0000014545aaaa00] stream 0, offset 0x18039: partial file
[aac @ 0000014545b708c0] Input buffer exhausted before END element found
Error while decoding stream #0:1: Invalid data found when processing input
C:\Users\Work\Desktop\test2\dave.mp4: Invalid data found when processing input -
Auto delete .ts and .m3u8 files once client receives all .ts files
11 mars 2019, par Abhishek MehandirattaSo I created an express server that gets an mp3 file (which is stored locally right now, but will be taken from mongo db later) and uses ffmpeg to make .m3u8 and .ts files. The files are successfully sent to the client and there are no errors while playing it on the client. I used hls.js to play these files in Chrome. But the server still has those files stored locally. Is there any way the server can know when to delete these files that it stored locally ? There are a lot of files generated by ffmpeg so I can’t just let them stay there forever.
I used the ffmpeg part of code from hls-server github repo.
my server file
index.js
// just used to run ffmpeg for conversion
var command = ffmpeg('inp.mp3')
.on('start', function (commandLine) {
console.log('command', commandLine);
}).addOptions([
'-c:a aac',
'-b:a 64k',
'-vn',
'-hls_list_size 0',
'-segment_time 10',
]).output('files\\output.m3u8');
var express = require('express');
var app = express();
// express middleware to serve individual .ts and .m3u8 files when requested
app.use(express.static('./files/'));
app.get('/', function (req, res) {
command.on('end', function () {
console.log('done');
res.write(`
<code class="echappe-js"><script src="https://cdn.jsdelivr.net/hls.js/latest/hls.min.js"></script><script><br />
function onLevelLoaded (event, data) {<br />
var level_duration = data.details.totalduration;<br />
console.log(level_duration, data);<br />
}<br />
if(Hls.isSupported()) {<br />
var audio = new Audio();<br />
var hls = new Hls();<br />
// requesting files from here<br />
hls.loadSource('http://localhost:8000/output.m3u8');<br />
hls.attachMedia(audio);<br />
hls.on(Hls.Events.LEVEL_LOADED, onLevelLoaded);<br />
hls.on(Hls.Events.FRAG_BUFFERED, (e, d) => {<br />
console.log(e, d);<br />
});<br />
}<br />
</script>`) ;
res.end() ;
}).run() ;
}) ;app.listen(8000) ;