guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FFmpeg, Xvideo, and Pulse audio


From: Jan Wedekind
Subject: FFmpeg, Xvideo, and Pulse audio
Date: Fri, 19 Aug 2016 22:54:09 +0100 (BST)
User-agent: Alpine 2.11 (DEB 23 2013-08-11)

Hi,
I just released AIscm version 0.6.1. There are now FFmpeg input bindings, Xvideo bindings, and Pulse audio bindings. I.e. it is possible to put together a video player like this:


    (use-modules (oop goops) (aiscm ffmpeg) (aiscm xorg) (aiscm pulse) (aiscm 
util) (aiscm element) (aiscm image))
    (define video (open-ffmpeg-input "av-sync.mp4"))
    (define pulse (make <pulse-play> #:rate (rate video) #:channels (channels 
video) #:typecode (typecode video) #:latency 0.1))
    (show
      (lambda (dsp)
        (while (< (audio-pts video) (+ (video-pts video) 0.2)) (write-samples 
(or (read-audio video) (break)) pulse))
        (format #t "video pts = ~8,2f, audio-pts = ~8,2f, latency = ~8,2f~&" 
(video-pts video) (audio-pts video) (latency pulse))
        (synchronise (read-video video) (- (video-pts video) (- (audio-pts 
video) (latency pulse))) (event-loop dsp))))
    (drain pulse)

[1] http://wedesoft.github.io/aiscm/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]