Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
16001373
Commit
16001373
authored
Jun 05, 2012
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf: TED Talks JSON captions demuxer.
parent
18eb3196
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
81 additions
and
1 deletion
+81
-1
Changelog
Changelog
+1
-0
demuxers.texi
doc/demuxers.texi
+21
-0
general.texi
doc/general.texi
+1
-0
Makefile
libavformat/Makefile
+1
-0
allformats.c
libavformat/allformats.c
+1
-0
tedcaptionsdec.c
libavformat/tedcaptionsdec.c
+0
-0
version.h
libavformat/version.h
+1
-1
bookmarklets.html
tools/bookmarklets.html
+55
-0
No files found.
Changelog
View file @
16001373
...
...
@@ -39,6 +39,7 @@ version <next>:
- Paris Audio File demuxer
- Virtual concatenation demuxer
- VobSub demuxer
- JSON captions for TED talks decoding support
version 1.0:
...
...
doc/demuxers.texi
View file @
16001373
...
...
@@ -215,4 +215,25 @@ backslash or single quotes.
@end table
@section tedcaptions
JSON captions used for @url{http://www.ted.com/, TED Talks}.
TED does not provide links to the captions, but they can be guessed from the
page. The file @file{tools/bookmarklets.html} from the FFmpeg source tree
contains a bookmarklet to expose them.
This demuxer accepts the following option:
@table @option
@item start_time
Set the start time of the TED talk, in milliseconds. The default is 15000
(15s). It is used to sync the captions with the downloadable videos, because
they include a 15s intro.
@end table
Example: convert the captions to a format most players understand:
@example
ffmpeg -i http://www.ted.com/talks/subtitles/id/1/lang/en talk1-en.srt
@end example
@c man end INPUT DEVICES
doc/general.texi
View file @
16001373
...
...
@@ -924,6 +924,7 @@ performance on systems without hardware floating point support).
@item SAMI @tab @tab X @tab @tab X
@item SubRip (SRT) @tab X @tab X @tab X @tab X
@item SubViewer @tab @tab X @tab @tab X
@item TED Talks captions @tab @tab X @tab @tab X
@item VobSub (IDX+SUB) @tab @tab X @tab @tab X
@item 3GPP Timed Text @tab @tab @tab X @tab X
@item WebVTT @tab @tab X @tab @tab X
...
...
libavformat/Makefile
View file @
16001373
...
...
@@ -346,6 +346,7 @@ OBJS-$(CONFIG_SUBVIEWER_DEMUXER) += subviewerdec.o
OBJS-$(CONFIG_SWF_DEMUXER)
+=
swfdec.o
swf.o
OBJS-$(CONFIG_SWF_MUXER)
+=
swfenc.o
swf.o
OBJS-$(CONFIG_TAK_DEMUXER)
+=
takdec.o
apetag.o
img2.o
rawdec.o
OBJS-$(CONFIG_TEDCAPTIONS_DEMUXER)
+=
tedcaptionsdec.o
OBJS-$(CONFIG_THP_DEMUXER)
+=
thp.o
OBJS-$(CONFIG_TIERTEXSEQ_DEMUXER)
+=
tiertexseq.o
OBJS-$(CONFIG_MKVTIMESTAMP_V2_MUXER)
+=
mkvtimestamp_v2.o
...
...
libavformat/allformats.c
View file @
16001373
...
...
@@ -244,6 +244,7 @@ void av_register_all(void)
REGISTER_DEMUXER
(
SUBVIEWER
,
subviewer
);
REGISTER_MUXDEMUX
(
SWF
,
swf
);
REGISTER_DEMUXER
(
TAK
,
tak
);
REGISTER_DEMUXER
(
TEDCAPTIONS
,
tedcaptions
);
REGISTER_MUXER
(
TG2
,
tg2
);
REGISTER_MUXER
(
TGP
,
tgp
);
REGISTER_DEMUXER
(
THP
,
thp
);
...
...
libavformat/tedcaptionsdec.c
0 → 100644
View file @
16001373
This diff is collapsed.
Click to expand it.
libavformat/version.h
View file @
16001373
...
...
@@ -30,7 +30,7 @@
#include "libavutil/avutil.h"
#define LIBAVFORMAT_VERSION_MAJOR 54
#define LIBAVFORMAT_VERSION_MINOR 4
8
#define LIBAVFORMAT_VERSION_MINOR 4
9
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
...
...
tools/bookmarklets.html
0 → 100644
View file @
16001373
<!DOCTYPE html>
<html>
<head>
<!--
This file is part of FFmpeg.
All scripts contained in this file can be considered public domain.
-->
<title>
FFmpeg bookmarklets
</title>
<meta
charset=
"UTF-8"
>
<script
type=
"text/javascript"
>
function
convert
(
js
)
{
js
=
js
.
replace
(
/
\/\*
.*
?\*\/
/g
,
""
);
/* comments */
js
=
js
.
replace
(
/
\s
+/g
,
" "
);
js
=
js
.
replace
(
/
\s
+
\z
/
,
""
);
js
=
"(function(){"
+
js
+
"})();void 0"
;
return
"javascript:"
+
escape
(
js
);
}
function
init
()
{
var
pre
=
document
.
getElementsByTagName
(
"pre"
);
for
(
var
i
=
0
;
pre
.
length
>
i
;
i
++
)
{
document
.
getElementById
(
pre
[
i
].
id
+
"-link"
).
href
=
convert
(
pre
[
i
].
textContent
);
}
}
</script>
<style
type=
"text/css"
>
pre
{
border
:
solid
black
1px
;
padding
:
0.2ex
;
font-size
:
80%
}
</style>
</head>
<body
onload=
"init()"
>
<h1>
Introduction
</h1>
The scripts in this page are
<a
href=
"http://en.wikipedia.org/wiki/Bookmarklet"
>
bookmarklets
</a>
: store
their link version in a bookmark, and later activate the bookmark on a page
to run the script.
<h1>
TED Talks captions
</h1>
<p><a
id=
"ted_talks_captions-link"
href=
"#"
>
Get links to the captions
</a></p>
<pre
id=
"ted_talks_captions"
>
d = window.open("", "sub", "width=256,height=512,resizable=yes,scrollbars=yes").document;
l = document.getElementById("languageCode").getElementsByTagName("option");
for (i = 1; i
<
l.length ; i++) {
d.body.appendChild(p = d.createElement("p"));
p.appendChild(a = d.createElement("a"));
a.appendChild(d.createTextNode(l[i].textContent));
a.href="http://www.ted.com/talks/subtitles/id/" + talkID+"/lang/" + l[i].value;
}
</pre>
</body>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment