News:

Wondering if this will always be free?  See why free is better.

Main Menu

Trying to add Subtitle to Video?!

Started by misharnet, January 04, 2014, 03:27:09 PM

Previous topic - Next topic

misharnet

  I am stuck for a while searching for a way to add Subtitle to embed Youtube video in my forum. Last thing I did is to use Amara, and create there a subtitle to Youtube video and I get an embed code that I'm supposed to add to my post, so I coul'd have a subtitled video....The code looks like this:
<script type="text/javascript" src="http://s3.amazonaws.com/s3.www.universalsubtitles.org/embed.js">
(
  {"video_url": "http://www.youtube.com/watch?v=jXoNHs3WOgM"}
)
</script>


But when I add it to my post it only read the "link" part, and again I get only YouTube video without a subtitle. Can I do something and what, to have that code work?

Thanks in advance.

kat

As this is a question about coding, I've been a bit of a rebel and moved it to the "Coding discussion" board.

Hope you don't mind. :)

misharnet

Not at all, I need to get answer, and I know that I have to ask it in the right forum. Hope that'll help get my answer. Thanks.

margarett

The only chance I see is to create a custom BBC that wraps the content like that. Because you can't really paste a JavaScript in a post...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Chen Zhen

misharnet,

  margarett is correct, you need to embed the video via a bbcode to use it in a post. The code you provided is not the proper syntax for js nor does the video example you provided have captions included.

Download the custom bbcode mod & install it:
http://webdevelop.comli.com/index.php?topic=27.0

Navigate to Admin->Modification Settings->Custom BBCode

Create a new tag with this as the HTML used for the tag:

<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/{content}&amp;hl=id_ID&amp;rel=0&amp;hd=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/{content}&amp;hl=id_ID&amp;rel=0&amp;hd=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="344" allowfullscreen="true"></embed></object>


The image I attached to this post shows you the other settings to enter.

In your post you use the video number surrounded by youtube tags:

[youtube]jXoNHs3WOgM[/youtube]


.. I used the same video example though which does not have subtitles. The person who uploaded the video must include them whereas in this case they did not. This example includes HD, CC & full screen options.

My SMF Mods & Plug-Ins

WebDev

SMF support staff should be shaping a positive community experience & not provoking an argument or emotional reaction.

misharnet

Thank you guys so much for your replies! I'll try to implement your advices, and if I manage to do it, I'll be glad to inform others that you helped me solve this! :)

kat

Let us know, too, woncha? We can mark this as having been solved, then! :)

Chen Zhen

#7
misharnet,

  I've read your other Croatian thread and now I understand what you have done here. You've used the amara site to create the subtitles for that video and the js code is what they provided for embedding.

Use the custom bbc mod to create a tag named amara and put this code as the html (make sure to enable the tag):

<script type="text/javascript" src="http://s3.www.universalsubtitles.org/embed.js">({video_url:"http://www.youtube.com/watch?v={content}&amp;hl=id_ID&amp;rel=0&amp;hd=1",video_config:{color1:'0xFF0000',width: 640,height: 480}})</script>


After which you can use this to use that bbc:

[amara]jXoNHs3WOgM[/amara]


Tested and working fine.

Regards.

My SMF Mods & Plug-Ins

WebDev

SMF support staff should be shaping a positive community experience & not provoking an argument or emotional reaction.

Advertisement: