
Recherche avancée
Autres articles (47)
-
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 -
Publier sur MédiaSpip
13 juin 2013Puis-je poster des contenus à partir d’une tablette Ipad ?
Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir -
Librairies et binaires spécifiques au traitement vidéo et sonore
31 janvier 2010, parLes logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
Binaires complémentaires et facultatifs flvtool2 : (...)
Sur d’autres sites (10190)
-
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 : prefix encoder with "Lavc " in bitexact mode
18 mai 2014, par Michael Niedermayerffmpeg : prefix encoder with "Lavc " in bitexact mode
This avoids misleading encoder names like "encoder = prores"
Signed-off-by : Michael Niedermayer <michaelni@gmx.at>
- [DH] ffmpeg.c
- [DH] tests/ref/acodec/pcm-s16be_planar
- [DH] tests/ref/acodec/pcm-s16le_planar
- [DH] tests/ref/acodec/pcm-s24le_planar
- [DH] tests/ref/acodec/pcm-s32le_planar
- [DH] tests/ref/acodec/pcm-s8_planar
- [DH] tests/ref/acodec/pcm-u16be
- [DH] tests/ref/acodec/pcm-u16le
- [DH] tests/ref/acodec/pcm-u24be
- [DH] tests/ref/acodec/pcm-u24le
- [DH] tests/ref/acodec/pcm-u32be
- [DH] tests/ref/acodec/pcm-u32le
- [DH] tests/ref/fate/ffprobe_compact
- [DH] tests/ref/fate/ffprobe_csv
- [DH] tests/ref/fate/ffprobe_default
- [DH] tests/ref/fate/ffprobe_flat
- [DH] tests/ref/fate/ffprobe_ini
- [DH] tests/ref/fate/ffprobe_json
- [DH] tests/ref/fate/ffprobe_xml
- [DH] tests/ref/fate/filter-colormatrix1
- [DH] tests/ref/fate/filter-colormatrix2
- [DH] tests/ref/fate/filter-crop
- [DH] tests/ref/fate/filter-crop_scale
- [DH] tests/ref/fate/filter-crop_scale_vflip
- [DH] tests/ref/fate/filter-crop_vflip
- [DH] tests/ref/fate/filter-edgedetect
- [DH] tests/ref/fate/filter-edgedetect-colormix
- [DH] tests/ref/fate/filter-hue
- [DH] tests/ref/fate/filter-idet
- [DH] tests/ref/fate/filter-null
- [DH] tests/ref/fate/filter-pad
- [DH] tests/ref/fate/filter-pixdesc
- [DH] tests/ref/fate/filter-pixfmts-copy
- [DH] tests/ref/fate/filter-pixfmts-crop
- [DH] tests/ref/fate/filter-pixfmts-field
- [DH] tests/ref/fate/filter-pixfmts-fieldorder
- [DH] tests/ref/fate/filter-pixfmts-hflip
- [DH] tests/ref/fate/filter-pixfmts-il
- [DH] tests/ref/fate/filter-pixfmts-kerndeint
- [DH] tests/ref/fate/filter-pixfmts-lut
- [DH] tests/ref/fate/filter-pixfmts-null
- [DH] tests/ref/fate/filter-pixfmts-pad
- [DH] tests/ref/fate/filter-pixfmts-rotate
- [DH] tests/ref/fate/filter-pixfmts-scale
- [DH] tests/ref/fate/filter-pixfmts-super2xsai
- [DH] tests/ref/fate/filter-pixfmts-swapuv
- [DH] tests/ref/fate/filter-pixfmts-tinterlace_merge
- [DH] tests/ref/fate/filter-pixfmts-tinterlace_pad
- [DH] tests/ref/fate/filter-pixfmts-vflip
- [DH] tests/ref/fate/filter-pp
- [DH] tests/ref/fate/filter-pp2
- [DH] tests/ref/fate/filter-pp3
- [DH] tests/ref/fate/filter-pp4
- [DH] tests/ref/fate/filter-pp5
- [DH] tests/ref/fate/filter-pp6
- [DH] tests/ref/fate/filter-scale200
- [DH] tests/ref/fate/filter-scale500
- [DH] tests/ref/fate/filter-select
- [DH] tests/ref/fate/filter-setdar
- [DH] tests/ref/fate/filter-setsar
- [DH] tests/ref/fate/filter-thumbnail
- [DH] tests/ref/fate/filter-tile
- [DH] tests/ref/fate/filter-vflip
- [DH] tests/ref/fate/filter-vflip_crop
- [DH] tests/ref/fate/filter-vflip_vflip
- [DH] tests/ref/lavf/mkv
- [DH] tests/ref/lavf/mov
- [DH] tests/ref/lavf/nut
- [DH] tests/ref/lavf/ogg
- [DH] tests/ref/seek/lavf-mkv
- [DH] tests/ref/seek/lavf-nut
- [DH] tests/ref/seek/lavf-ogg
- [DH] tests/ref/vsynth/vsynth1-avui
- [DH] tests/ref/vsynth/vsynth1-dnxhd-1080i
- [DH] tests/ref/vsynth/vsynth1-prores
- [DH] tests/ref/vsynth/vsynth1-prores_ks
- [DH] tests/ref/vsynth/vsynth1-qtrle
- [DH] tests/ref/vsynth/vsynth1-qtrlegray
- [DH] tests/ref/vsynth/vsynth1-svq1
- [DH] tests/ref/vsynth/vsynth2-avui
- [DH] tests/ref/vsynth/vsynth2-dnxhd-1080i
- [DH] tests/ref/vsynth/vsynth2-prores
- [DH] tests/ref/vsynth/vsynth2-prores_ks
- [DH] tests/ref/vsynth/vsynth2-qtrle
- [DH] tests/ref/vsynth/vsynth2-qtrlegray
- [DH] tests/ref/vsynth/vsynth2-svq1
-
Error installing package in anaconda : Attempted to make prefix record for unknown package type
25 janvier 2020, par ashwinidsI’m getting the error below for doing any operation install, update or uninstall
ERROR conda.core.link:_execute(700) : An error occurred while
uninstalling package ’::ffmpeg-3.2.4-2’. Rolling back
transaction : doneValueError(’Attempted to make prefix record for unknown package type :
ffmpeg-3.2.4-2’,)Details about the environment :
OS : ubuntu 18.04
python version : intelpython3Conda info
active environment : base
active env location : /home/p****/intelpython3
shell level : 1
user config file : /home/p****/.condarc
populated config files : /home/p****/.condarc
conda version : 4.7.12
conda-build version : not installed
python version : 3.6.8.final.0
virtual packages : __cuda=10.1
base environment : /home/p****/intelpython3 (writable)
channel URLs : https://conda.anaconda.org/intel/linux-64
https://conda.anaconda.org/intel/noarch
https://repo.anaconda.com/pkgs/main/linux-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/linux-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /home/p****/intelpython3/pkgs
/home/p****/.conda/pkgs
envs directories : /home/p****/intelpython3/envs
/home/p****/.conda/envs
platform : linux-64
user-agent : conda/4.7.12 requests/2.20.1 CPython/3.6.8 Linux/5.0.0-36-generic ubuntu/18.04.3 glibc/2.27
UID:GID : 1000:1000
netrc file : None
offline mode : FalseConda list
# packages in environment at /home/p****/intelpython3:
#
# Name Version Build Channel
_tflow_select 2.1.0 gpu anaconda
absl-py 0.8.0 py36_0 anaconda
affine 2.3.0 pypi_0 pypi
asn1crypto 0.24.0 py36_3 intel
astor 0.8.0 py36_0 anaconda
atomicwrites 1.3.0 pypi_0 pypi
attrs 19.3.0 pypi_0 pypi
audioread 2.1.6 py36_0 <unknown>
awscli 1.16.292 pypi_0 pypi
backcall 0.1.0 py36_2 <unknown>
backports 1.0 py36_9 <unknown>
bayesian-optimization 1.0.1 pypi_0 pypi
bleach 2.1.3 py36_2 <unknown>
boto3 1.10.19 pypi_0 pypi
botocore 1.13.28 pypi_0 pypi
bzip2 1.0.6 17 intel
c-ares 1.15.0 h7b6447c_1001 anaconda
causalgraphicalmodels 0.0.4 pypi_0 pypi
certifi 2018.1.18 py36_2 intel
cffi 1.11.5 py36_3 intel
chardet 3.0.4 py36_3 intel
click 7.0 pypi_0 pypi
click-plugins 1.1.1 pypi_0 pypi
cligj 0.5.0 pypi_0 pypi
colorama 0.4.1 pypi_0 pypi
conda 4.7.12 py36_0
conda-env 2.6.0 1
conda-package-handling 1.6.0 py36h7b6447c_0 anaconda
cryptography 2.3 py36_1 intel
cudatoolkit 10.1.243 h6bb024c_0
cudnn 7.6.0 cuda10.1_0 anaconda
cupti 10.1.168 0 anaconda
cvxopt 1.2.3 pypi_0 pypi
cycler 0.10.0 py36_7 intel
cython 0.29.6 py36h7b7c402_0 intel
daal 2019.4 intel_243 <unknown>
daal4py 2019.4 py36h7b7c402_0 intel
dbus 1.13.12 h746ee38_0
decorator 4.3.0 py36_3 <unknown>
descartes 1.1.0 pypi_0 pypi
docutils 0.15.2 pypi_0 pypi
dowhy 0.1.1 pypi_0 pypi
entrypoints 0.2.3 py36_2 <unknown>
expat 2.2.6 he6710b0_0
ffmpeg 3.2.4 2 <unknown>
fiona 1.8.11 pypi_0 pypi
fontconfig 2.12.6 h49f89f6_0
freetype 2.8 hab7d2ae_1
funcsigs 1.0.2 py36_7 intel
gast 0.3.2 py_0 anaconda
geopandas 0.6.2 pypi_0 pypi
get_terminal_size 1.0.0 py36_7 <unknown>
glib 2.63.1 h5a9c865_0
google-pasta 0.1.7 py_0 anaconda
grpcio 1.14.1 py36h9ba97e2_0 anaconda
gst-plugins-base 1.12.4 h33fb286_0
gstreamer 1.12.4 hb53b477_0
h5py 2.9.0 py36h7918eee_0 anaconda
hdf5 1.10.4 hb1b8bf9_0 anaconda
html5lib 1.0.1 py36_4 <unknown>
icc_rt 2019.4 intel_243 <unknown>
icu 58.2 h9c2bf20_1
idna 2.6 py36_3 intel
imageio 2.6.1 pypi_0 pypi
imgaug 0.2.6 pypi_0 pypi
impi_rt 2019.4 intel_243 <unknown>
importlib-metadata 0.23 pypi_0 pypi
intel-openmp 2019.4 intel_243 <unknown>
intelpython 2019.4 0 intel
ipp 2019.4 intel_243 <unknown>
ipykernel 4.6.1 py36_2 <unknown>
ipython 6.3.1 py36_3 <unknown>
ipython_genutils 0.2.0 py36_2 <unknown>
jedi 0.12.0 py36_2 <unknown>
jinja2 2.10.3 pypi_0 pypi
jmespath 0.9.4 pypi_0 pypi
joblib 0.13.2 pypi_0 pypi
jpeg 9b h024ee3a_2
json5 0.8.5 pypi_0 pypi
jsonschema 3.2.0 pypi_0 pypi
jupyter 1.0.0 py36_7 intel
jupyter_client 5.1.0 py36_5 <unknown>
jupyter_console 5.1.0 py36_2 <unknown>
jupyter_core 4.4.0 py36_6 <unknown>
jupyterlab 1.2.3 pypi_0 pypi
jupyterlab-server 1.0.6 pypi_0 pypi
keras 2.3.1 pypi_0 pypi
keras-applications 1.0.8 py_0 anaconda
keras-bert 0.80.0 pypi_0 pypi
keras-embed-sim 0.7.0 pypi_0 pypi
keras-layer-normalization 0.14.0 pypi_0 pypi
keras-multi-head 0.22.0 pypi_0 pypi
keras-pos-embd 0.11.0 pypi_0 pypi
keras-position-wise-feed-forward 0.6.0 pypi_0 pypi
keras-preprocessing 1.1.0 py_1 anaconda
keras-rectified-adam 0.17.0 pypi_0 pypi
keras-self-attention 0.41.0 pypi_0 pypi
keras-transformer 0.31.0 pypi_0 pypi
kiwisolver 1.0.1 py36_2 intel
libffi 3.2.1 11 intel
libgcc-ng 9.1.0 hdf63c60_0 anaconda
libgfortran-ng 7.3.0 hdf63c60_0 anaconda
libiconv 1.14 4 <unknown>
libpng 1.6.36 2 intel
libprotobuf 3.9.2 hd408876_0 anaconda
librosa 0.6.3 pypi_0 pypi
libsodium 1.0.16 3 <unknown>
libstdcxx-ng 9.1.0 hdf63c60_0 anaconda
libtiff 4.0.9 he85c1e1_1
libxcb 1.13 h1bed415_1
libxml2 2.9.8 hf84eae3_0
lightgbm 2.3.1 pypi_0 pypi
llvmlite 0.27.1 py36_0 intel
markdown 3.1.1 py36_0 anaconda
markupsafe 1.0 py36_3 <unknown>
matplotlib 2.1.0 py36hba5de38_0
mercantile 1.1.2 pypi_0 pypi
metaflow 2.0.0 pypi_0 pypi
mistune 0.8.3 py36_2 <unknown>
mkl 2019.4 intel_243 <unknown>
mkl-service 1.0.0 py36h7b7c402_11 intel
mkl_fft 1.0.11 py36h7b7c402_2 intel
mkl_random 1.0.2 py36h7b7c402_4 intel
more-itertools 7.2.0 pypi_0 pypi
mpi4py 3.0.0 py36_3 intel
mpmath 1.1.0 pypi_0 pypi
munch 2.5.0 pypi_0 pypi
nbconvert 5.2.1 py36_2 <unknown>
nbformat 4.4.0 py36_2 <unknown>
networkx 2.4 pypi_0 pypi
ninja 1.9.0 py36hfd86e86_0
noisyopt 0.2.2 pypi_0 pypi
notebook 5.2.2 py36_1 intel
numba 0.42.1 np116py36_2 intel
numexpr 2.6.8 py36_2 intel
numpy 1.16.2 py36h7b7c402_0 intel
numpy-base 1.16.2 py36_0 intel
oauthlib 3.1.0 pypi_0 pypi
olefile 0.46 py_0
openssl 1.0.2r 2 intel
packaging 19.2 pypi_0 pypi
pandas 0.24.1 py36_3 intel
pandocfilters 1.4.1 py36_2 <unknown>
parso 0.2.0 py36_2 <unknown>
path.py 11.0.1 py36_2 <unknown>
pcre 8.43 he6710b0_0
pexpect 4.2.1 py36_4 <unknown>
pickleshare 0.7.4 py36_3 <unknown>
pillow 6.2.1 pypi_0 pypi
pip 19.3.1 pypi_0 pypi
pluggy 0.13.1 pypi_0 pypi
prompt_toolkit 1.0.15 py36_2 <unknown>
protobuf 3.9.2 py36he6710b0_0 anaconda
ptyprocess 0.5.2 py36_2 <unknown>
pulp 2.0 pypi_0 pypi
py 1.8.0 pypi_0 pypi
pyasn1 0.4.8 pypi_0 pypi
pycosat 0.6.3 py36_3 intel
pycparser 2.18 py36_2 intel
pydot 1.4.1 pypi_0 pypi
pyeditline 2.0.0 py36_0 intel
pygments 2.2.0 py36_5 <unknown>
pygmy 0.2.0 pypi_0 pypi
pyopenssl 17.5.0 py36_2 intel
pyparsing 2.2.0 py36_2 intel
pyportfolioopt 0.4.3 pypi_0 pypi
pyproj 2.4.2.post1 pypi_0 pypi
pyqt 5.6.0 py36h22d08a2_6
pyrsistent 0.15.6 pypi_0 pypi
pysocks 1.6.7 py36_1 intel
pytesseract 0.3.0 pypi_0 pypi
pytest 4.6.6 pypi_0 pypi
python 3.6.8 7 intel
python-dateutil 2.6.0 py36_12 intel
python-graphviz 0.13 pypi_0 pypi
pytorch 1.3.1 py3.6_cuda10.1.243_cudnn7.6.3_0 pytorch
pytz 2018.4 py36_3 intel
pywavelets 1.1.1 pypi_0 pypi
pyyaml 4.1 py36_3 intel
pyzmq 16.0.2 py36_6 <unknown>
qt 5.6.2 hd25b39d_14
rasterio 1.1.1 pypi_0 pypi
regex 2019.11.1 pypi_0 pypi
requests 2.20.1 py36_1 intel
requests-oauthlib 1.3.0 pypi_0 pypi
resampy 0.2.1 pypi_0 pypi
rio-cogeo 1.1.6 pypi_0 pypi
rsa 3.4.2 pypi_0 pypi
ruamel_yaml 0.11.14 py36_4 intel
s3transfer 0.2.1 pypi_0 pypi
sacremoses 0.0.35 pypi_0 pypi
scikit-image 0.16.2 pypi_0 pypi
scikit-learn 0.20.3 py36h7b7c402_5 intel
scipy 1.3.3 pypi_0 pypi
seaborn 0.9.0 pypi_0 pypi
sentencepiece 0.1.83 pypi_0 pypi
setuptools 39.0.1 py36_0 intel
shapely 1.6.4.post2 pypi_0 pypi
simplegeneric 0.8.1 py36_7 <unknown>
sip 4.18.1 py36hf484d3e_2
six 1.11.0 py36_3 intel
smp 0.1.4 py36_0 intel
snuggs 1.4.7 pypi_0 pypi
sqlite 3.27.2 4 intel
supermercado 0.0.5 pypi_0 pypi
sympy 1.4 pypi_0 pypi
tbb 2019.6 intel_243 <unknown>
tbb4py 2019.6 py36_intel_0 <unknown>
tcl 8.6.4 24 intel
tensorboard 1.14.0 py36hf484d3e_0 anaconda
tensorflow 1.14.0 gpu_py36h3fb9ad6_0 anaconda
tensorflow-base 1.14.0 gpu_py36he45bfe2_0 anaconda
tensorflow-estimator 1.14.0 py_0 anaconda
tensorflow-gpu 1.14.0 h0d30ee6_0 anaconda
termcolor 1.1.0 py36_1 anaconda
terminado 0.8.1 py36_2 <unknown>
testpath 0.3.1 py36_2 <unknown>
tk 8.6.4 29 intel
torchvision 0.4.2 py36_cu101 pytorch
tornado 4.5.2 py36_5 <unknown>
tqdm 4.36.1 py_0 anaconda
traitlets 4.3.2 py36_3 <unknown>
transformers 2.1.1 pypi_0 pypi
tweepy 3.8.0 pypi_0 pypi
urllib3 1.22 pypi_0 pypi
wcwidth 0.1.7 py36_6 <unknown>
webencodings 0.5.1 py36_0 <unknown>
werkzeug 0.16.0 py_0 anaconda
wheel 0.31.0 py36_3 intel
widgetsnbextension 3.2.0 py36_1 <unknown>
wrapt 1.11.2 py36h7b6447c_0 anaconda
x264 20131218 0 <unknown>
xgboost 0.81 py36_0 intel
xz 5.2.3 2 intel
yaml 0.1.7 2 intel
zipp 0.6.0 pypi_0 pypi
zlib 1.2.11 5 intel
</unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown></unknown>