4 ms·
I wrote a graphical tool with Lazarus that invokes ffmpeg. I used it to create clips to report cheaters in an online game, from videos created with OBS. A word
by narag 7y ago
I wrote a graphical tool with Lazarus that invokes ffmpeg. I used it to create clips to report cheaters in an online game, from videos created with OBS.
A word of warning: ffmpeg can't always cut where you want. Sometimes cutting in a certain point gives you a few blank (black screen) seconds. I guess it's because codecs work by storing what's different from previous frames.
If someone uses Lazarus (or maybe Delphi) it's as simple as:
s := Format('"C:\Program Files\ffmpeg\bin\ffmpeg.exe" -i "%s" -ss %s -c copy -t %s "%s"', [InputFile, Start, Duration, OutputFile]);
Memo1.Lines.Text := s;
WinExec(PChar(s), SW_SHOWDEFAULT);
With the parameters taken from TEdit controls. The TMemo was used to visualize what I was sending to ffmpeg.