
Recherche avancée
Médias (91)
-
Corona Radiata
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Lights in the Sky
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Head Down
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Echoplex
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Discipline
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
-
Letting You
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Audio
Autres articles (74)
-
Les vidéos
21 avril 2011, parComme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...) -
Amélioration de la version de base
13 septembre 2013Jolie 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 (...) -
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)
Sur d’autres sites (10069)
-
Lean Analytics in a Privacy-First Environment – Bootcamp with Timo Dechau
29 novembre 2024, par Daniel Crough — Banking and Financial Services, GDPR, Marketing, Privacy, Videos, Featured Banking Content -
Run scripts in other instances and pass variables from the first script to the second
3 février 2023, par Tyrone HirtI have the following script :


Get-ChildItem -Path $RenderClient -Recurse -Filter "ffmpeg crop.ps1" |
 Where-Object { Test-Path (Join-Path $_.DirectoryName *.mp4) } |
 ForEach-Object {
 try {
 Start-Process -WorkingDirectory $_.DirectoryName powershell.exe "-NoExit -File `"$($_.FullName)`""
 }
 catch {
 Write-Host -NoNewline -ForegroundColor Red "Não foi possivel cortar o arquivo:"; Write-Host -NoNewline -ForegroundColor White " $_.Name "; Write-Host -NoNewline -ForegroundColor White "`nMensagem de erro:"; Write-Host -NoNewline -ForegroundColor Red " $($_.Exception.Message)`n";
 }
 }
 }



This code is a part of my first script, basically it looks for
ffmpeg crop.ps1
files that have a.mp4
file in the same folder and runs those scripts.

The issue is that I would like to make the process a little cleaner and more practical, currently when I need to make a change in the
ffmpeg crop
script I need to open all the folders and change one by one.

To avoid this, I would like to have a single file
ffmpeg crop.ps1
, and every time a.mp4
file is found in the path specified in the first script, an instance of that single scriptffmpeg crop.ps1
is triggered, too I need$_.FullName
and$_.Name
of each.mp4
file found to be passed to each respective instance so that I can use these values within theffmpeg crop
script.

I've been racking my brain for days trying to get this to work, I'll be very grateful for any help with this.


Edit - in more detail


The $RenderClient folder of my script is
C:/Videos
inside that folder there are several child folders that follow the logic :01-01
,01-02
,02-01
,02-02
...



Currently, inside each child folder there is a script
ffmpeg crop.ps1
, this script is responsible for cutting a piece of the video that is inside that folder, however it is only activated if there is a.mp4
file to be cut, in the same folder that it, that is, for the scriptffmpeg crop.ps1
to be activated in folder01-01
, it is necessary to have the script itself and a.mp4
file.

This script would be triggered




This script would not be triggered




The point is, I would like to make this more practical, so instead of having one
ffmpeg crop.ps1
script inside each child folder, I would like to have only oneffmpeg crop.ps1
script, and it would stay in the parent folder.

I would like it to work like this :




For that, I would need to change my code, so that the script recursively searches for
.mp4
files inside the parent folder, for each file that is found, it must open an instance of the scriptffmpeg crop.ps1
that is in the parent folder and pass the variables$_.Name
and$_.FullName
of the files found to the respective instance of the openffmpeg crop.ps1
script, so that each instance will be executed correctly.

-
Organic Traffic : What It Is and How to Increase It
19 septembre 2023, par Erin — Analytics Tips