Commons:Timed Text/zh
Media community: Audio and video requests · Featured media (candidates) · Media help · Media of the Day · Timed Text · Video info · Video2commons–Upload · Video cut tool
考量到名稱相近或相同,你可能是在找共享資源:標題
定時文本(TimedText)是一个自定义的維基媒體共享資源的命名空间,用于容纳隱藏字幕、或翻譯字幕的文本,使其与其他媒体(例如音频或视频文档)相关联。本页旨在解释该功能的概念和使用方法。
隱藏字幕 (Closed captioning, CC)和翻譯字幕都是显示在电视、视频屏幕或其他视觉显示器上的文字的一種進程,以提供额外的或是作為說明的信息。 這两者通常都是作为某个演出,在它出現時的音频部分的转录(可能是逐字记录、也可能是以已编辑好的形式),有时甚至還會包括某些非语音元素的描述。 这有助于听障人士和失聰人士,并为非母语人士提供了理解多媒体文件内容的途径。
使用方法
也可参见Commons:Video#Subtitles and closed captioning。
有隱藏字幕的视频和音频片段的缩略图会出現覆蓋的CC图标。
打开播放器后,您所使用语言的翻譯字幕会自动被启用。
您可以在播放器的控件中找到图标来切换语言、开关翻譯字幕或更改翻譯字幕的格式。
定时文本可用于任何以时间顺序呈现的媒体:
- 音频文件
- 无声视频(默劇)
- 口语视频
- 演示一个概念或某物如何运作的动画
实际案例
- Commons:Timed Text Demo Page重点介绍几个定时文本示例的頁面。
- TimedText:Krazy Kat Bugologist 1916 silent.ogv.de.srt, 德语字幕
- TimedText:Krazy Kat Bugologist 1916 silent.ogv.en.srt, 英语字幕
- TimedText:Wikipedia Edit 2014.webm.pl.srt
发掘
TimedText:
prefix, add the text after it, e.g. TimedText:Elephants_Dream.ogv
).TimedText:Elephants_Dream.ogv.en.srt
) to create a TimedText page - see Commons:Timed Text{{Allpages|102}}
會以 來呈現,並列出102命名空间中的所有页面。
共享資源需要一种为特定语言查找定时文本文件的方法;以下内容受限於搜索功能的限制(例如:未显示所有的匹配项;包含有不匹配项;需要有正则表达式的支持)。 也包括一些不同语言的定时文本 .srt 文件的搜索:
English • German • French • Portuguese • Russian • Swedish • Ukrainian • Polish • Indonesian
其他帮助用户查找定时文本的方法:
- {{Closed captions}} 显示某个文件的所有可用隱藏字幕文件的链接,可放在某个媒体页面及其討論页面上。
{{special|Prefixindex/TimedText:{{PAGENAME}}.|stripprefix|1|subtitles}}
生成一個指向所有相关的定时文本文件的链接(范例)。- Commons:Timed Text/search by lang在某個已知的语言中、对共享資源、分类和討論页面有用的所有定时文本文件的页面,显示搜索的链接。
标记和查找需要翻譯字幕的视频
{{Captions requested}}模板可用于标记视频需要字幕。该模板會将其添加到Videos needing subtitles类别中,这样某個人就可以看到哪些视频、哪些用户或作者已要求提供视频的文字記錄。
本模板和类别属于Commons:WikiProject Deaf及其姐妹元維基:維基失聰人和Wikipedia:WikiProject Deaf的范围內。
查找需要翻譯字幕的视频
查找此类视频的方法之一是根据首选起始语言打开 Category:Files with closed captioning 中的一个子类别,然后使用Help:FastCCI(位于页面右上方),去包含没有想要的目标语言字幕的视频。
示例
- 要查找有英文字幕的视频以进行翻译,请访问Category:Files with closed captioning in English。
- 然后,单击FastCCI箭头打开子菜单,选择 "在此类别中但不在......"。
- 在文本框中,根据您首选的目标语言输入相应的类别:
- 德语请输入
Files with closed captioning in German
- 法语请输入
Files with closed captioning in French
- 俄语请输入
Files with closed captioning in Russian
- 德语请输入
等等..
定时文本的讨论
命名空间用于讨论各自的定时文本页面,但也可用于链接和分类定时文本页面。
維護工作
上载
要上传已创建的字幕文件,请在计算机上用文本编辑器(如記事本)打开文件,然后将文本复制到定时文本的名称空间中的新页面,该页面应与视频的文件名和语言代码相匹配。
製作
共享資源使用SubRip (.srt) 檔案格式來製作隱藏字幕和翻譯字幕。您可以用多種方式建立這些檔案。
為現有的共享資源檔案製作翻譯字幕「頁面」

選項1:在檔案的共享資源檔案頁面中(推薦使用)
您可以使用在共享資源檔案上任何合適的多媒體檔案的頂端的「定时文本」連結。
選項2:直接在媒體播放器中

使用維基媒體HTML5媒體播放器工具列上的CC按鈕,您可以選擇可用的翻譯字幕,或開啟翻譯字幕編輯器為影片製作翻譯字幕。
選項3:建立一個空白頁(適用於進階使用者)
您總是可以直接在共享資源中使用模板 TimedText:[Common_File_Name.extension].[language].srt 來建立頁面,其中 [Common_File_Name.extension] 是檔案名稱,而 [language] 則是語言的ISO代碼。
範例: 想要增加翻譯字幕到Elephants_Dream.ogg
,您可以為英文翻譯字幕建立TimedText:Elephants_Dream.ogg.en.srt
頁面,或為法文翻譯字幕建立TimedText:Elephants_Dream.ogg.fr.srt
頁面。
擷取現有的翻譯字幕來匯入字幕
從 DVD 製作翻譯字幕
要複製DVD現有的字幕,您可以使用SubRip等等軟體。然後,您可以將它們複製貼上wiki共享資源的翻譯字幕頁中。
使用YouTube製作翻譯字幕
YouTube允許那些擁有YouTube帳戶的使用者們從任何上傳的檔案製作翻譯字幕。請記住,語音辨識是自動化的且會產生意想不到的結果。最好是將檔案的文字記錄上傳到YouTube。這會提供更好的結果。然後,您可以將它們複製貼到wiki共享資源的翻譯字幕頁面中。
製作翻譯字幕的步驟(可以在這裡找到步驟的視訊教學)。
- 上傳檔案。(多媒體檔案必須同時包含視訊軌,但您可以自由選擇空白的視訊軌或任何其他視訊軌)。
- 上傳時,在「顯示更多」功能表下將檔案的視訊語言設定為適當的語言。
- 或是,在上傳之後,在特定影片的詳細資訊中或在YouTube Studio的導覽中選擇「翻譯字幕」 。
- 按一下「新增」或「新增語言」。
- 您可以用三種方式的其中之一來新增翻譯字幕:
- 上傳一個適當格式的文字記錄。
- 複製並貼上文字記錄。
- 觀看影片時手動輸入。
- 然後字幕就會被整合到視訊中。
- 在「編輯調速」檢視中,從三個點(...)選單下的翻譯字幕選單下載 .sbv 檔案。
- 將 .sbv 檔案的內容轉換為 .srt 檔案。有多種線上工具可協助您完成此步驟。
- ffmpeg是開放原始碼的一個選項 (指引)。
- 上傳.srt檔案至維基媒體共享資源的視訊的對應頁面。
從YouTube下載翻譯字幕
您可以從YouTube(可能還有其他幾個視訊網站)上的視訊下載翻譯字幕,像是這樣:
- 安裝yt-dlp
- 執行
yt-dlp --list-subs url
(將url改為youtube的url) - 執行例如
yt-dlp --write-subs en --sub-format vtt url
(將url改為youtube的url) - 也許srt翻譯字幕也是可用的,所以您應該用它而不是用vtt字幕,或者您可以一次下載所有字幕
- 使用FFmpeg(請參閱:#Convert YouTube Subtitles to Timed Text format)或是這個之類的web UI工具,將vtt翻譯字幕(或您所擁有的格式)轉換為srt翻譯字幕。
- 然後您可以將這些貼到WMC上視訊的TimedText頁面上
如果您使用video2commons工具,可以勾選「匯入翻譯字幕」,但這對vtt翻譯字幕 (phab:T368298)不起作用,因此對於這些影片,您也需要執行上述匯入翻譯字幕的步驟。
機器轉錄
您可以使用開放原始碼工具[$url SoniTranslate]更簡單快速地產生機器轉譯字幕。 如果您能檢查一下這些內容,尤其是如果您也使用該工具進行其他語言的機器翻譯,那就更好了。 例如,它可能會將年份輸出為長文本而非數字、或者弄錯人名。 如何使用這個工具在Help:AI video dubbing中有說明。 [1] 如果沒有現有的翻譯字幕要匯入,這可能是加入定時文本最快的方法了。 即使您沒有GPU,轉錄也通常只需要幾秒鐘,這取決於視訊有多長。
這些定時製作的字幕非常適合用來為其他語言的視訊配音,而手動製作的字幕通常不會這樣。您可以編輯翻譯字幕,然後將其儲存為 srt 檔案,並將其作為工具的輸入,讓它以其他語言製作音訊或翻譯字幕。
使用whisper.cpp製作翻譯字幕
截至2024年[update],Whisper語音辨識系統AI模型[1]是目前最先進的語音轉錄模型,可使用Python或whisper.cpp在本機執行。 與早期的Vosk模型不同,它們也會產生標點符號,使其輸出更接近高品質的人類轉錄。 同樣地,您應該根據影片檢查AI產生的翻譯字幕,並修正錯誤、加上標點符號、檢查人名和地名的拼字是否正確、檢查事實和數字等。 AI翻譯字幕作為初稿非常有用,但通常也會包含一些人類轉譯者不會犯的愚蠢錯誤。
whisper.cpp的一項優點在於它特別針對在CPU而非GPU上執行進行最佳化 (所以如果您有AMD顯示卡、因此沒有輝達的CUDA,它就特別有用)。 但CUDA和(在Mac上的)Metal也受支援,因此它可以輕鬆適應不同的硬體配置。 另一個優點是它不需要安裝任何外部的相依,也就是不需要Python或PyTorch,因為它是用C++寫成的,造就它的下載量比Python的機器學習環境小很多。
一些視訊編輯和隱藏字幕GUI軟體現在已內建Whisper功能: 開放原始碼的範例包括視訊編輯器Kdenlive (自23.04版起;需要Python) 和 Subtitle Edit (Python或C++都可以用來執行Whisper模型)。
但直接執行命令列版本的whisper.cpp來建立SRT檔案也不是太困難,只要您的作業系統有C語言編譯器、make等工具來編譯它:
首先,使用例如 ffmpeg 擷取視訊的音軌,並將其轉換為 16 kHz 取樣率:
ffmpeg -i some_video.ogv -ar 16000 -ac 1 -c:a pcm_s16le audio.wav
接下來,編譯whisper.cpp並下載模型 (針對英文內容最佳化的基本模型約為140MB;「中型」也可處理其他語言,約為1.5GB),然後開始轉換,例如:
./main -m models/ggml-base.en.bin -f audio.wav -t 8 -pc -osrt
這將使用8個CPU核心,並在同一目錄中建立一個名為audio.wav.srt
的SRT檔案。 在識別過程中,字詞會以顏色標示信心度(綠色=非常確定、紅色=非常不確定),因此您可以快速查看模型是否有問題。 如果較小的模型產生無法使用的輸出,您可以嘗試較大的模型,例如中型,這會較慢,但會產生較好的結果。
您也可以從其他語言翻譯,例如在選項中加入"-l fr -tr"
就可以將法文音訊翻譯成英文。
將YouTube的翻譯字幕轉換為定時文本格式
SBV翻譯字幕
如果您從YouTube翻譯字幕匯出SBV格式,您可以使用ffmpeg將翻譯字幕檔案轉換成共享資源所使用的SRT(SubRip)格式。這項功能也解決了將YouTube字幕轉換到共享資源時常出現的重疊問題。
ffmpeg -fix_sub_duration -i input.sbv output.srt
XML翻譯字幕

本節說明如何將 XML YouTube翻譯字幕轉換成 SubRip (srt) 格式,也就是 維基媒體共享資源所使用的 TimedText 字幕格式。
若是:
- YouTube影片有某些語言的翻譯字幕 (例如:我製作的YouTube影片 有英語、俄語和利維卡累利阿語三種語言的翻譯字幕)、
- 這個影片已上傳至維基媒體共享資源(例如,這個檔案),
- 您要複製YouTube翻譯字幕到在共享資源上相同的視訊。
那麼:
- 下載XML格式的翻譯字幕,將YouTube視訊的ID放在URL結尾: http://video.google.com/timedtext?hl=en&lang=en&v=__youtube_video_ID__
- 安裝Ruby。
- 下載Ruby程式,將YouTube的XML格式視訊翻譯字幕轉換成SubRip格式。
- 執行此程式並將XML檔案轉換為.SRT檔案。
- 將.SRT檔案的內容複製然後貼到維基媒體共享資源上視訊的對應頁面。
一般提示
Type what is said in srt format, this is one subtitle block:
1 00:00:20,000 --> 00:00:24,400 words here
this is two:
1 00:00:20,000 --> 00:00:21,500 words more words 2 00:00:21,500 --> 00:00:24,400 more
if a girl says "words more words" as a man says "more". Writing words more words. more
would be wrong put:
-words more words -more
but if there is enough time to show each on its own block that should be done: words more words
then after: more
.
(subtitleedit will make the block red if its too short, then you will know you need to join them)
Anyway each new person or thing making sound gets a dash: e.g. a baby crys then alarm goes off:
-[嬰兒哭聲] -[警鈴大作]
但如果這些區塊相距很遠,則應該各自成為自己的區塊:[嬰兒哭聲]
然後:[警鈴大作]
喧鬧聲等
如您所見,我們使用方括號來描述聲音。
我們建議您使用方括號,因為現今方括號比較流行,但過去也有人使用圓括號,並將文字大寫,或在《》的情況中: [2] 他們使用圓形的空格和斜體 ( clicking )
[3] 現在這種情況已經很少見了 -- 請不要這樣做。
Another thing that was done more in the past was use NAME: words
for when you want the persons name and using the brackets for sounds.
Today the brackets are used for both. Some people use round brackets for names and square ones for sounds, (or backwards) [4] [5]
why? Why would you do that? It's just confusing.
Characters
Type what each character says, if they speak too fast you may need to summarize what they said so it can be read in time.
If you can't tell who is talking without the sound, put their name in brackets followed by what they said. [Elsa] I can't!
If they are off screen or speaking through a phone put their name in brackets and put their words in italics.
If the audience doesn't know the characters name yet, try to avoid spoiling it and put their gender or occupation, you could also summarize their name e.g Captain Raymond Holt to Ray or Holt, anything to get the subtitles read in time.
If you do add the characters name don't add it for every subtitle block, just the first one when the character starts talking. Like this:
[Name] words words words
or[Name over phone] words words words
if its over the phone.
Next block doesn't have the name of the person:
more words here
Adding words
Just like you can summarize what the characters said you can also add words to make it make more sense.
For example in the Modern Family episode Caught in the Act Claire says "What is it? Door lock. How embarrassing." but the subtitles say "What is it? A door lock. How embarrassing." You decide if you want to add words or not.
Gaps in blocks
If a character says "Wait I hear something." subtitle it as "Wait I hear something."
If a character says "Wait [1.5 seconds] I hear something." subtitle it as Wait
for the first subtitle block then I hear something.
for the second subtitle block but don't leave a gap between these two subtitle blocks unless they wait longer.
Sometimes people say "but... It would work better this way." the "..." lasts a small amount of time.
Subtitle it like this: but it would work better this way.
and make the subtitle block show up onscreen when you first hear "It". That way it doesn't spoil what they were about to say.
If the gap between "but" and "It" is longer e.g. longer then some time, maybe 0.6 seconds, put "but" on it's own subtitle block, keep it onscreen until "It" then the next block (right after with no gap) should say: it would work better this way.
Numbers Symbols and Acronyms
Because all caps is used for things, you shouldn't use it for screaming.
But I have seen Friends use italics for a whole paragraph to really emphasize the yelling. [6]
so thats an option, but I don't see it used anymore.
Use all caps for when someone says an acronym e.g NASA or an initialism e.g ADHD, or though you won't be able to tell if they said each letter (initialism) or not (acronym).
Friends used to combat this problem by putting dots though all initialisms, [7]but this isn't done that much anymore. Made up words that originated form an acronym should also be in caps, e.g in Heartbreak High they go to a class called Sexual Literacy Tutorial but the student's call it "sluts". The subtitles are written as "I'm going to SLT's" even if they say "sluts".
I disagree and would make it say "I'm going to SLUTS." you pick.
If someone says "I paid thirteen dollars" put "I paid $13" if they say "It cost me ten grand but if I asked the other guy it would've been twenty" you can put It cost me $10,000 but if I asked the other guy it would've been $20,000.
or It cost me $10,000 but if I asked the other guy it would've been 20.
– not sure what's better.
If a character is talking about Wikipedia and they say "W P colon mos" put WP:MOS
as that's how you type it.
But It gets tricky if they say "slash".
In the case of the Brooklyn Nine-Nine Halloween episodes they say "I will be the best detective slash genus." but they subtitled it as "I will be the best detective/genus." even though they said "slash".
The later seasons are subtitled differently and include the word "slash" in the subtitles if they said it, the newer method is recommended.
斜體
語氣不同的字應該用斜體,特別是當他們在暗示什麼的時候。 請遵循MOS:Italics來瞭解哪些類型的媒體應該使用斜體。 如果您需要使用斜體,但主角不在螢幕上,而且字句已經是斜體,只要將您想要放在斜體的字句,以非斜體中放在裏面即可(反向)。
音樂
主角所唱的歌詞應該用「♪」、Unicode U+9834、或Alt+266A字元來包圍。您也可以使用♫、Unicode U+9835、或Alt+266B,例如:
1 00:00:20,000 --> 00:00:24,400 ♪ 帶我去看球賽 ♪(譯註:這是美國球場第七局上攻守交換時全場必唱名曲)
當主角開始在音樂上說話時,您應該停止為音樂加翻譯字幕,這樣觀眾才能讀出主角在說什麼。
標記
SRT格式唯一支援的標記是
- 粗體 – <b> ... </b>
- 斜體 – <i> ... </i>
- 底線 – <u> ... </u>
提醒:不支援Wikicode格式。
国际化
翻譯字幕以視訊的原始語言轉錄到Timed Text檔案後,就可以依下列方式翻譯成其他語言:
- 在編輯模式中開啟原始語言的 Timed Text 檔案,例如英文的TimedText:Elephants Dream.ogv.en.srt ,然後複製整個頁面。
- 在位址列中,將「en」換成您所選擇的語言代碼,例如「fr」,然後將原始文字貼到新頁面中。
- 觀看原始視訊,然後將文字翻譯成您的語言。
- 儲存新頁面後,帶翻譯字幕的視訊應該會載入頁面;您可以檢視視訊以檢查翻譯字幕的時序。
- 在討論頁 [[Category:Timed Text in Language Name|Language Name]] 加入分類連結。例如,請看一下TimedText talk:Elephants Dream.ogv.fr.srt。
維基百科有關定時文字或翻譯字幕主題的條目
這些是與「若不是」Q844253:定時文字「就是」Q204028:翻譯字幕的條目。
- Dansk: Undertekster
- Deutsch: Untertitelung
- Ελληνικά: Υπότιτλοι
- Esperanto: Subtekstoj
- Español: Subtítulo
- Français : sous-titrage
- Interlingua: Subtitulos
- Italiano: Sottotitolo
- 日本語: 字幕
- 한국어: 자막
- Македонски: Толкување
- Nederlands: Ondertiteling
- Norsk bokmål: Undertekster
- Português: Legenda
- Русский: Субтитры
- Slovenščina: podnaslovi
- Svenska: Textning
- Українська: Субтитри
- 粵語: 字幕
- 中文:字幕
- Bahasa Indonesia: Teks Berwaktu
链接
本節需要擴充
如何將隱藏字幕與多媒體檔案關聯?
- 重定向可避免重複的內容,例如:TimedText:Elephants Dream (high quality).ogv.pt.srt會重定向至現有的TimedText:Elephants Dream.ogv.pt.srt 。這可確保隱藏字幕模板顯示字幕檔案的正確檔案名稱(這對電影剪輯可能很重要)。
- {{Closed captions}} 的參數是另一個替代品
- 定時文字功能需要更多支援;
- 歸類:無法對定時文字頁面本身進行分類,但可以對定時文字的討論進行分類。
一個可能的歸類方案是:
[[:Category:File formats]] + [[:Category:Media types]] | [[:Category:Timed Text]] + [[:Category:Legend in German]] | [[:Category:Timed Text in German]] + [[:Category:Legend in French]] | [[:Category:Timed Text in French]] + [[:Category:Legend in English]] | [[:Category:Timed Text in English]]
相關類別:Category:Files with closed captioning
参见
- {{Captions requested}}
- SubRip
- Help:命名空間列出所有共享資源的命名空間
- Category:Video, 視訊相關媒體的基礎類別
- Category:Videos, 視訊檔案的基礎類別
- 美國國家字幕研究所 (NCI).
- W3C定時文本首頁
- 失聰和重聽觀眾的字幕, 國家聽力與其他溝通障礙研究所 (NIDCD).
參考資料
Category:Timed Text/Translations#%20 Category:Commons features/Translations#Timed%20Text Category:Commons video resources/Translations#Timed%20Text- 1 2 AI — 人工智慧
- ↑ 當我說那些替《》加字幕的人們時,我是指那些在結尾寫著
[字幕由字幕中心WGBH教育基金會]
提供的劇集。 - ↑ 《》的「The One With The Two Parties」一集
- ↑ Accessibility for the Blind at Disney Sea Tokyo + Hello Kitty World and the Snoopy Museum!
- ↑ File:Fred Rogers testifies before the Senate Subcommittee on Communications, 1969.ogv
- ↑ Friends episode "The One With Phoebe's Birthday Dinner"
- ↑ Friends episode "The One with the Prom Video"