Recherche avancée

Médias (0)

Mot : - Tags -/presse-papier

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (90)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

  • 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.

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

Sur d’autres sites (9782)

  • Keep trying a command until it returns "True" and then execute another

    6 janvier 2023, par Tyrone Hirt

    I'm trying to make a script to check the processor usage for a specific process every 10 seconds, and when the usage is less than 2% I want another 2 commands to be executed.

    


    The purpose is to know when the program has finished processing the requests, in order to release the execution of the other commands.

    


    I created this script to check the processor usage by this application :

    


    SET ProcessorUsage = wmic path Win32_PerfFormattedData_PerfProc_Process get Name,PercentProcessorTime | findstr /i /c:RenderQuery

%ProcessorUsage%


    


    And these are the commands I want to be executed when the processor usage of the RenderQuery application is less than 2% :

    


    for /f "delims=" %%X in ('dir /s/b/ad Proxy') do for /f "delims=" %%Y in ('dir /s/b/a-d "%%X"') do move "%%Y" ".\03. Proxy"

for /f "delims=" %%i in ('dir /s/b/ad Proxy') do rd "%%i"


    


    I tried to create a script that way here :

    


    SET ProcessorUsage = wmic path Win32_PerfFormattedData_PerfProc_Process get Name,PercentProcessorTime | findstr /i /c:RenderQuery
:Loop
IF %ProcessorUsage% LSS 2 (
(for /f "delims=" %%X in ('dir /s/b/ad Proxy') do for /f "delims=" %%Y in ('dir /s/b/a-d "%%X"') do move "%%Y" ".\03. Proxy") && (for /f "delims=" %%i in ('dir /s/b/ad Proxy') do rd "%%i")
) ELSE (
sleep 10 && goto Loop
)


    


    I also tried this way here :

    


    SET ProcessorUsage = wmic path Win32_PerfFormattedData_PerfProc_Process get Name,PercentProcessorTime | findstr /i /c:RenderQuery

:Loop
for %ProcessorUsage% LSS 2 do (
(for /f "delims=" %%X in ('dir /s/b/ad Proxy') do for /f "delims=" %%Y in ('dir /s/b/a-d "%%X"') do move "%%Y" ".\03. Proxy") && (for /f "delims=" %%i in ('dir /s/b/ad Proxy') do rd "%%i") || (sleep 10 && goto Loop)
)


    


    With these scripts I tried to create the window that only blinks and closes right away...

    


    What's the best way to do this ?

    


    EDIT

    


    Explaining in more detail : I work with video production, so I constantly need to render Proxy files, which are video files with low quality to be used during my video editing and replaced at the end of editing, this makes the much smoother video editing.

    


    Having said that, I have a folder model, inside this folder model there is a folder where I always download the video files from the camera and in that folder there is always a .bat file that opens all the video files in the software that generates proxy files of the camera's video files.

    


    This .bat file has this exact code :

    


    start "" "C:\Users\User\Downloads\FFmpeg_Batch_AV_Converter_Portable_2.8.4_x64\FFBatch.exe" -f "%~dp0\"


    


    When this software opens, it automatically renders the proxy files and their output is always in a child folder of the original files folder, and the name of the folder is Proxy.

    


    The issue is that I don't want them to be in several separate Proxy folders, so I created another .bat file that is in the parent folder of all video files, this script contains exactly these lines :

    


    for /f "delims=" %%X in ('dir /s/b/ad Proxy') do for /f "delims=" %%Y in ('dir /s/b/a-d "%%X"') do move "%%Y" ".\03. Proxy"

for /f "delims=" %%i in ('dir /s/b/ad Proxy') do rd "%%i"


    


    That is, it only searches recursively for files that are inside folders named Proxy, then it moves these files to the folder 03. Proxy that is inside the parent folder.

    


    The second line looks for all proxy folders (which are now empty) and deletes them.

    


    The point is : I currently run the second script manually, as soon as the render finishes, and I would like it to run automatically.

    


    Given this, I thought of adding a line in the first script, which opens the video files in the rendering program, this line would call the second script in the background, and the second script would be analyzing the CPU usage of this application every 10 seconds, and when the usage is less than 2% (in theory there is nothing else rendering, since it has a low CPU usage) it executes the lines that move the files and remove the folders.

    


    I think there's a good change for this to work, because this software renders 4 videos at a time, and this means that there is no time between stopping rendering a video and starting another... the CPU usage is always very high until all the videos are finished, so I think this would be the best signal to release the other commands.

    


  • How to let ffmpeg download partial m3u8 video without download the full ones ?

    15 octobre 2018, par 3142 maple

    I want to get a video from a m3u8 stream from range : 21:24 22:54.
    I found a answer at https://superuser.com/questions/758943/ffmpeg-cut-for-time-range , and it said I can use -ss 00:21:24.00 -t 90 to cut it.

    But I found that ffmpeg is actually download the whole video until 00:21:24.00 rather that just download 21:24 22:54 .
    How can I let it just download the 90 seconds I want ?

    The command I came up :

    ffmpeg -i "M3U8URL" -acodec copy -vcodec copy -ss 00:21:24.00 -t 90 output.mp4
  • Getting ffmpeg to capture the full screen of xfvb-run screen running puppeteer script, and send it over rtmp

    30 janvier, par james

    My problem

    


    I can't get ffmpeg or xvfb-run to stream the full screen to ffplay/videolan, it only captures a part of the screen.

    


    Update 2

    


    I answered the question myself in a follow up answer, hopefully it can be useful for someone else with the same problem.

    


    Update 1

    


    So the problem is definitely with xvfb-run, since the two following commands, still give a webm file, that only show parts of the screen

    


    ffmpeg -f x11grab -i :99 -g 50 -b:v 4000k -maxrate 4000k -bufsize 8000k -f webm -s 384x216 "blank.webm"

    


    xvfb-run -n 99 -a --server-args="-screen 0 1024x8000x24 -ac -nolisten tcp -dpi 96 +extension RANDR" "node index.js"

    


    What I've tried

    


      

    • I've tried changing ffmpeg command and xvfb-run, for example adding "-vf format=yuv420p" or "-filter:v "crop=iw-400:ih-40,scale=960:720" to ffmpeg command
    • 


    • I've tried to show other applications under xvfb-run instead of puppeteer (chrome..)
    • 


    • Recording screen with ffmpeg and saving it to a file, to see if there's a problem with the rtmp stream
    • 


    


    But still no luck. That's why I'm reaching out to the stackoverflow community.

    


    xvfb-run command

    


    xvfb-run -n 99 -a --server-args="-screen 0 1024x8000x24 -ac -nolisten tcp -dpi 96 +extension RANDR" "node index.js"

    


    ffmpeg command to capture xvfb-run virtual screen

    


    ffmpeg -f x11grab -i :99 -f pulse -i default -c:v libx264 -c:a aac  -g 50 -b:v 4000k -maxrate 4000k -bufsize 8000k -f flv -listen 1 rtmp://localhost:4444/stream

    


    And finally to show the rtmp stream

    


    ffplay -fflags -nobuffer -flags low_delay -probesize 32 -flags low_delay -analyzeduration 0 -i rtmp://localhost:4444/stream

    


    The puppeteer script (index.js) which xfvb-runs

    


    

import puppeteer from 'puppeteer';
let initPuppeteer = async () => {
  const launchArgs = [
    //'--window-size=1280,1024',
    '--disable-web-security',
    '--disable-features=IsolateOrigins',
    '--disable-site-isolation-trials',
    '--app',
    '--kiosk',
  ]
  await puppeteer.launch({headless: false, ignoreDefaultArgs: ["--enable-automation"], args: launchArgs});
  const page = await this.browser.newPage();
  const device = puppeteer.devices['Nexus 10'];
  await page.emulate(device);
  await page.goto("https://google.com");
}
initPuppeteer()