From 723f86786a08a7aef1881393ebd2bf8c011286b3 Mon Sep 17 00:00:00 2001 From: kfrn Date: Fri, 27 Jan 2017 18:33:11 +1300 Subject: [PATCH] Add note about ffmpeg config for Windows --- index.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 8b93188..3d10dc5 100644 --- a/index.html +++ b/index.html @@ -884,13 +884,14 @@ foreach ($file in $inputfiles) { ffmpeg -i $file -map 0 -c copy $output }
-
$inputfiles = ls *.mp4
Creates the variable $inputfiles, which is a list of all the .mp4 files in the current folder.
+
$inputfiles = ls *.mp4
Creates the variable $inputfiles, which is a list of all the .mp4 files in the current folder.
In PowerShell, all variable names start with the dollar-sign character.
-
foreach ($file in $inputfiles)
Creates a loop and states the subsequent code block will be applied to each file listed in $inputfiles.
+
foreach ($file in $inputfiles)
Creates a loop and states the subsequent code block will be applied to each file listed in $inputfiles.
$file is an arbitrary variable which will represent each .mp4 file in turn as it is looped over.
{
Opens the code block.
-
$output = [io.path]::ChangeExtension($file, '.mkv')
Sets up the output file: it will be located in the current folder and keep its filename, but will have an .mkv extension instead of .mp4.
-
ffmpeg -i $file
carry out the following ffmpeg command for each input file.
+
$output = [io.path]::ChangeExtension($file, '.mkv')
Sets up the output file: it will be located in the current folder and keep the same filename, but will have an .mkv extension instead of .mp4.
+
ffmpeg -i $file
Carry out the following ffmpeg command for each input file.
+ Note: To call ffmpeg here as just ‘ffmpeg’ (rather than entering the full path to ffmpeg.exe), you must make sure that it's correctly configured. See this article, especially the section ‘Add to Path’.
-map 0
retain all streams
-c copy
enable stream copy (no re-encode)
$output
The output file is set to the value of the $output variable declared above: i.e., the current file name with an .mkv extension.