abdullahbinali3 / mp4parser

Automatically exported from code.google.com/p/mp4parser
0 stars 0 forks source link

Smooth Streaming fragmenter support .srt #63

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Dear, I use smooth-streaming-fragmenter-1.0-RC-24.jar to create smooth 
streaming files, everything is perfect:

java.exe -jar smooth-streaming-fragmenter-1.0-RC-24.jar -o D:\Videos 
D:\SM\sample*.mp4

I have an audio folder, a video folder and manifest file.

I wonder if I have a soft subtittle (.srt, how can I use with smooth streaming 
? And if I have more one subtittle and audio (english, japanese,..)?

Very thank for your replying,

Please provide any additional information below.

Original issue reported on code.google.com by than...@hdviet.com on 1 Jul 2013 at 9:53

GoogleCodeExporter commented 8 years ago
Hi,
srt subtitle are not directly supported by smooth streaming. Smooth streaming 
only supports w3c timed text as specified here:  
http://www.w3.org/TR/ttaf1-dfxp/

I would need to convert SRT to TTML/DFXP to add it to a smooth streaming 
presentation. Hmm - lots of work. You might start with transforming an SRT file 
into 60 second TTML/DFXP fragments ;)

(more a note to myself) an example is here:
Manifest: 
http://streams.smooth.vertigo.com/elephantsdream/Elephants_Dream_1024-h264-st-aa
c.ism/manifest
XML in fragment: 
http://streams.smooth.vertigo.com/elephantsdream/Elephants_Dream_1024-h264-st-aa
c.ism/QualityLevels(344)/Fragments(textstream_ron=0)

Example XML:
<?xml version="1.0" encoding="utf-8"?>
<tt xml:lang="ro-RO" xmlns="http://www.w3.org/2006/10/ttaf1">
  <head>
    <metadata>
      <ttm:title xmlns:ttm="http://www.w3.org/2006/10/ttaf1#metadata" />
      <ttm:desc xmlns:ttm="http://www.w3.org/2006/10/ttaf1#metadata" />
      <ttm:copyright xmlns:ttm="http://www.w3.org/2006/10/ttaf1#metadata" />
    </metadata>
    <styling>
      <style xml:id="backgroundStyle" p5:fontFamily="proportionalSansSerif" p5:fontSize="16px" p5:textAlign="center" p5:origin="10% 85%" p5:extent="80% 10%" p5:backgroundColor="rgba(0,0,0,100)" p5:displayAlign="center" xmlns:p5="http://www.w3.org/2006/10/ttaf1#styling" />
      <style xml:id="speakerStyle" p5:style="backgroundStyle" p6:color="white" p6:backgroundColor="transparent" xmlns:p6="http://www.w3.org/2006/10/ttaf1#styling" xmlns:p5="http://www.w3.org/2006/10/ttaf1" />
    </styling>
    <layout>
      <region xml:id="speaker" p5:style="speakerStyle" p6:zIndex="1" xmlns:p6="http://www.w3.org/2006/10/ttaf1#styling" xmlns:p5="http://www.w3.org/2006/10/ttaf1" />
      <region xml:id="background" p5:style="backgroundStyle" p6:zIndex="0" xmlns:p6="http://www.w3.org/2006/10/ttaf1#styling" xmlns:p5="http://www.w3.org/2006/10/ttaf1" />
    </layout>
  </head>
  <body>
    <div>
      <p p4:region="speaker" p4:begin="00:00:15:01" p4:end="00:00:18:01" xmlns:p4="http://www.w3.org/2006/10/ttaf1">�n st�nga se vad...|Se vad... </p>
      <p p4:region="speaker" p4:begin="00:00:18:22" p4:end="00:00:20:09" xmlns:p4="http://www.w3.org/2006/10/ttaf1">�n dreapta se vad... </p>
      <p p4:region="speaker" p4:begin="00:00:20:12" p4:end="00:00:21:27" xmlns:p4="http://www.w3.org/2006/10/ttaf1">...forfecarii. </p>
      <p p4:region="speaker" p4:begin="00:00:22:00" p4:end="00:00:24:18" xmlns:p4="http://www.w3.org/2006/10/ttaf1">Aici suntem �n siguranta.|�n siguranta deplina. </p>
      <p p4:region="speaker" p4:begin="00:00:26:09" p4:end="00:00:27:09" xmlns:p4="http://www.w3.org/2006/10/ttaf1">Emo? </p>
      <p p4:region="speaker" p4:begin="00:00:28:26" p4:end="00:00:30:07" xmlns:p4="http://www.w3.org/2006/10/ttaf1">Ai grija! </p>
      <p p4:region="speaker" p4:begin="00:00:47:03" p4:end="00:00:48:07" xmlns:p4="http://www.w3.org/2006/10/ttaf1">Esti ranit? </p>
      <p p4:region="speaker" p4:begin="00:00:51:27" p4:end="00:00:53:27" xmlns:p4="http://www.w3.org/2006/10/ttaf1">Nu cred...|tu? </p>
      <p p4:region="speaker" p4:begin="00:00:55:18" p4:end="00:00:57:03" xmlns:p4="http://www.w3.org/2006/10/ttaf1">Sunt �n regula. </p>
      <p p4:region="speaker" p4:begin="00:00:57:17" p4:end="00:01:00:00" xmlns:p4="http://www.w3.org/2006/10/ttaf1">Ridica-te.|Emo, aici nu suntem in siguranta... </p>
    </div>
  </body>
</tt>

Original comment by Sebastian.Annies on 1 Jul 2013 at 7:09

GoogleCodeExporter commented 8 years ago
Thanks Sebastian.Annies,
I found a link introduce convert subtittle from .srt to DFXP / TTML: 
http://www.unified-streaming.com/support/tutorials/subtitling-since-version-1-4-
33
when I have many subtittles: video_english_eng.dfxp, video_spanish_spa.dfxp, 
video_french_fra.dfxp, how can I have manifest file like your file ?

Thanks

Original comment by than...@hdviet.com on 2 Jul 2013 at 1:42