Re: [whatwg] Tracks and cues

2012-10-24 Thread Cyril Concolato

Hi Ian,

Le 10/18/2012 9:59 PM, Ian Hickson a écrit :

On Wed, 25 Jul 2012, Silvia Pfeiffer wrote:

If we are very clear about what will be in the cues and that it will
always be just SVG, we could just create a @kind=svg.

IMHO the idea of putting SVG in cues seems to somewhat miss the point. SVG
already has a timeline, it already supports synchronisation with videos,
it should just be used that way.
Originally my request was to be able to use plain SVG content in a track 
(not embedded in WebVTT) and let the browser handle rendering, 
synchronization... This has many advantages, see the end of this post:

http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Jul/0196.html
It was suggested to me to embed it in VTT as a workaround. It kind of 
works but I agree this is not the solution for all cases (complex 
authoring, redundant data in cues, no progressive rendering). I'd be 
happy if @kind=graphics would allow pointing to an SVG file directly (or 
to any animated graphics like HTML+CSS, ... identified by the MIME type).



On Wed, 26 Sep 2012, Cyril Concolato wrote:

Has it been considered adding another method to add cues to a track?
Something like addCues(DOMString text) where the text is not only one
cue (like in the TextTrackCue ctor) but where the text would be multiple
cues as written in a WebVTT file?

Just use a track element to point to the file.

Yes, that's what suggested Philip Jägenstedt, to have a dummy track 
element to parse the cues and then transfer it to the real element. I've 
been doing that so far but I consider it a hack.


My use case is live (possibly adaptive) video streaming with subtitles. 
The video content is fetched dynamically based on the time, the current 
video program (movie vs. ad), and possibly adaptively depending on the 
available bandwidth (see HLS, DASH, SmoothStreaming...). In that use 
case, the subtitles also need to be fetched dynamically and spliced. You 
can't change the track src attribute on the fly (just like you can't 
for the video element) as this would reset all cues. You need to 
append cues. It would be good to either have MSE cover that or as I 
suggested above have a method to parse cue segments.


Cyril

--
Cyril Concolato
Maître de Conférences/Associate Professor
Groupe Multimedia/Multimedia Group
Telecom ParisTech
46 rue Barrault
75 013 Paris, France
http://concolato.wp.mines-telecom.fr/



Re: [whatwg] Tracks and cues

2012-10-24 Thread Ian Hickson
On Wed, 24 Oct 2012, Cyril Concolato wrote:
 Le 10/18/2012 9:59 PM, Ian Hickson a écrit :
  On Wed, 25 Jul 2012, Silvia Pfeiffer wrote:
  
   If we are very clear about what will be in the cues and that it will 
   always be just SVG, we could just create a @kind=svg.
 
  IMHO the idea of putting SVG in cues seems to somewhat miss the point. 
  SVG already has a timeline, it already supports synchronisation with 
  videos, it should just be used that way.

 Originally my request was to be able to use plain SVG content in a track 
 (not embedded in WebVTT) and let the browser handle rendering, 
 synchronization... This has many advantages, see the end of this post: 
 http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Jul/0196.html 

I don't understand why SMIL isn't the solution:

http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Jul/0131.html

I thought this was something SVG solved years ago.


 It was suggested to me to embed it in VTT as a workaround.

I do not think this makes sense.


 My use case is live (possibly adaptive) video streaming with subtitles. 
 The video content is fetched dynamically based on the time, the current 
 video program (movie vs. ad), and possibly adaptively depending on the 
 available bandwidth (see HLS, DASH, SmoothStreaming...). In that use 
 case, the subtitles also need to be fetched dynamically and spliced. You 
 can't change the track src attribute on the fly (just like you can't 
 for the video element) as this would reset all cues. You need to 
 append cues. It would be good to either have MSE cover that or as I 
 suggested above have a method to parse cue segments.

Fair enough.

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

[whatwg] Tracks and cues

2012-10-18 Thread Ian Hickson

On Wed, 25 Jul 2012, Henri Sivonen wrote:
 On Wed, Jul 25, 2012 at 11:24 AM, Silvia Pfeiffer
 silviapfeiff...@gmail.com wrote:
  But you can use cue.text and parse it as a SVG fragment.
 
 That would be RSS all over again. :-(

The difference is that here the parsing at each layer is fully defined.

It's more like JSON, where a key's value can be HTML or XML or SVG or 
whatever.


On Wed, 25 Jul 2012, Silvia Pfeiffer wrote:
 
 If we are very clear about what will be in the cues and that it will 
 always be just SVG, we could just create a @kind=svg.

IMHO the idea of putting SVG in cues seems to somewhat miss the point. SVG 
already has a timeline, it already supports synchronisation with videos, 
it should just be used that way.


On Wed, 26 Sep 2012, Cyril Concolato wrote:
 
 Has it been considered adding another method to add cues to a track? 
 Something like addCues(DOMString text) where the text is not only one 
 cue (like in the TextTrackCue ctor) but where the text would be multiple 
 cues as written in a WebVTT file?

Just use a track element to point to the file.

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'