An open API service indexing awesome lists of open source software.

https://github.com/arthi-chaud/haskell-ffprobe

Haskell bindings for ffprobe
https://github.com/arthi-chaud/haskell-ffprobe

ffprobe haskell haskell-bindings haskell-library

Last synced: 5 months ago
JSON representation

Haskell bindings for ffprobe

Awesome Lists containing this project

README

          

# haskell-ffprobe

This package provides Haskell bindings for the `ffprobe` command.

## Example

```haskell
import FFProbe
import FFProbe.Data.Format (duration, formatName)
import FFProbe.Data.Stream (codecLongName)
import System.Environment

main :: IO ()
main = do
fileName:_ <- getArgs
ffprobeRes <- ffprobe fileName
case ffprobeRes of
Left err -> putStrLn $ "An error occured: " ++ err
Right ffprobeData -> do
print $ formatName (format ffprobeData)
print $ duration (format ffprobeData)
print $ length (chapters ffprobeData)
print $ codecLongName $ head (streams ffprobeData)
```