
Recherche avancée
Médias (1)
-
The pirate bay depuis la Belgique
1er avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (111)
-
Les autorisations surchargées par les plugins
27 avril 2010, parMediaspip core
autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs -
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 (...) -
Support de tous types de médias
10 avril 2011Contrairement à beaucoup de logiciels et autres plate-formes modernes de partage de documents, MediaSPIP a l’ambition de gérer un maximum de formats de documents différents qu’ils soient de type : images (png, gif, jpg, bmp et autres...) ; audio (MP3, Ogg, Wav et autres...) ; vidéo (Avi, MP4, Ogv, mpg, mov, wmv et autres...) ; contenu textuel, code ou autres (open office, microsoft office (tableur, présentation), web (html, css), LaTeX, Google Earth) (...)
Sur d’autres sites (10313)
-
ffmpeg scale2ref explanation ?
11 décembre 2020, par GeuisI'm applying a watermark to a video. I'm trying to get the watermark to scale proportionally to the video dimensions. I've seen maybe a dozen different answers using scale2ref, but no explanations as to actually what's happening, so I'm finding it difficult to know how to implement/make changes to the configs to work for my situation.



Current overlay command :



ffmpeg -i test.mp4 -i logo.png -filter_complex "overlay=0:0" output.mp4




Some answers I've looked at :



ffmpeg creating gif from images, add watermark during creation ?



ffmpeg fix watermark size or percentage



What are the rules to how scale2ref works ?


-
How to convert this php code to javascript
5 octobre 2019, par SalmanI have this php code to check the progress percentage of a ffmpeg video conversion. Basically ffmpeg command generates a log file named "output.txt" from where i can estimate the percentage with the help of this code. I want to create a javascript code where i can directly estimate the percentage from the log file.
$content = @file_get_contents('output.txt');
if ($content) {
//get duration of source
preg_match("/Duration: (.*?), start:/", $content, $matches);
$raw_duration = $matches[1];
//raw_duration is in 00:00:00.00 format. This converts it to seconds.
$array_reverse = array_reverse(explode(":", $raw_duration));
$duration = floatval($array_reverse[0]);
if (!empty($array_reverse[1]))
$duration += intval($array_reverse[1]) * 60;
if (!empty($array_reverse[2]))
$duration += intval($array_reverse[2]) * 60 * 60;
//get the time in the file that is already encoded
preg_match_all("/time=(.*?) bitrate/", $content, $matches);
$raw_time = array_pop($matches);
//this is needed if there is more than one match
if (is_array($raw_time)) {
$raw_time = array_pop($raw_time);
}
//raw_time is in 00:00:00.00 format. This converts it to seconds.
$array_reverse = array_reverse(explode(":", $raw_time));
$time = floatval($array_reverse[0]);
if (!empty($array_reverse[1]))
$time += intval($array_reverse[1]) * 60;
if (!empty($array_reverse[2]))
$time += intval($array_reverse[2]) * 60 * 60;
//calculate the progress
$progress = round(($time / $duration) * 100);
echo $duration;
echo $time;
echo $progress;
} -
Python, grab frame number from FFMPEG
22 janvier 2021, par PyrometheousI'm using a script to compile an image sequence into a video.


def ffmpeg_image_sequence(image_sequence, video, fps, encoder):
 global task
 task = False
 path = os.path.dirname(os.path.realpath(image_sequence))
 image_format = {
 'png': '\%06d.png',
 'iff': '\%06d.tiff',
 'tif': '\%06d.tif',
 'jpg': '\%06d.jpg'
 }
 sequence = path + image_format[image_sequence[-3:]]
 output_options = {
 'crf': 20,
 'preset': 'slow',
 'movflags': 'faststart',
 'pix_fmt': 'yuv420p',
 'c:v': encoder,
 'b:v': '20M'
 }
 try:
 (
 ffmpeg
 .input(sequence, framerate=fps)
 .output(video, **output_options)
 ).run()
 except ffmpeg.Error as e:
 warning(str(e))
 task = True



I'm using wxPython for the GUI and ffmpeg for compiling the frames :


import wx
import ffmpeg



I'm running the above function in its own class so that it can be run in a different thread, allowing the statusbar to be updated with how much time has passed.


def wait(start, text):
 time.sleep(.05)
 time_running = round(time.time() - start)
 update_status_bar(main_window, text + ' (Time Elapsed: ' + seconds_to_str(time_running) + ')')



I'd like to replace this with ETA and percentage completed. The window that pops up when running the ffmpeg_image_sequence function displays the following information :


frame=1234 fps= 16 q=13.0 size= 56789kB time=00:38:48.36 bitrate=12345.6kbits/sec speed=0.681x



From what's printed to that window, I'd like to get the current frame= value to determine what percentage of the process is completed, then display something more like :


def wait(text, frame, number_of_frames):
 time.sleep(.05)
 current_frame = frame
 number_of_frames = number_of_files_in_dir - 1
 percentage = round(current_frame / number_of_frames, 1)
 update_status_bar(main_window, text + ' ' + percentage + '% ' + Completed)



With some math to calculate an ETA for completion as well.


So, is there a way to grab that output text from the ffmpeg and turn just that frame= number into a variable ?