From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jan Wedekind Newsgroups: gmane.lisp.guile.user Subject: FFmpeg, Xvideo, and Pulse audio Date: Fri, 19 Aug 2016 22:54:09 +0100 (BST) Message-ID: Reply-To: Jan Wedekind NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Trace: blaine.gmane.org 1471643687 4943 195.159.176.226 (19 Aug 2016 21:54:47 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 19 Aug 2016 21:54:47 +0000 (UTC) User-Agent: Alpine 2.11 (DEB 23 2013-08-11) To: guile-user Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Fri Aug 19 23:54:43 2016 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1barkR-0000tw-FP for guile-user@m.gmane.org; Fri, 19 Aug 2016 23:54:43 +0200 Original-Received: from localhost ([::1]:59089 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1barkO-0004o3-S8 for guile-user@m.gmane.org; Fri, 19 Aug 2016 17:54:40 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47540) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bark1-0004nl-S0 for guile-user@gnu.org; Fri, 19 Aug 2016 17:54:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1barjy-00085M-LU for guile-user@gnu.org; Fri, 19 Aug 2016 17:54:17 -0400 Original-Received: from basicbox4.server-home.net ([195.137.212.26]:42859) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1barjy-00084E-F7 for guile-user@gnu.org; Fri, 19 Aug 2016 17:54:14 -0400 Original-Received: from [10.51.152.229] (unknown [217.38.83.155]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by basicbox4.server-home.net (Postfix) with ESMTPSA id 3C4251530667 for ; Fri, 19 Aug 2016 23:54:10 +0200 (CEST) X-X-Sender: jan@wedemob X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 195.137.212.26 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:12847 Archived-At: 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 #: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/