This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function fix_sync() | |
| -- Capture the first snapshot | |
| local pts_prev = math.floor(mp.get_property_native('demuxer-cache-state')['reader-pts'] or mp.get_property_number('audio-pts')) | |
| local sample_time = 1 | |
| local pts_prev_diff = 0 | |
| local sample_timer | |
| sample_timer = mp.add_periodic_timer(sample_time, function() | |
| local pts_cur = math.floor(mp.get_property_native('demuxer-cache-state')['reader-pts'] or mp.get_property_number('audio-pts')) | |
| local pts_diff = pts_cur - pts_prev | |
| pts_prev = pts_cur |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $folderPath = "C:\Path\To\Directory" | |
| # Process matching screenshot files | |
| Get-ChildItem -Path $folderPath -Filter "Screenshot_*.png" | ForEach-Object { | |
| $fileName = $_.BaseName | |
| # Match Screenshot_YYYYMMDD_HHMMSS and extract timestamp | |
| if ($fileName -match '^Screenshot_(\d{8})_(\d{6})') { | |
| $date = $matches[1] | |
| $time = $matches[2] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Get all DLL files in the specified directory and its subdirectories | |
| $directory = "C:\your\directory\path" | |
| $dllFiles = Get-ChildItem -Path $directory -Filter "*.dll" -File -Recurse | |
| # Convert the paths to forward slashes and replace directories two levels up with a period | |
| $paths = $dllFiles | ForEach-Object { | |
| $relativePath = $_.FullName -replace '^(.*)\\(\w+)\\(\w+)\\(.+)$', '.\$3\$4' | |
| $relativePath = $relativePath -replace "\\","/" | |
| $relativePath | |
| } |