
Recherche avancée
Médias (1)
-
Rennes Emotion Map 2010-11
19 octobre 2011, par
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (74)
-
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. -
Modifier la date de publication
21 juin 2013, parComment changer la date de publication d’un média ?
Il faut au préalable rajouter un champ "Date de publication" dans le masque de formulaire adéquat :
Administrer > Configuration des masques de formulaires > Sélectionner "Un média"
Dans la rubrique "Champs à ajouter, cocher "Date de publication "
Cliquer en bas de la page sur Enregistrer -
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 ;
Sur d’autres sites (10013)
-
Watch multi-stream video file while being recorded by ffmpeg
20 janvier 2020, par Luke GorrieI am using ffmpeg to record four 1080p video streams simultaneously and I would like to view these streams in real time while they are being recorded. Ideally I would like to view them from a separate machine, using some convenient Linux data sharing method like ssh/sshfs/..., but that is a nice-to-have. Is there a practical way to accomplish this ?
The ffmpeg recording command that I currently use is like this :
ffmpeg \
-f v4l2 -i $cam0 \
-f v4l2 -i $cam1 \
-f v4l2 -i $cam2 \
-f v4l2 -i $cam3 \
-f matroska \
-map 0 \
-map 1 \
-map 2 \
-map 3 \
-c copy \
$output.mkvMy problem would be solved if I could use a command like
ffplay
orvlc
to play one or more of the video streams, always tracking close to the end of the stream, playing more as data becomes available. I haven’t found such an option though.One alternative might be to have the recording ffmpeg process also tile the four 1080p videos into one 4K grid and pipe that to ffplay. Then I could at least preview on the same machine that is recording. I have not been able to work out the right ffmpeg command to do the tiling though and would appreciate an example.
-
Ffmpeg adding watermark with qsv hardware acceleration optimize performance
11 février 2020, par KsilonI add text watermark on video with ffmpeg but i’m new with ffmpeg and try to optimize performance for this.
My test setup has i5-7500 and Intel HD 630. I tried this code to add watermark on video. If I do not set
-hwaccel_output_format
toyuv420p
ornv12
, it gives error.ffmpeg -threads 4 -hwaccel qsv -hwaccel_output_format yuv420p -i "input.mp4" -vf "drawtext=text='TEST':x=(W-tw)/2:y=(H-th)/2:fontfile=arial.ttf:fontsize=250:fontcolor=white@0.4:shadowcolor=black@0.4:shadowx=2:shadowy=2" -c:v h264_qsv "output.mp4"
When I run this code, Cpu usage 53% / fps = 90-95 / gpu_load(GPU-Z) = 35-38%
When I changed-threads 1
, Cpu usage 35% / fps = 68-72 / gpu_load(GPU-Z) = 28-30%Find
-async_depth
keyword on the Internet and tried it with5
but nothing happens or I used it wrong.How can use more gpu and less cpu for this operation ?
-
php-FFMpeg issue when adding watermark
17 février 2020, par BN83Currently getting the following error whilst trying to add a watermark to videos
PHP Fatal error : Uncaught Alchemy\BinaryDriver\Exception\ExecutionFailureException : ffmpeg failed to execute command ’/usr/bin/ffmpeg’ ’-y’ ’-i’ ’test.mp4’ ’-vcodec’ ’libx264’ ’-acodec’ ’libmp3lame’ ’-b:v’ ’1000k’ ’-refs’ ’6’ ’-coder’ ’1’ ’-sc_threshold’ ’40’ ’-flags’ ’+loop’ ’-me_range’ ’16’ ’-subq’ ’7’ ’-i_qfactor’ ’0.71’ ’-qcomp’ ’0.6’ ’-qdiff’ ’4’ ’-trellis’ ’1’ ’-b:a’ ’256k’ ’-ac’ ’2’ ’-vf’ ’movie=watermark.png [watermark] ;[in][watermark] overlay=main_w - 50 - overlay_w:25 [out]’ ’-pass’ ’1’ ’-passlogfile’ ’/tmp/ffmpeg-passes5e4aa564641efqx15l/pass-5e4aa564642e3’ ’1276404247.mp4’
when doing the following :
if (file_exists('test.mp4')) {
$videoSource = 'test.mp4';
$reqExtension = 'mp4';
$watermark = "watermark.png";
$ffmpeg = FFMpeg\FFMpeg::create();
$video = $ffmpeg->open($videoSource);
$format = new FFMpeg\Format\Video\X264('libmp3lame', 'libx264');
if (!empty($watermark))
{
$video ->filters()
->watermark($watermark, array(
'position' => 'relative',
'top' => 25,
'right' => 50,
));
}
$format
-> setKiloBitrate(1000)
-> setAudioChannels(2)
-> setAudioKiloBitrate(256);
$randomFileName = rand().".$reqExtension";
$saveLocation = getcwd(). '/'.$randomFileName;
$video->save($format, $saveLocation);
}Have no idea why it’s failing though, must be finding the video to even start the process ?
EDIT :
Tried to make it simpler and just generate a capture of the video...
$ffmpeg = FFMpeg\FFMpeg::create();
$video = $ffmpeg->open($videoSource);
$frame = $video->frame(FFMpeg\Coordinate\TimeCode::fromSeconds(1));
$frame->save('image.jpg');Throws this error :
PHP Fatal error : Uncaught Alchemy\BinaryDriver\Exception\ExecutionFailureException : ffmpeg failed to execute command ’/usr/bin/ffmpeg’ ’-y’ ’-ss’ ’00:00:01.00’ ’-i’ ’test.mp4’ ’-vframes’ ’1’ ’-f’ ’image2’ ’image.jpg’
In the console it works and generates the screenshot without error.