Re: Video syntax

2010-09-15 Thread David Chambers
On 16 September 2010 13:32, Waylan Limberg  wrote:

An interesting thought just occurred to be when re-reading this. Why do you
> need any special syntax at all? Why not just:


>[Soda Pop Stop](http://www.youtube.com/v/gPbh6Ru7VVM )


> Just parse the urls for "youtube.com" (or "vimeo" etc) and when
> found, convert to an appropriate object. It's easy, simple and introduces
> no new syntax of any kind.


Brilliant suggestion, Waylan! I'd been thinking that providing a default
replacement for unrecognized video hosts would be helpful (the `[Vv]ideo:`
syntax would enable this), but you've convinced me otherwise. By using
standard link syntax, the fact that Mango will replace a link to a YouTube
video with the markup necessary to embed that video will be a magical
special case, whereas using `[Vv]ideo:` would set the unreasonable
expectation (as you so rightly point out) that any video should work.

Thanks everyone, for your input. I'll run with the standard link approach,
and add to Mango special rules for handling youtube.com video links.

David


On 16 September 2010 13:32, Waylan Limberg  wrote:

> On Wed, Sep 15, 2010 at 9:24 PM, Waylan Limberg  wrote:
> > While I realize youtube can be extracted from parsing the url, by
>
> An interesting thought just occurred to be when re-reading this. Why
> do you need any special syntax at all? Why not just:
>
>[Soda Pop Stop](http://www.youtube.com/v/gPbh6Ru7VVM )
>
> Just parse the urls for "youtube.com" (or "vimeo" etc) and when found,
> convert to an appropriate object. It's easy, simple and introduces no
> new syntax of any kind.
>
> --
> 
> \X/ /-\ `/ |_ /-\ |\|
> Waylan Limberg
> ___
> Markdown-Discuss mailing list
> Markdown-Discuss@six.pairlist.net
> http://six.pairlist.net/mailman/listinfo/markdown-discuss
>
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Video syntax

2010-09-15 Thread Waylan Limberg
On Wed, Sep 15, 2010 at 9:24 PM, Waylan Limberg  wrote:
> While I realize youtube can be extracted from parsing the url, by

An interesting thought just occurred to be when re-reading this. Why
do you need any special syntax at all? Why not just:

[Soda Pop Stop](http://www.youtube.com/v/gPbh6Ru7VVM )

Just parse the urls for "youtube.com" (or "vimeo" etc) and when found,
convert to an appropriate object. It's easy, simple and introduces no
new syntax of any kind.

-- 

\X/ /-\ `/ |_ /-\ |\|
Waylan Limberg
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Video syntax

2010-09-15 Thread Waylan Limberg
On Wed, Sep 15, 2010 at 6:47 PM, David Chambers
 wrote:
> Of course, this markup applies to YouTube but may not apply to other
> services. That being the case, though, I'd still benefit from a `youtube:`
> solution since 80% or more of the videos I embed are YouTube videos. The
> fact that I'd need to include HTML for the other 20% does not deter me.

I suppose personal projects have been implemented for much less
convincing reasons. But if all your implementing is youtude support,
then I'd call it that. `youtude:...` not 'video:...`. Although I
suppose your trying to come up with a syntax for the more general use
case and then move on from there to the more specific. I guess it's
that general use case that I don't see the need for and the reason for
my objection. With a clearer picture of what you actually what to
accomplish, my objections have lessoned.

> One thing that I'd like to make clear, Waylan, is that I'm raising the issue
> on this list because it's a great place for such a discussion, not because
> I'm expecting any of the Markdown implementations to support such syntax.

I guess I understood that.  Sorry if that didn't come through in my
response. I still see developing a syntax for video in general a waste
for the reasons previously stated, so I guess I was trying to
discourage a useless discussion, but if you're really only interested
in a simple syntax to easily embed videos from youtube, vimeo and the
like - and not necessarily expecting it to be an all encompassing
solution for any embedded video, then I can see how that could be
useful as third party add-on to markdown. And this is certainly the
place to get good feedback on a solution.

> Last night another option occurred to me: `[Video: Soda Pop
> Stop](http://www.youtube.com/v/gPbh6Ru7VVM)`.
> The reason that I find this option so appealing is that the above remains
> valid Markdown in non-Mango contexts. Mango will perform preprocessing to
> convert this to the appropriate video markup, but without this preprocessing
> the line would simply be converted to a descriptive link.

I actually like this. It introduces nothing new, will not trip up
unmodified implementations of markdown and still provides enough clues
to embed a video properly (assuming a known source is used).

Despite what I said above, I suppose you would *not* want to do:

[YouTube: Soda Pop Stop](gPbh6Ru7VVM)

While that is more specific and won't create false expectations that
the syntax will work for any type of video, it won't provide a useful
link in an unmodified markdown parser. Perhaps as a safe middleground
I'd suggest:

[YouTube: Soda Pop Stop](http://www.youtube.com/v/gPbh6Ru7VVM)

While I realize youtube can be extracted from parsing the url, by
doing the syntax this way, it is more clear to users that this only
works for supported known (and popular) video hosting sites. No false
expectations about it working for every possible video out there.  And
maybe in the future when all those variables needed to embed html5
video tags are simplified, a more basic [video: ...] syntax could be
adopted as well.

I think that's the root of my concern. If you call it '[video:...]'
you will get complaints insisting that every possible use case for
embedded video be supported - which is just not practical today (as
you acknowledge). But if you call it '[youtube:...]` or `[vimeo:...]`,
etc., then if others want support for a specific as yet unsupported
use-case, they can develop it themselves and maybe even provide their
solution for public consumption. But hey, it's your project that you
will be maintaining. What do I care?
-- 

\X/ /-\ `/ |_ /-\ |\|
Waylan Limberg
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Video syntax

2010-09-15 Thread Evan
 Could either of the following be useful as the markup generated by the 
video tag?


http://camendesign.com/code/video_for_everybody

http://www.mediafront.org/project/osmplayer

E.
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Video syntax

2010-09-15 Thread David Chambers
On 16 September 2010 05:33, Waylan Limberg  wrote:

The fact is, when I go back up and reread this message and get to the source
>  tag, all I see is ` video which gets inserted in the document" and I skip to the next block. It
> doesn't really make reading the document any more painful or difficult.  And
> when writing, well, we need to include all that metadata anyway.


You make two excellent points here, Waylan, and I agree on both counts.

That said, I'm still keen to add some sort of support for shorthand to
Mango, as I personally would find this very helpful. The following, taken
from a post I wrote a year ago on embedding YouTube clips using valid XHTML
markup,
provides useful context:

http://www.youtube.com/v/video_id&hl=en&fs=1&rel=0";>
http://www.youtube.com/v/video_id&hl=en&fs=1&rel=0"; />



While this has not been updated to make use of the `video` element, it
demonstrates that the potential value of some sort of find and replace
mechanism. After all, that's exactly what I've been doing manually for the
last year: to embed a YouTube video I've pasted in the above snippet and
done a find and replace on "video_id". Since I'm styling the `object` via
CSS, I don't even include width and height.

Of course, this markup applies to YouTube but may not apply to other
services. That being the case, though, I'd still benefit from a `youtube:`
solution since 80% or more of the videos I embed are YouTube videos. The
fact that I'd need to include HTML for the other 20% does not deter me.

One thing that I'd like to make clear, Waylan, is that I'm raising the issue
on this list because it's a great place for such a discussion, *not* because
I'm expecting any of the Markdown implementations to support such syntax.

Last night another option occurred to me: `[Video: Soda Pop Stop](
http://www.youtube.com/v/gPbh6Ru7VVM)`.

The reason that I find this option so appealing is that the above remains
valid Markdown in non-Mango contexts. Mango will perform preprocessing to
convert this to the appropriate video markup, but without this preprocessing
the line would simply be converted to a descriptive link.

Sure, you could implement `![alt text](somerandomsite:key)`, but do you
> really want to update your code to support every new video host that comes
> along? Or would you provide some api by which the user could define his own?
> I don't know about you, but every time I link to some new video host from my
> blog, I don't want to have to update my code (even if I wrote it all myself)
> so markdown knows about the new site.


Django (on which Mango is built) offers a simple solution. Mango could, for
example, ship with three templates to handle video: video.html, vimeo.html,
and youtube.html. It could parse the video URLs to determine whether to
apply the YouTube template, the Vimeo template, or the generic (fallback)
template. Users would have the freedom both to add templates for other hosts
and to override the bundled templates.

I agree that updating application code to facilitate the embedding of
possibly just a single video is unreasonable, so I'll stick to pasting in
HTML in these cases.

David


On 16 September 2010 06:05, david parsons  wrote:

> On Thu, Sep 16, 2010 at 01:33:49AM +1200, David Chambers wrote:
> > I'm planning to update Mango  to facilitate adding
> > video to Markdown documents. At the moment, of course, it's possible to
> > include video by including the appropriate HTML. There are three reasons,
> > though, that having syntax (official or unofficial) for video is a good
> > idea:
> >
> >- *Simplicity.* Writing something like [youtube:gPbh6Ru7VVM] is easy.
> >Including half a dozen lines of HTML is much less so.
>
>  I don't know if it's feasable until a standard way of doing video
>  emerges and the video-station websites start following it.  A html5
>   block is lovely, but it's not very useful until the bulk of
>  the web world can deal with it without complaint.
>
> > My question is, *has anyone given thought to an appropriate syntax for
> video
> > in Markdown?*
>
>Sure.   We've got the framework for it:
>
>[text](object:[content-type:]url [=size] ['comment'])
>
>And then you can do something like
>
>[![no support for this content
> here](sorry.gif)](video:x-shockwave-flash:
> http://www.youtube.com/v/oFHSZLIOLZs =425x328 'this may not be terse, but
> at least it's not naked html')
>
>[Honk!](audio:/~orc/klaxon.wav)
>
>
>without introducing (another form of) ascii spaghetti to the language.
>
>
>-david parsons
> ___
> Markdown-Discuss mailing list
> Markdown-Discuss@six.pairlist.net
> http://six.pairlist.net/mailman/listinfo/markdown-discuss
>
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/mar

Re: Video syntax

2010-09-15 Thread david parsons
On Thu, Sep 16, 2010 at 01:33:49AM +1200, David Chambers wrote:
> I'm planning to update Mango  to facilitate adding
> video to Markdown documents. At the moment, of course, it's possible to
> include video by including the appropriate HTML. There are three reasons,
> though, that having syntax (official or unofficial) for video is a good
> idea:
> 
>- *Simplicity.* Writing something like [youtube:gPbh6Ru7VVM] is easy.
>Including half a dozen lines of HTML is much less so.

 I don't know if it's feasable until a standard way of doing video
 emerges and the video-station websites start following it.  A html5
  block is lovely, but it's not very useful until the bulk of
 the web world can deal with it without complaint.

> My question is, *has anyone given thought to an appropriate syntax for video
> in Markdown?*

Sure.   We've got the framework for it:

[text](object:[content-type:]url [=size] ['comment'])

And then you can do something like

[![no support for this content 
here](sorry.gif)](video:x-shockwave-flash:http://www.youtube.com/v/oFHSZLIOLZs 
=425x328 'this may not be terse, but at least it's not naked html')

[Honk!](audio:/~orc/klaxon.wav)


without introducing (another form of) ascii spaghetti to the language.


-david parsons
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Video syntax

2010-09-15 Thread Albert Skye
> Clearly one option is to use the same syntax as for images but with 
> an extra `!`, but what would we use for audio in that case? `!!!` 
> would be ridiculous.

No need for more syntax. Overload image syntax instead; i.e., insert resource 
at URL here.
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Video syntax

2010-09-15 Thread Waylan Limberg
On Wed, Sep 15, 2010 at 9:33 AM, David Chambers
 wrote:
> My question is, has anyone given thought to an appropriate syntax for video
> in Markdown? We're a long way (five years, at least) from being at the point
> where `` will be sufficient to get the
> job done, so this probably isn't something that Markdown itself will include
> for quite some time. I'm nonetheless interested to hear others' thoughts as
> to what an appropriate syntax might be.

Well until we are at that point, I don't think there is anything we
can practically do.

Consider this html5 markup which you would presumably be generating
(taken from http://diveintohtml5.org/video.html):


  
  
  


Until all those codec issues you mention are resolved, many people may
need to list multiple source paths  (as well as the mime type and
codecs for each) for one video. The width and height should also be
listed, even for a single source. How do you list all that in a simple
markdown syntax. Seems to me html5's syntax does as good a job as any.
True, this doesn't work for flash. That still requires and whole other
 tag as a sibling of the  tags - which is a whole
other mess I'll ignore.

True, flash aside, a certain site may use a specific url scheme, only
offer a certain subset of codeces and offer all videos at a set size;
which could then be passed into your script as user definable options.
But, do you really want to maintain that when new and different
(better?) codeces come along with new requirements? And what about
videos hosted off site that follow different url schemes, offer
different codeces and different sizes?

On Wed, Sep 15, 2010 at 11:34 AM, Vinay Augustine
 wrote:
> What about a URI-like handler?
>
>    ![alt text](video:/path/to/video)

That works if the media is hosted locally (and codeces, size etc has
been resolved in the code), but what about:

![alt text(video:http://somerandomsite.com/path/to/video)

Do we really want people to write (and later read) all those colons
(`video:http:`) in one url? And what about the codec/size/other
meta-data used by that site - which may differ from your own?

Sure, you could implement `![alt text](somerandomsite:key)`, but do
you really want to update your code to support every new video host
that comes along? Or would you provide some api by which the user
could define his own? I don't know about you, but every time I link to
some new video host from my blog, I don't want to have to update my
code (even if I wrote it all myself) so markdown knows about the new
site.

The fact is, when I go back up and reread this message and get to the
source  tag, all I see is `` will be sufficient to get the job done,
I'll probably just use that.  And actually, if you do implement a
post-processor of some kind, why not just make that the syntax?
Markdown should see that as raw html and pass it through unaltered. If
that day ever does come, just remove your post-processor and be done
with it.

My (perhaps more than) $0.02.

-- 

\X/ /-\ `/ |_ /-\ |\|
Waylan Limberg
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Re: Video syntax

2010-09-15 Thread Vinay Augustine
> Currently, we have:
> [link text](/path/to/link) for links, and
> ![alt text](/path/to/image) for images.

What about a URI-like handler?

![alt text](video:/path/to/video)
![alt text](audio:/path/to/audio)
![alt text](image:/path/to/image)
![alt text](/path/to/image)

The downside is that for audio & video you would need different tags
depending on the site. Maybe site-specific ones would be appropriate:

![alt text](youtube:key)
![alt text](vimeo:key)
![alt text](lastfm:key)
![alt text](flickr:key)

-V
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss


Video syntax

2010-09-15 Thread David Chambers
I'm planning to update Mango  to facilitate adding
video to Markdown documents. At the moment, of course, it's possible to
include video by including the appropriate HTML. There are three reasons,
though, that having syntax (official or unofficial) for video is a good
idea:

   - *Simplicity.* Writing something like [youtube:gPbh6Ru7VVM] is easy.
   Including half a dozen lines of HTML is much less so.
   - *Readability.* Gruber created Markdown not just because he wanted to
   avoid writing markup – he wanted to avoid *reading* it, too!
   - *Separation of concerns.* Documents should provide for each video just
   a link (and optionally alt text) the way they do for images. This way, the
   application can take on the responsibility of generating the appropriate
   markup. This is tremendously beneficial: HTML5 video is still relatively
   new, sites are being updated to take advantage of native video, and new
   video formats are emerging. Given this moving target it's difficult to be
   sure that hard-coded video markup will remain correct a year from now.
   Handing this responsibility to the application means that all video markup
   on a site can be updated with a single update to the application.

My question is, *has anyone given thought to an appropriate syntax for video
in Markdown?* We're a long way (five years, at least) from being at the
point where `` will be sufficient to get
the job done, so this probably isn't something that Markdown itself will
include for quite some time. I'm nonetheless interested to hear others'
thoughts as to what an appropriate syntax might be.

Currently, we have:

[link text](/path/to/link) for links, and

![alt text](/path/to/image) for images.

Clearly one option is to use the same syntax as for images but with an extra
`!`, but what would we use for audio in that case? `!!!` would be
ridiculous.

David
___
Markdown-Discuss mailing list
Markdown-Discuss@six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss