Created
May 25, 2022 23:20
-
-
Save shapr/20bb48a22bee23fcc3118e579239176b to your computer and use it in GitHub Desktop.
Haskell script to call ffmpeg
This file contains 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
module Main where | |
import Data.Time.Clock | |
import Data.Time.Format | |
import Data.Time.Format.ISO8601 | |
import System.Cmd | |
import System.Directory | |
main :: IO () | |
main = do | |
now <- getCurrentTime | |
let cmd = makeCommand (iso8601Show now) | |
putStrLn $ "calling " <> cmd | |
exitCode <- system cmd | |
putStrLn $ "recording finished with exitcode " <> show exitCode | |
transcriptdir = "/home/shae/transcript" | |
-- only needs the filename | |
makeCommand name = "ffmpeg -video_size 3840x2160 -framerate 2 -f x11grab -i :0.0 -s 1920x1080 /home/shae/transcript/" <> name <> ".mp4" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment