slhck / ffmpeg-progress-yield

Run an ffmpeg command with progress
MIT License
57 stars 6 forks source link

chore: Add an option to print progress only in cli usage #23

Closed LaunchLee closed 3 weeks ago

LaunchLee commented 3 weeks ago

This option makes the output cleaner when doing batch conversions.

slhck commented 3 weeks ago

I like this option, thanks for the PR! I just have a question about the escape sequence you inserted, if you could perhaps answer this. Thanks!

LaunchLee commented 3 weeks ago

About this escape sequence there is a concrete description on this site in Wikipedia. Usually I reference this site for convenience and simple usage.

slhck commented 3 weeks ago

I know what ANSI escape codes are; my question is more about why you inserted it for this specific case? If you look at my screenshot, you can see that it only appears to add an extra line to the output that is not required. The output looks fine to me when I simply ignore the escape sequence.

LaunchLee commented 3 weeks ago

Oh, I see. I tested it only on Windows machine with PowerShell 7 and Windows Terminal. There is a extra progress output line when not print this escape sequence.

LaunchLee commented 3 weeks ago

Screenshot: WindowsTerminal_20240916-154420

slhck commented 3 weeks ago

I understand, so maybe we should output this only under Windows then. I merged it with a Windows-only change. If this causes some problems on *nix systems we can remove that condition. Thanks for your contribution!

slhck commented 3 weeks ago

Merged manually in 14a15e381e990f69c09a6f8d960c82a734d7107c