If you know the frame rate (to calculate the frame duration) you should be able to use following code, assuming 8 frames = 0.333s (the 24FPS video)
#!/usr/bin/env powershell
$inputFile="input.mp4"
$outputFile="output.mp4"
$trimSeconds=0.333 # frames / FPS
$videoDuration=ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 ${inputFile}
Write-Host videoDuration=${videoDuration}
$endPosition=(($videoDuration -as [double]) - ($trimSeconds -as [double])) -as [string]
ffmpeg -ss ${trimSeconds}s -to ${endPosition} -i "${inputFile}" -c:v copy -c:a copy ${outputFile}
https://shotstack.io/learn/use-ffmpeg-to-trim-video/
How to get video duration in seconds?
Option sseof (set the start time offset relative to EOF) cannot be applied to output url output1.mp4 -- you are trying to apply an input option to an output file or vice versa. Move this option before the file it belongs to. Error parsing options for output file output1.mp4. Error opening output files: Invalid argument
– Abraham Thomas Jan 06 '23 at 05:12ffprobeand math calculation in e.g.powershell) – pstovik Jan 09 '23 at 09:16