11$myName = ($MyInvocation.MyCommand.ScriptBlock.File | Split-Path - Leaf) -replace ' \.source' , ' ' -replace ' \.ps1' , ' .txt'
22$myRoot = $MyInvocation.MyCommand.ScriptBlock.File | Split-Path
3- Write -RegEx - Description @'
3+ New -RegEx - Description @'
44Matches Progress Lines in FFMpeg output
55'@ - StartAnchor LineStart - Pattern " frame=" - Comment " frame=" |
6- Write -RegEx - CharacterClass Whitespace - Min 0 |
7- Write -RegEx - Name FrameNumber - CharacterClass Digit - Repeat |
8- Write -RegEx - CharacterClass Whitespace - Min 0 - Comment " Followed by the Frame Number" |
9- Write -RegEx - Pattern fps= - Comment " fps=" |
10- Write -RegEx - CharacterClass Whitespace - Min 0 |
11- Write -RegEx - Name FramesPerSecond (
12- Write -RegEx - CharacterClass Digit - LiteralCharacter ' .' - Repeat
6+ New -RegEx - CharacterClass Whitespace - Min 0 |
7+ New -RegEx - Name FrameNumber - CharacterClass Digit - Repeat |
8+ New -RegEx - CharacterClass Whitespace - Min 0 - Comment " Followed by the Frame Number" |
9+ New -RegEx - Pattern fps= - Comment " fps=" |
10+ New -RegEx - CharacterClass Whitespace - Min 0 |
11+ New -RegEx - Name FramesPerSecond (
12+ New -RegEx - CharacterClass Digit - LiteralCharacter ' .' - Repeat
1313 ) |
14- Write-RegEx - CharacterClass Whitespace - Repeat - Comment " Followed by Frames Per Second" |
15- Write-RegEx - Pattern q= - Comment " q=" |
16- Write-RegEx - Name QuanitizerScale - CharacterClass Digit - LiteralCharacter . - Repeat |
17- Write-RegEx - CharacterClass Whitespace - Repeat - Comment " Followed by the Quanitizer Scale" |
18- Write-RegEx - Pattern L?size= - Comment " size=" |
19- Write-RegEx - CharacterClass Whitespace - Repeat |
20- Write-RegEx - Name Size - Pattern " \d{1,}\wB" |
21- Write-RegEx - CharacterClass Whitespace - Repeat - Comment " Followed by the Size" |
22- Write-RegEx - Pattern time= - Comment " time=" |
23- Write-RegEx - Name Time - Pattern " [\d\:\.]+" |
24- Write-RegEx - CharacterClass Whitespace - Min 0 - Comment " Followed by the Time" |
25- Write-RegEx - Pattern bitrate= - Comment " bitrate=" |
26- Write-RegEx - CharacterClass Whitespace - Min 0 |
27- Write-RegEx - Name Bitrate - Pattern " [\d\.exN/A]+" |
28- Write-RegEx - Pattern ' kbits/s' |
29- Write-RegEx - CharacterClass Whitespace - Min 0 - Comment " Followed by the Bitrate" |
30- Write-RegEx - Pattern speed= - Comment " speed=" |
31- Write-RegEx - CharacterClass Whitespace - Min 0 |
32- Write-RegEx - Name Speed - Pattern " [\d\.N/A+]+" |
33- Write-RegEx - Pattern ' x' |
34- Write-RegEx - CharacterClass Whitespace - Min 0 - Comment " Followed by the Speed" | # >
14+ New-RegEx - CharacterClass Whitespace - Repeat - Comment " Followed by Frames Per Second" |
15+ New-RegEx - Pattern q= - Comment " q=" |
16+ New-RegEx - Name QuanitizerScale - Pattern " [\d\.N/A+]+" |
17+ New-RegEx - CharacterClass Whitespace - Repeat - Comment " Followed by the Quanitizer Scale" |
18+ New-RegEx - Pattern L?size= - Comment " size=" |
19+ New-RegEx - CharacterClass Whitespace - Repeat |
20+ New-RegEx - Name Size - Pattern " \d{1,}\wB" |
21+ New-RegEx - CharacterClass Whitespace - Repeat - Comment " Followed by the Size" |
22+ New-RegEx - Pattern time= - Comment " time=" |
23+ New-RegEx - Name Time - Pattern " [\d\:\.]+" |
24+ New-RegEx - CharacterClass Whitespace - Min 0 - Comment " Followed by the Time" |
25+ New-RegEx - Pattern bitrate= - Comment " bitrate=" |
26+ New-RegEx - CharacterClass Whitespace - Min 0 |
27+ New-RegEx - Name Bitrate - Pattern " [\d\.exN/A]+" |
28+ New-RegEx - Pattern ' kbits/s' |
29+ New-RegEx - Atomic - Min 0 - Pattern (
30+ New-RegEx - CharacterClass Whitespace - Min 0 - Comment " Followed by optional duplicated frame count" |
31+ New-RegEx - Pattern dup= - Comment " dup=" |
32+ New-RegEx - CharacterClass Whitespace - Min 0 |
33+ New-RegEx - Name Duplicated - Pattern " \d+"
34+ ) |
35+ New-RegEx - Atomic - Min 0 - Pattern (
36+ New-RegEx - CharacterClass Whitespace - Min 0 - Comment " Followed by optional dropped frame count" |
37+ New-RegEx - Pattern drop= - Comment " drop=" |
38+ New-RegEx - CharacterClass Whitespace - Min 0 |
39+ New-RegEx - Name Dropped - Pattern " \d+"
40+ ) |
41+ New-RegEx - CharacterClass Whitespace - Min 0 - Comment " Followed by the Bitrate" |
42+ New-RegEx - Pattern speed= - Comment " speed=" |
43+ New-RegEx - CharacterClass Whitespace - Min 0 |
44+ New-RegEx - Name Speed - Pattern " [\d\.N/A+]+" |
45+ New-RegEx - Pattern ' x' |
46+ New-RegEx - CharacterClass Whitespace - Min 0 - Comment " Followed by the Speed" | # >
3547 Set-Content - Path (Join-Path $myRoot $myName ) - Encoding UTF8 - PassThru
0 commit comments