
Recherche avancée
Médias (91)
-
Les Miserables
9 décembre 2019, par
Mis à jour : Décembre 2019
Langue : français
Type : Textuel
-
VideoHandle
8 novembre 2019, par
Mis à jour : Novembre 2019
Langue : français
Type : Video
-
Somos millones 1
21 juillet 2014, par
Mis à jour : Juin 2015
Langue : français
Type : Video
-
Un test - mauritanie
3 avril 2014, par
Mis à jour : Avril 2014
Langue : français
Type : Textuel
-
Pourquoi Obama lit il mes mails ?
4 février 2014, par
Mis à jour : Février 2014
Langue : français
-
IMG 0222
6 octobre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Image
Autres articles (54)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...) -
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 ) (...)
Sur d’autres sites (6794)
-
Keep trying a command until it returns "True" and then execute another
6 janvier 2023, par Tyrone HirtI'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 isless 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.


-
ffmpeg : change command line option -dump to work without -loglevel debug
10 décembre 2015, par Tom Marecekffmpeg : change command line option -dump to work without -loglevel debug
hex and -dump command line options do nothing unless -loglevel debug is set.
dump by itself is useful for monitoring live streams (to get the current PTS for example) however when it is used with -loglevel debug for an RTMP stream, librtmp also dumps the packet data which makes the output too noisy.
do_pkt_dump is only set in check_keyboard_interaction or by the -dump command line option so this change should have no effect on any other parts of the code..
Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>
-
FFMPEG-PHP converted videos don't work on mobiles
16 avril 2018, par casusbelliI’m working on a upload script where users can upload videos however I’m having an issue with FFMPEG-PHP : The converted videos don’t work on mobiles while they are working fine on desktop.
//FFMPEG Instance
require_once '/root/vendor/autoload.php';
$ffmpeg = FFMpeg\FFMpeg::create();
$video = $ffmpeg->open($temp_path);
//WEBM Convert
$format_webm = new FFMpeg\Format\Video\WebM();
$video->save($format_webm, 'video.webm');
//MP4 Convert
$format_mp4 = new FFMpeg\Format\Video\X264();
$format_mp4->setAudioCodec("libmp3lame");
$video->save($format_mp4, 'video.mp4');Fatal error : Uncaught
Alchemy\BinaryDriver\Exception\ExecutionFailureException : ffmpeg
failed to execute command ’/usr/bin/ffmpeg’ ’-y’ ’-i’
’/var/www/html/v/temp/13759.mp4’ ’-vcodec’ ’libx264’ ’-acodec’ ’aac’
’-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’ ’128k’ ’-pass’ ’1’
’-passlogfile’
’/tmp/ffmpeg-passes5ad4e29d1b71e6oveh/pass-5ad4e29d1b7b2’
’/var/www/html/v/13759.mp4’ in
/root/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php:100\nStack
trace :\n#0
/root/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php(72) :
Alchemy\BinaryDriver\ProcessRunner->doExecutionFailure(’’/usr/bin/ffmpe...’)\n#1
/root/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/AbstractBinary.php(209) :
Alchemy\BinaryDriver\ProcessRunner->run(Object(Symfony\Component\Process\Process),
Object(SplObjectStorage), false) in
/root/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Media/Video.php on line
109Any help ?