fr/VideoTools.psm1-Help.xml
|
<?xml version='1.0' encoding='utf-8'?>
<helpItems xmlns="http://msh" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:maml="http://schemas.microsoft.com/maml/2004/10" schema="maml"> <command:command> <command:details> <command:name>New-VideoConversion</command:name> <maml:description> <maml:para>Crée une VideoConversion à partir de métadonnées ou d’un fichier.</maml:para> </maml:description> <command:verb>New</command:verb> <command:noun>VideoConversion</command:noun> </command:details> <maml:description> <maml:para>Réutilise un VideoFile ou sonde un fichier pour initialiser le modèle de conversion. Le modèle conserve les paramètres. UpdateCommandLine prend une demande résolue et produit les arguments FFmpeg. Indiquez les chemins et les pistes dans la demande. La création du modèle et la génération des arguments n’exécutent aucun encodage.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-VideoConversion</maml:name> <command:parameter required="false" position="named" pipelineInput="false" globbing="false" variableLength="false" aliases="none"> <maml:name>InputVideo</maml:name> <command:parameterValue required="true">VideoFile</command:parameterValue> <dev:type> <maml:name>VideoFile</maml:name> </dev:type> </command:parameter> <command:parameter required="false" position="named" pipelineInput="false" globbing="false" variableLength="false" aliases="none"> <maml:name>WhatIf</maml:name> <dev:type> <maml:name>SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" position="named" pipelineInput="false" globbing="false" variableLength="false" aliases="none"> <maml:name>Confirm</maml:name> <dev:type> <maml:name>SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" position="named" pipelineInput="false" globbing="false" variableLength="false" aliases="none"> <maml:name>OutputPath</maml:name> <command:parameterValue required="true">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> </dev:type> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>New-VideoConversion</maml:name> <command:parameter required="false" position="named" pipelineInput="false" globbing="false" variableLength="false" aliases="none"> <maml:name>VideoFile</maml:name> <command:parameterValue required="true">FileInfo</command:parameterValue> <dev:type> <maml:name>FileInfo</maml:name> </dev:type> </command:parameter> <command:parameter required="false" position="named" pipelineInput="false" globbing="false" variableLength="false" aliases="none"> <maml:name>WhatIf</maml:name> <dev:type> <maml:name>SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" position="named" pipelineInput="false" globbing="false" variableLength="false" aliases="none"> <maml:name>Confirm</maml:name> <dev:type> <maml:name>SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" position="named" pipelineInput="false" globbing="false" variableLength="false" aliases="none"> <maml:name>OutputPath</maml:name> <command:parameterValue required="true">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" position="named" pipelineInput="false" globbing="false" variableLength="false" aliases="none"> <maml:name>InputVideo</maml:name> <maml:description> <maml:para>Objet VideoFile existant. Réutilise ses métadonnées sans sonder de nouveau le fichier.</maml:para> </maml:description> <command:parameterValue required="true">VideoFile</command:parameterValue> <dev:type> <maml:name>VideoFile</maml:name> </dev:type> </command:parameter> <command:parameter required="false" position="named" pipelineInput="false" globbing="false" variableLength="false" aliases="none"> <maml:name>WhatIf</maml:name> <maml:description> <maml:para>Indique l’opération que la commande effectuerait.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" position="named" pipelineInput="false" globbing="false" variableLength="false" aliases="none"> <maml:name>Confirm</maml:name> <maml:description> <maml:para>Demande confirmation avant d’effectuer l’opération.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" position="named" pipelineInput="false" globbing="false" variableLength="false" aliases="none"> <maml:name>VideoFile</maml:name> <maml:description> <maml:para>Fichier existant à sonder. Un fichier absent ne produit aucun modèle. Les médias invalides et les échecs du sondage peuvent provoquer une erreur.</maml:para> </maml:description> <command:parameterValue required="true">FileInfo</command:parameterValue> <dev:type> <maml:name>FileInfo</maml:name> </dev:type> </command:parameter> <command:parameter required="false" position="named" pipelineInput="false" globbing="false" variableLength="false" aliases="none"> <maml:name>OutputPath</maml:name> <maml:description> <maml:para>Initialise le chemin de sortie du modèle. Renseignez OutputPath dans la demande résolue lors de la construction des arguments.</maml:para> </maml:description> <command:parameterValue required="true">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>Aucune</maml:name> </dev:type> <maml:description> <maml:para>Cette commande n’accepte aucune entrée par pipeline.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>VideoConversion</maml:name> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>-------------------------- EXEMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>$VO = New-VideoFile -VideoFile (Get-Item -LiteralPath 'C:\Videos\sample.mp4') $VOt = New-VideoConversion -InputVideo $VO -OutputPath '.\converted.mkv' $VOt | Select-Object OutputPath, Resolution, OutputVideoCodec</dev:code> <dev:remarks> <maml:para>Initialise la conversion depuis une vidéo déjà examinée. Aucun fichier de sortie n’est créé.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXEMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>$VOt = New-VideoConversion -VideoFile (Get-Item -LiteralPath 'C:\Videos\sample.mp4') $VOt.InputVideo | Select-Object VideoCodecName, Resolution</dev:code> <dev:remarks> <maml:para>Sonde le fichier et crée le modèle en un seul appel. Utilisez InputVideo si vous disposez déjà de l’objet VideoFile.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXEMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>$source = Get-Item -LiteralPath 'C:\Videos\sample.mp4' $VO = New-VideoFile -VideoFile $source $VOt = New-VideoConversion -InputVideo $VO $request = @{ InputPath = $source.FullName OutputPath = Join-Path $source.DirectoryName 'sample-copy.mkv' VideoStream = $VO.VideoStreamId Encoder = 'copy' AudioStream = $VO.AudioStreamId AudioCodec = 'copy' } $VOt.UpdateCommandLine($request)</dev:code> <dev:remarks> <maml:para>Affiche les arguments de copie des flux vidéo et audio sélectionnés. Une valeur AudioStream de -1 omet l’audio. Choisissez un conteneur compatible avec les flux copiés.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXEMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>$source = Get-Item -LiteralPath 'C:\Videos\sample.mp4' $VO = New-VideoFile -VideoFile $source $VOt = New-VideoConversion -InputVideo $VO $request = @{ InputPath = $source.FullName OutputPath = Join-Path $source.DirectoryName 'sample-half.mkv' VideoStream = $VO.VideoStreamId Encoder = 'libx264' AudioStream = -1 Filters = '-vf scale=iw/2:ih/2' PixelFormat = '-pix_fmt yuv420p' Preset = 'fast' } $VOt.UpdateCommandLine($request)</dev:code> <dev:remarks> <maml:para>Prépare un encodage H.264 logiciel à demi-résolution, sans audio. Utilisez des dimensions divisibles par quatre et une version de FFmpeg avec libx264. Ces arguments doivent ensuite être exécutés séparément par FFmpeg.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXEMPLE 5 --------------------------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>$source = Get-Item -LiteralPath 'C:\Videos\sample.mp4' $VO = New-VideoFile -VideoFile $source $track = $VO.AudioTracks | Select-Object -First 1 if (!$track) { throw 'The input has no audio track.' } $VOt = New-VideoConversion -InputVideo $VO $request = @{ InputPath = $source.FullName OutputPath = Join-Path $source.DirectoryName 'sample-audio.mkv' VideoStream = $VO.VideoStreamId Encoder = 'copy' AudioTracks = @(@{ StreamIndex = $track.StreamIndex; Enabled = $true; Encoder = 'copy' }) } $VOt.UpdateCommandLine($request)</dev:code> <dev:remarks> <maml:para>Prépare la copie de la vidéo et de la première piste audio. Une liste AudioTracks vide exclut l’audio. Choisissez les indices à partir des flux du fichier d’entrée courant.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXEMPLE 6 --------------------------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>New-VideoConversion -VideoFile (Get-Item -LiteralPath 'C:\Videos\sample.mp4') -WhatIf</dev:code> <dev:remarks> <maml:para>Prévisualise la création du modèle sans sonder le fichier ni créer de conversion.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <maml:navigationLink> <maml:linkText>about_VideoTools</maml:linkText> </maml:navigationLink> </maml:relatedLinks> </command:command> <command:command> <command:details> <command:name>New-VideoFile</command:name> <maml:description> <maml:para>Crée un VideoFile et examine le fichier vidéo si vous en indiquez un.</maml:para> </maml:description> <command:verb>New</command:verb> <command:noun>VideoFile</command:noun> </command:details> <maml:description> <maml:para>Avec un fichier, lit les propriétés vidéo et les flux avec FFprobe. Le comptage des images peut exiger un parcours du flux ou le recours à MediaInfo. La lecture est synchrone et peut échouer si un outil manque, si le fichier est invalide ou si aucun flux vidéo ne peut être lu. Sans fichier, crée un modèle vide. Pour un fichier uniquement audio ou de sous-titres, utilisez la méthode de sondage générique dans about_VideoTools.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-VideoFile</maml:name> <command:parameter required="false" position="0" pipelineInput="false" globbing="false" variableLength="false" aliases="none"> <maml:name>VideoFile</maml:name> <command:parameterValue required="true">FileInfo</command:parameterValue> <dev:type> <maml:name>FileInfo</maml:name> </dev:type> </command:parameter> <command:parameter required="false" position="named" pipelineInput="false" globbing="false" variableLength="false" aliases="none"> <maml:name>WhatIf</maml:name> <dev:type> <maml:name>SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" position="named" pipelineInput="false" globbing="false" variableLength="false" aliases="none"> <maml:name>Confirm</maml:name> <dev:type> <maml:name>SwitchParameter</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" position="0" pipelineInput="false" globbing="false" variableLength="false" aliases="none"> <maml:name>VideoFile</maml:name> <maml:description> <maml:para>Fichier multimédia existant contenant un flux vidéo lisible. Accepte un FileInfo ou un chemin que PowerShell peut convertir en FileInfo.</maml:para> </maml:description> <command:parameterValue required="true">FileInfo</command:parameterValue> <dev:type> <maml:name>FileInfo</maml:name> </dev:type> </command:parameter> <command:parameter required="false" position="named" pipelineInput="false" globbing="false" variableLength="false" aliases="none"> <maml:name>WhatIf</maml:name> <maml:description> <maml:para>Indique l’opération que la commande effectuerait.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" position="named" pipelineInput="false" globbing="false" variableLength="false" aliases="none"> <maml:name>Confirm</maml:name> <maml:description> <maml:para>Demande confirmation avant d’effectuer l’opération.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>Aucune</maml:name> </dev:type> <maml:description> <maml:para>Cette commande n’accepte aucune entrée par pipeline.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>VideoFile</maml:name> </dev:type> </command:returnValue> </command:returnValues> <command:examples> <command:example> <maml:title>-------------------------- EXEMPLE 1 --------------------------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>$VO = New-VideoFile $VO | Select-Object VideoCodecName, Resolution, FrameCountSource</dev:code> <dev:remarks> <maml:para>Crée un modèle vide sans ouvrir de fichier ni lancer FFprobe.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXEMPLE 2 --------------------------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>$VO = New-VideoFile -VideoFile (Get-Item -LiteralPath 'C:\Videos\sample.mp4') $VO | Select-Object VideoCodecName, Resolution, FPS, LengthSec, TotalFrames, FrameCountSource</dev:code> <dev:remarks> <maml:para>Lit le codec, les dimensions, la cadence, la durée en secondes et le nombre d’images. Si la valeur est zéro et que la source est Unknown, le nombre d’images est inconnu. Le comptage peut prendre plus de temps que la lecture des métadonnées.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXEMPLE 3 --------------------------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>$VO = New-VideoFile -VideoFile (Get-Item -LiteralPath 'C:\Videos\sample.mp4') $VO.Streams | Format-Table StreamIndex, Type, Codec, Language, Title $VO.AudioTracks | Format-Table StreamIndex, Codec, Language, Channels, Default $VO.SubtitleTracks | Format-Table StreamIndex, Codec, Language, Forced</dev:code> <dev:remarks> <maml:para>Affiche tous les flux, puis les pistes audio et de sous-titres. StreamIndex est propre au fichier d’entrée. Inspectez chaque fichier avant de choisir ses pistes.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXEMPLE 4 --------------------------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>Get-ChildItem -LiteralPath 'C:\Videos' -File -Filter '*.mp4' | ForEach-Object { $VO = New-VideoFile -VideoFile $_ [pscustomobject]@{ File = $_.Name Resolution = $VO.Resolution DurationSeconds = $VO.LengthSec AudioTracks = @($VO.AudioTracks).Count } }</dev:code> <dev:remarks> <maml:para>Construit un résumé pour chaque MP4. Chaque appel sonde un fichier. Passez le fichier par le paramètre VideoFile et gérez les erreurs de sondage dans la boucle au besoin.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXEMPLE 5 --------------------------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>New-VideoFile -VideoFile (Get-Item -LiteralPath 'C:\Videos\sample.mp4') -WhatIf</dev:code> <dev:remarks> <maml:para>Affiche l’opération prévue sans créer de modèle ni examiner le fichier.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- EXEMPLE 6 --------------------------</maml:title> <maml:introduction> <maml:para>PS> </maml:para> </maml:introduction> <dev:code>$VO = New-VideoFile -VideoFile (Get-Item -LiteralPath 'C:\Videos\sample.mp4') $VO.AudioTracks | Where-Object Default | Select-Object StreamIndex, Codec, Language</dev:code> <dev:remarks> <maml:para>Repère les flux audio marqués par défaut dans la source. Un fichier peut ne définir aucune piste audio par défaut.</maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <maml:navigationLink> <maml:linkText>about_VideoTools</maml:linkText> </maml:navigationLink> </maml:relatedLinks> </command:command> </helpItems> |