From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Brand Subject: Re: Audio/video file playback in org mode Date: Sat, 11 Jun 2011 08:23:57 +0200 Message-ID: References: <4DF2F3B6.2030400@xnet.co.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:37227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVHc0-0000Ga-PS for emacs-orgmode@gnu.org; Sat, 11 Jun 2011 02:24:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QVHbz-0002mC-90 for emacs-orgmode@gnu.org; Sat, 11 Jun 2011 02:24:00 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:43235) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QVHby-0002m6-VJ for emacs-orgmode@gnu.org; Sat, 11 Jun 2011 02:23:59 -0400 Received: by ewy9 with SMTP id 9so1294785ewy.0 for ; Fri, 10 Jun 2011 23:23:58 -0700 (PDT) In-Reply-To: <4DF2F3B6.2030400@xnet.co.nz> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Paul Sexton Cc: emacs-orgmode@gnu.org Hi Paul On Sat, Jun 11, 2011 at 06:48, Paul Sexton wrote: > Thanks Michael, I'm glad you think it will be helpful. I have implemented > something like what you have requested here. I have hived this code off i= nto > a separate file called org-player.el. > > You can get it at: > > http://bitbucket.org/eeeickythump/org-player/ Thank you very much for sharing. It worked out of the box to play an Org link with time spec and I like it. > I intend to add it to worg in the next little while. That would be great. I first misread it to be added to Org core, but maybe later after some more user feedback. > Links can now contain times to start playback, as follows: > > [[file:/path/to/song.mp3::2:43]] =A0 =A0 =A0Starts playback at 2 min 43 s= ec. > [[file:/path/to/song.mp3::1:10:45]] =A0 Starts playback at 1 hr 10 min 45= sec. > [[file:/path/to/song.mp3::3m15s]] =A0 =A0 Starts playback at 3 min 15 sec= . > [[file:/path/to/song.mp3::49s]] =A0 =A0 =A0 Starts playback at 0 min 49 s= ec. > [[file:/path/to/song.mp3::1h21m10s]] =A0Starts playback at 1 hr 21 min 10= sec. > > As you see I have made XX:YY mean minutes and seconds, as it seems more > logical to me for this particular purpose. If there is a compelling reaso= n > to interpret XX:YY as hours and minutes in these links then I am not tota= lly > opposed to changing it, but I think many people would find it confusing a= nd > counterintuitive. Ok, in the context of a media file your arguments convinced me. > In all cases playback continues until the end of the file. I couldn't fin= d a > way to implement playback of 'snippets' with a specified start and end ti= me, > unfortunately. I'm sure this is only a question of time, I'll try to solve this too. Michael > On 10/06/2011 8:28 p.m., Michael Brand wrote: >> >> Hi Paul >> >> Thank you very much for sharing this, I will benefit a lot and the >> interactivity from within Emacs seems extremely useful. My recent >> searches for how to play an Org link to an audio file didn't find any >> result and I was about to work out something with mpg123. I planned to >> define a new link type for this but your solution with "file:" looks >> to me more like it should be and is also backwards compatible with >> links already made with "file:". >> >> And even better if "file:" could also cover my requirement to have an >> optional link search part that lets the player start and stop at a >> specified time. Let me define the format like this: >> - start to play in file at 00:03:21, stop at 00:06:54: >> =A0 [[file:some_podcast.mp3::00:03:21-00:06:54]] >> - start to play in file at 00:03:21, play until end of file: >> =A0 [[file:some_podcast.mp3::00:03:21]] >> - play the whole file: >> =A0 [[file:some_podcast.mp3]] >> >> I would like to explicitly not allow [[file:some_podcast.mp3::03:21]] >> as a shorter option with MM:SS because I would like to see XX:XX being >> reserved for HH:MM without exception in Org. There was a recent >> discussion covering this in the context of time calculation: >> http://thread.gmane.org/gmane.emacs.orgmode/39487/focus=3D39840