Recherche avancée

Médias (91)

Autres articles (54)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

Sur d’autres sites (9514)

  • FFmpeg Process Priority at screenrecording

    24 avril 2021, par Andrew

    I made formula for screenrecording via FFmpeg, and it works with Counter-Strike and Dota 2.
But it doesn't work with World of Tanks. So I faced with troubles. World of Tanks crashs after few minutes. And speed of recording is less then 1x (about 0.87x and it become slower and slower). So I think that I need to raise up the priority process of FFmpeg.
Look for test of it on my Youtube Channel : my test of ffmpeg screen recording

    


    So I would like to set 'High' or 'Realtime' priority for this process automatically !

    


    But right now I can do it via 2 ways :

    


      

    1. via Task Manager ;
    2. 


    3. via second PowerShell Window and second "copy-paste".
    4. 


    


    But both methods require a time (5-20 seconds). It is no good.
I cannot to set Start-Process ffmpeg -NoNewWindow -Wait -ArgumentList for setting PriorityClass as here stackoverflow because my ArgumentList of FFmpeg is too huge.
And I cannot start-process pwsh -ArgumentList for new powershell window for setting PriorityClass. It write me about an error.
My tested formula for Youtube :

    


    ffmpeg -hide_banner -loglevel +repeat+level+info `
-f dshow -thread_queue_size 8192 -audio_buffer_size 100 -rtbufsize 2147M `
-i 'audio=@device_sw_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\{8E146464-DB61-4309-AFA1-3578E927E935}' `
-f dshow -thread_queue_size 8192 -audio_buffer_size 100 -rtbufsize 2147M `
-i 'audio=@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{472DBE92-04B3-48AB-A937-ED4CD6A85625}' `
-f gdigrab -hwaccel_device cuda -hwaccel cuda -hwaccel_output_format cuda -video_size 1920:1080 -thread_queue_size 8192 -draw_mouse 1 -show_region 0 -offset_x 0 -offset_y 0 -rtbufsize 2147M -probesize 500M -analyzeduration 500M -framerate 60 -i desktop `
-noautoscale -shortest `
-map '0:a:0' -c:a copy -f wav "FFmpeg_Screen_Recording_$(get-date -f yyyy-MM-dd_HH-mm-ss).wav" `
-map '1:a:0' -c:a copy -f wav "FFmpeg_WebCAM_Recording_$(get-date -f yyyy-MM-dd_HH-mm-ss).wav" `
-map '2:v:0' -c:v h264_nvenc -gpu 0 -vsync 1 -r 60 -video_size 1920x1080 -video_track_timescale 60 -copytb 0 -delay 0 -rc constqp -qp 0 -rc-lookahead 0 -zerolatency 1 -maxrate:v 512M -bufsize:v 512M -pix_fmt yuv444p -profile:v high444p -preset p1 -tune ull -level 6.2 -coder vlc -weighted_pred 0 `
-f mov "FFmpeg_Screen_Recording_$(get-date -f yyyy-MM-dd_HH-mm-ss).mov"


    


    My current formula for High priority - first tab :

    


    start-process pwsh -ArgumentList '-noexit' 
Get-Process -name 'pwsh' | foreach { $_.PriorityClass = "High" }
$startExe = ffmpeg -hide_banner -loglevel +repeat+level+info `
-f dshow -thread_queue_size 8192 -audio_buffer_size 100 -rtbufsize 2147M `
-i 'audio=@device_sw_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\{8E146464-DB61-4309-AFA1-3578E927E935}' `
-f dshow -thread_queue_size 8192 -audio_buffer_size 100 -rtbufsize 2147M `
-i 'audio=@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{472DBE92-04B3-48AB-A937-ED4CD6A85625}' `
-f gdigrab -hwaccel_device cuda -hwaccel cuda -hwaccel_output_format cuda -video_size 1920:1080 -thread_queue_size 8192 -draw_mouse 1 -show_region 0 -offset_x 0 -offset_y 0 -rtbufsize 2147M -probesize 500M -analyzeduration 500M -framerate 60 -i desktop `
-noautoscale -shortest `
-map '0:a:0' -c:a copy -f wav "FFmpeg_Screen_Recording_$(get-date -f yyyy-MM-dd_HH-mm-ss).wav" `
-map '1:a:0' -c:a copy -f wav "FFmpeg_WebCAM_Recording_$(get-date -f yyyy-MM-dd_HH-mm-ss).wav" `
-map '2:v:0' -c:v h264_nvenc -gpu 0 -vsync 1 -r 60 -video_size 1920x1080 -video_track_timescale 60 -copytb 0 -delay 0 -rc constqp -qp 0 -rc-lookahead 0 -zerolatency 1 -maxrate:v 512M -bufsize:v 512M -pix_fmt yuv444p -profile:v high444p -preset p1 -tune ull -level 6.2 -coder vlc -weighted_pred 0 `
-f mov "FFmpeg_Screen_Recording_$(get-date -f yyyy-MM-dd_HH-mm-ss).mov"


    


    Second tab (second copy-paste action) :

    


    Get-Process -name 'ffmpeg' | foreach { $_.PriorityClass = "High" }


    


    How can I do it in the only one action ?

    


  • lavu : fix memory leaks by using a mutex instead of atomics

    14 novembre 2014, par wm4
    lavu : fix memory leaks by using a mutex instead of atomics
    

    The buffer pool has to atomically add and remove entries from the linked
    list of available buffers. This was done by removing the entire list
    with a CAS operation, working on it, and then setting it back again
    (using a retry-loop in case another thread was doing the same thing).

    This could effectively cause memory leaks : while a thread was working on
    the buffer list, other threads would allocate new buffers, increasing
    the pool’s total size. There was no real leak, but since these extra
    buffers were not needed, but not free’d either (except when the buffer
    pool was destroyed), this had the same effects as a real leak. For some
    reason, growth was exponential, and could easily kill the process due
    to OOM in real-world uses.

    Fix this by using a mutex to protect the list operations. The fancy
    way atomics remove the whole list to work on it is not needed anymore,
    which also avoids the situation which was causing the leak.

    Signed-off-by : Anton Khirnov <anton@khirnov.net>

    • [DH] libavutil/buffer.c
    • [DH] libavutil/buffer_internal.h
  • Workflow and data format for sending MediaRecorder output to express server

    30 avril 2021, par Max

    I've been trying to figure this out for a while but got lost between different ways of sending files and different data formats.

    &#xA;

    I am recording the stream of a canvas animation with MediaRecorder. As far as I understand this returns a blob with the video in binary format. Now I want to send this data to my express server and convert it to an h264 encoded mp4 file. My first impulse was to use ffmpeg on the server. Unfortunately I'm struggling with the details of the implementation. I am unsure on how to best transmit the data and in what format and how to feed it to ffmpeg.

    &#xA;

    This is what I have on the client side :

    &#xA;

    // Get stream from element&#xA;stream = element.captureStream(30)&#xA;&#xA;// Create media recorder with stream&#xA;const recorder = new MediaRecorder(stream)&#xA;&#xA;// Save to file&#xA;recorder.ondataavailable = ({ data }) => {&#xA;                &#xA;    const formData = new FormData()&#xA;    formData.append("file", data)&#xA;&#xA;    const options = {&#xA;        method: "POST",&#xA;        body: formData,&#xA;    }&#xA;&#xA;    fetch("http://localhost:3001/api/blob_to_mp4", options).then(&#xA;        (res) => {&#xA;            console.log(res)&#xA;        }&#xA;    )&#xA;}&#xA;

    &#xA;

    And this is what I have on the server side :

    &#xA;

    "use strict";&#xA;&#xA;const express = require("express");&#xA;const cors = require("cors");&#xA;const ffmpeg = require("fluent-ffmpeg");&#xA;const fs = require("fs");&#xA;&#xA;const port = process.env.PORT || 3001;&#xA;const app = express();&#xA;var command = ffmpeg();&#xA;&#xA;app.use(cors());&#xA;app.use(express.urlencoded({ extended: true }));&#xA;app.use(express.json());&#xA;&#xA;app.post("/api/blob_to_mp4", function (req, res) {&#xA;  var data = Buffer.from("");&#xA;&#xA;  // Add data&#xA;  req.on("data", function (chunk) {&#xA;    data = Buffer.concat([data, chunk]);&#xA;  });&#xA;&#xA;  // Full data available&#xA;  req.on("end", () => {&#xA;    req.rawBody = data;&#xA;  });&#xA;&#xA;  res.send("hello world");&#xA;});&#xA;&#xA;app.listen(port);&#xA;console.log(`Server running on port ${port}`);&#xA;

    &#xA;