JwPlayer로 자막 링크 시키기

Posted by 또돌이 플짤관련 : 2014. 1. 16. 20:38
jwplayer는 TimedText 와 SRT 자막만을 지원합니다
TimedText는 좀 생소하고, SRT 자막 링크거는 것으로 설명합니다
보통은 SMI 자막을 많이 쓰기 때문에 Jwplayer로 링크하려면 SMI 자막을 SRT자막으로 변환해 주어야 합니다

아래 링크에서 변환 프로그램을 다운 받으세요
https://docs.google.com/uc?authuser=0&id=0By7lGrMEmOEaTEJHVGNCNFhPQTg&export=download

다운 받은 후 확장자 .jpg를 삭제하고 압축을 풀면 sub.exe와 vobsub.dll 파일이 생성됩니다
사용법은 간단합니다  프로그램 실행하고 smi 파일을 불러와서  Save As....누른 후


파일형식은  srt로 ,그리고 Unicode output에 체크해주면 됩니다

이렇게 변환한 srt 자막을 구글드라이브에 올려서 주소를 따서 아래 태그에 붙여넣으면 됩니다
구글드라이브가 영상을 링크시키는거외는 다 막아버렸습니다
그래서 srt 자막을 티스토리에 올려 주소땄습니다

플레이어와 자막파일은 반드시 같은 계정에 올려야 합니다
여기서는 티스토리에...

<embed src="jwplayer 주소"
type="application/x-shockwave-flash" width="영상 가로크기" height="영상의 세로크기" allowfullscreen="true"

 flashvars="file=https://www.googledrive.com/host/0B3l-5BlYUc0lMEp3TEl2aVdLV1E
&amp;repeat=list&amp;image=

&amp;plugins=captions-2&amp;captions.file=자막파일 주소

&amp;captions.state=true&amp;captions.color=글자 색상
&amp;type=video&amp;autostart=true&icons=false">


자막을 재생시키기 위한 기본적인 flashvars 설정은

plugins=captions-2          자막 플러그인을 사용한다는 의미
captions.file=                 자막파일 주소
captions.state=              자막의 초기상태  on / off   기본값 true
captions.color=              폰트색상   기본값 #FFFFFF 흰색
                                색상을 변경하려면 색상코드표에서 맘에드는 색상을 선택하면 됩니다  ex) #FF0000  빨강 

이외
captions.fontweight=       폰트를 굵게할때  기본값 normal 
captions.fontstyle=          폰트 스타일 변경  기본값 normal  


완성된 태그 예
 

<embed src="http://cfs.tistory.com/custom/blog/104/1044374/skin/images/player5.7.swf?

type="application/x-shockwave-flash" width="960" height="565" allowfullscreen="true" 

flashvars="file=https://www.googledrive.com/host/0By7lGrMEmOEaaWZMQ3ZsVnNSS28

&amp;repeat=list&amp;image=http://i.imgur.com/zwKvZr1.jpg

&amp;plugins=captions-2&amp;captions.file=http://cfs.tistory.com/custom/blog/104/1044374/skin/images/(15)%20Girl's%20Power%EF%BC%8FM-ON%20ver%2002.srt?=341484158

&amp;captions.state=true&amp;captions.color=#ADDFFF
&amp;icons=false
&amp;type=video&amp;autostart=false">

 

영상 예제 


 


 자막 on / off 를 선택할 수 있습니다