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
- Host: GitHub
- URL: https://github.com/arthi-chaud/haskell-ffprobe
- Owner: Arthi-chaud
- License: bsd-3-clause
- Created: 2024-06-30T14:52:09.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-10T20:35:14.000Z (almost 2 years ago)
- Last Synced: 2025-01-04T13:03:52.311Z (over 1 year ago)
- Topics: ffprobe, haskell, haskell-bindings, haskell-library
- Language: Haskell
- Homepage: https://hackage.haskell.org/package/haskell-ffprobe
- Size: 2 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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)
```