unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* FFmpeg, Xvideo, and Pulse audio
@ 2016-08-19 21:54 Jan Wedekind
  0 siblings, 0 replies; only message in thread
From: Jan Wedekind @ 2016-08-19 21:54 UTC (permalink / raw)
  To: guile-user

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/



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-08-19 21:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-19 21:54 FFmpeg, Xvideo, and Pulse audio Jan Wedekind

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).