From mboxrd@z Thu Jan 1 00:00:00 1970 From: brian powell Subject: Re: Audio/video file playback in org mode Date: Fri, 10 Jun 2011 12:10:39 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=002215b039b291b22f04a55dcfe8 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:54793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QV4IG-0007Gw-6g for emacs-orgmode@gnu.org; Fri, 10 Jun 2011 12:10:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QV4ID-0000WV-Ve for emacs-orgmode@gnu.org; Fri, 10 Jun 2011 12:10:44 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:56173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QV4ID-0000WJ-H2 for emacs-orgmode@gnu.org; Fri, 10 Jun 2011 12:10:41 -0400 Received: by wwb39 with SMTP id 39so2426614wwb.30 for ; Fri, 10 Jun 2011 09:10:39 -0700 (PDT) In-Reply-To: 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: emacs-orgmode@gnu.org --002215b039b291b22f04a55dcfe8 Content-Type: text/plain; charset=ISO-8859-1 * Something like this; respectively!?: [[shell:mplayer -ss 00:03:21 -endpos 00:06:54 ~/some_podcast.mp3 &]] [[shell:mplayer -ss 00:03:21 ~/some_podcast.mp3 &]] [[shell:mplayer ~/some_podcast.mp3 &]] VLC works great for this too. [[file:...] works too of course, but you have to make a "file association" (or like mentioned: 'org-file-apps') to mplayer or emacs OrgMode will just open the file in a buffer. Unclear about statement about earlier posts: "I would like to explicitly not allow..." P.S. Thanks for the link to BONGO--the EMACS "buffer media player". I made my own "buffer media player" and have used it for many years; but, BONGO.el is wayly kuul too! On Fri, Jun 10, 2011 at 4:28 AM, 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: > [[file:some_podcast.mp3::00:03:21-00:06:54]] > - start to play in file at 00:03:21, play until end of file: > [[file:some_podcast.mp3::00:03:21]] > - play the whole file: > [[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=39840 > > Michael > > On Thu, Jun 9, 2011 at 23:55, Paul Sexton wrote: > > I have spent a few hours figuring this out so I thought I would post it > for > > the benefit of others. > > > > I am learning a language, and wanted to include hyperlinks to audio files > > within my org document, and be able to play each file by clicking on the > > link. > > > > I eventually discovered the variable 'org-file-apps' which allows you to > > associate particular applications with particular file types. > > > > I am using Bongo (https://github.com/dbrock/bongo) as the media player. > > EMMS is another actively developed media player, but setup looked too > > complicated at first glance. > --002215b039b291b22f04a55dcfe8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable * Something like this; respectively!?:=A0

[[shell:mplaye= r -ss 00:03:21=A0-endpos=A000:06:54 ~/some_podcast.mp3 &]]
[[shell:mplayer -ss 00:03:21 ~/some_podcast.mp3 &]]
[[shell:mplayer ~/some_podcast.mp3 &]]

VL= C works great for this too.

[[file:...] works too = of course, but you have to make a "file association" (or like men= tioned: 'org-file-apps') to mplayer or emacs OrgMode will just open= the file in a buffer.

Unclear about statement about earlier posts: "I wo= uld like to explicitly not allow..."

P.S. Tha= nks for the link to BONGO--the EMACS "buffer media player".
I made my own "buffer media player" and have used it for man= y years; but, BONGO.el is wayly kuul too!


On Fri, Jun 10, 2011 at 4:28 AM, Michael = Brand <m= ichael.ch.brand@gmail.com> 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:" lo= oks
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 hav= e 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

Michael

On Thu, Jun 9, 2011 at 23:55, Paul Sexton <psexton@xnet.co.nz> wrote:
> I have spent a few hours figuring this out so I thought I would post i= t for
> the benefit of others.
>
> I am learning a language, and wanted to include hyperlinks to audio fi= les
> within my org document, and be able to play each file by clicking on t= he
> link.
>
> I eventually discovered the variable 'org-file-apps' which all= ows you to
> associate particular applications with particular file types.
>
> I am using Bongo (https://github.com/dbrock/bongo) as the media player.
> EMMS is another actively developed media player, but setup looked too<= br> > complicated at first glance.
--002215b039b291b22f04a55dcfe8--