All Projects → luissantos → ffclj

luissantos / ffclj

Licence: MIT license
Clojure ffmpeg wrapper

Programming Languages

clojure
4091 projects

Projects that are alternatives of or similar to ffclj

SeeShark
Simple C# camera library.
Stars: ✭ 50 (+19.05%)
Mutual labels:  ffmpeg-wrapper
VideoProcessingLibrary
The easiest library for video processing
Stars: ✭ 52 (+23.81%)
Mutual labels:  ffmpeg-wrapper
babashka-sql-pods
Babashka pods for SQL databases
Stars: ✭ 64 (+52.38%)
Mutual labels:  babashka
screencast
Interface to record a X11 desktop
Stars: ✭ 91 (+116.67%)
Mutual labels:  ffmpeg-wrapper
Ffmpeg Android Java
FFmpeg Android java is a java library that simplifies your task of using ffmpeg in Android project which I've compiled using FFmpeg-Android
Stars: ✭ 3,098 (+7276.19%)
Mutual labels:  ffmpeg-wrapper
holy-lambda
The extraordinary simple, performant, and extensible custom AWS Lambda runtime for Clojure.
Stars: ✭ 318 (+657.14%)
Mutual labels:  babashka
content-transcoder
Transcodes HTTP-stream to HLS
Stars: ✭ 19 (-54.76%)
Mutual labels:  ffmpeg-wrapper
ffmpeg4java
FFmpeg4Java provides a JNI wrapper of FFmpeg library
Stars: ✭ 21 (-50%)
Mutual labels:  ffmpeg-wrapper
Ffscreencast
ffscreencast - ffmpeg screencast/desktop-recording with video overlay and multi monitor support
Stars: ✭ 1,625 (+3769.05%)
Mutual labels:  ffmpeg-wrapper
ffmpeg-dev-rs
Rust - Self Contained FFmpeg Bindings
Stars: ✭ 51 (+21.43%)
Mutual labels:  ffmpeg-wrapper
reisen
A simple library to extract video and audio frames from media containers (based on libav).
Stars: ✭ 41 (-2.38%)
Mutual labels:  ffmpeg-wrapper
eloquent-ffmpeg
High-level API for FFmpeg's Command Line Tools
Stars: ✭ 71 (+69.05%)
Mutual labels:  ffmpeg-wrapper
corona cases
🦠 Coronavirus Information on Telegram Chatbot
Stars: ✭ 19 (-54.76%)
Mutual labels:  babashka
PhpScreenRecorder
A slim PHP wrapper around ffmpeg to record screen,best for recording your acceptance test using selenium, easy to use and clean OOP interface
Stars: ✭ 44 (+4.76%)
Mutual labels:  ffmpeg-wrapper
jirazzz
A jira rest client for the command line, written in clojure as a babashka script.
Stars: ✭ 26 (-38.1%)
Mutual labels:  babashka
RTSP-Client-iOS
A basic RTSP Client in SWIFT using FFMpeg wrapper for iOS.
Stars: ✭ 33 (-21.43%)
Mutual labels:  ffmpeg-wrapper
BAT FFMPEG
Batch script files for FFMPEG (Microsoft Windows and DOS, OS/2 🦄)
Stars: ✭ 104 (+147.62%)
Mutual labels:  ffmpeg-wrapper
nota
Static Markdown Blog/Site using Fulcro & Pathom with no backend
Stars: ✭ 35 (-16.67%)
Mutual labels:  babashka
go-ffprobe
Library to easily get the ffprobe output of a given file
Stars: ✭ 114 (+171.43%)
Mutual labels:  ffmpeg-wrapper
Anime4K
Makes it easy to encode a Anime using Anime4K with predefined encoding profiles!
Stars: ✭ 61 (+45.24%)
Mutual labels:  ffmpeg-wrapper

FFCLJ

FFCLJ is a simple ffmpeg clojure wrapper. It aims to provide a simple wrapper around ffmpeg.

Features

Supported features

  • ffmpeg and ffprobe support
  • ffmpeg progress via core async channels
  • babashka support

Planned features

Usage

ffmpeg

(with-open [task (ffmpeg! [:y 
                          :i "http://ftp.nluug.nl/pub/graphics/blender/demo/movies/ToS/ToS-4k-1920.mov"
                          :ss "00:00:00.000"
                          :t "5"
                          [:s "1280x720" :acodec "aac" :vcodec "h264" "720p.mp4"]])]

    (.wait-for task)
    (println "Transcoding completed. Exit code: " (.exit-code task)))
    

ffmpeg + Progress Listener

(let [c (async/chan)]

    (async/go (while true
                (let [[v ch] (async/alts! [c])]
                  (clojure.pprint/pprint v))))

    (with-open [task (ffmpeg! c [:y
                                :i "http://ftp.nluug.nl/pub/graphics/blender/demo/movies/ToS/ToS-4k-1920.mov"
                                :ss "00:00:00.000"
                                :t "5"
                                [:s "1280x720" :acodec "aac" :vcodec "h264" "720p.mp4"]])]

      (.wait-for task)
      (println "Transcoding completed. Exit code: " (.exit-code task))))

ffprobe

(let [result (ffprobe! [:show_format :show_streams 
                       "http://ftp.nluug.nl/pub/graphics/blender/demo/movies/ToS/ToS-4k-1920.mov"])
        s (group-by (comp keyword :codec_type) (:streams result))]
        [(:codec_name (first (:video s) )) (:codec_name (first (:audio s)) )])
        
; ["h264" "aac"]

Using ffclj with babashka

#!/usr/bin/env bb

(require '[babashka.deps :as deps])

(deps/add-deps '{:deps {ffclj/ffclj {:mvn/version "0.1.2" }}})

(require '[ffclj.core :refer [ffmpeg! ffprobe!]]
         '[ffclj.task :as task])

(let [result (ffprobe! [:show_format :show_streams
                       "http://ftp.nluug.nl/pub/graphics/blender/demo/movies/ToS/ToS-4k-1920.mov"])
        s (group-by (comp keyword :codec_type) (:streams result))
        codecs [(:codec_name (first (:video s) )) (:codec_name (first (:audio s)) )]]

  (println codecs))


(with-open [t (ffmpeg! [:y
                        :i "http://ftp.nluug.nl/pub/graphics/blender/demo/movies/ToS/ToS-4k-1920.mov"
                        :ss "00:00:00.000"
                        :t "5"
                        [:s "1280x720" :acodec "aac" :vcodec "h264" "720p.mp4"]])]

      (task/wait-for t)
      (println "Transcoding completed. Exit code: " (task/exit-code t)))

License

Copyright © 2021 Luis Santos

Distributed under the MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].