Hi Paul On Sat, Jun 11, 2011 at 06:48, Paul Sexton <[email protected]> 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 into > 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]] Starts playback at 2 min 43 sec. > [[file:/path/to/song.mp3::1:10:45]] Starts playback at 1 hr 10 min 45 sec. > [[file:/path/to/song.mp3::3m15s]] Starts playback at 3 min 15 sec. > [[file:/path/to/song.mp3::49s]] Starts playback at 0 min 49 sec. > [[file:/path/to/song.mp3::1h21m10s]] Starts 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 reason > to interpret XX:YY as hours and minutes in these links then I am not totally > opposed to changing it, but I think many people would find it confusing and > 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 find a > way to implement playback of 'snippets' with a specified start and end time, > 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: >> [[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
