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
6433618d
Commit
6433618d
authored
Feb 21, 2016
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: set sub_text_format to ass (without timing) by default
Fixes Ticket #4783
parent
30e76853
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
69 additions
and
67 deletions
+69
-67
ffmpeg.c
ffmpeg.c
+2
-0
sub-charenc
tests/ref/fate/sub-charenc
+1
-1
sub-textenc
tests/ref/fate/sub-textenc
+33
-33
sub-webvttenc
tests/ref/fate/sub-webvttenc
+33
-33
No files found.
ffmpeg.c
View file @
6433618d
...
...
@@ -2547,6 +2547,8 @@ static int init_input_stream(int ist_index, char *error, int error_len)
av_log
(
NULL
,
AV_LOG_WARNING
,
"Warning using DVB subtitles for filtering and output at the same time is not fully supported, also see -compute_edt [0|1]
\n
"
);
}
av_dict_set
(
&
ist
->
decoder_opts
,
"sub_text_format"
,
"ass"
,
AV_DICT_DONT_OVERWRITE
);
if
(
!
av_dict_get
(
ist
->
decoder_opts
,
"threads"
,
NULL
,
0
))
av_dict_set
(
&
ist
->
decoder_opts
,
"threads"
,
"auto"
,
0
);
if
((
ret
=
avcodec_open2
(
ist
->
dec_ctx
,
codec
,
&
ist
->
decoder_opts
))
<
0
)
{
...
...
tests/ref/fate/sub-charenc
View file @
6433618d
...
...
@@ -16,7 +16,7 @@ Dialogue: 0,0:01:22.17,0:01:24.05,Default,,0,0,0,,Учителят Ли е ту
Dialogue: 0,0:01:45.48,0:01:47.32,Default,,0,0,0,,Шу Лиен!
Dialogue: 0,0:01:54.53,0:01:57.24,Default,,0,0,0,,Ли Му Бай е тук.
Dialogue: 0,0:02:05.83,0:02:09.00,Default,,0,0,0,,- Как вървят нещата?\N- Добре. Моля, влезте!
Dialogue: 0,0:02:23.48,0:02:26.5
2
,Default,,0,0,0,,Му Бай...\NМина много време.
Dialogue: 0,0:02:23.48,0:02:26.5
3
,Default,,0,0,0,,Му Бай...\NМина много време.
Dialogue: 0,0:02:26.73,0:02:28.11,Default,,0,0,0,,Така е.
Dialogue: 0,0:02:28.57,0:02:31.41,Default,,0,0,0,,- Как върви бизнесът?\N- Добре.
Dialogue: 0,0:02:31.61,0:02:33.90,Default,,0,0,0,,- А ти как си?\N- Добре.
...
...
tests/ref/fate/sub-textenc
View file @
6433618d
...
...
@@ -16,13 +16,13 @@ If you see this with the normal font, the player don't (fully) support font face
Hidden
4
00:00:04,501 --> 00:00:07,50
1
00:00:04,501 --> 00:00:07,50
0
This text should be small
This text should be normal
This text should be big
5
00:00:07,501 --> 00:00:11,50
1
00:00:07,501 --> 00:00:11,50
0
This should be an E with an accent: È
日本語
This text should be bold, italics and underline
...
...
@@ -31,7 +31,7 @@ This text should be small and red
This text should be big and brown
6
00:00:11,501 --> 00:00:14,50
1
00:00:11,501 --> 00:00:14,50
0
This line should be bold
This line should be italics
This line should be underline
...
...
@@ -40,7 +40,7 @@ Both lines
should be underline
7
00:00:14,501 --> 00:00:17,50
1
00:00:14,501 --> 00:00:17,50
0
>
It would be a good thing to
hide invalid html tags that are closed and show the text in them
...
...
@@ -49,7 +49,7 @@ Show not opened tags</invalid_tag_not_opened>
<
8
00:00:17,501 --> 00:00:20,50
1
00:00:17,501 --> 00:00:20,50
0
and also
hide invalid html tags with parameters that are closed and show the text in them
<invalid_tag_uc par=5>but show un-closed invalid html tags
...
...
@@ -57,66 +57,66 @@ This text should be showed underlined without problems also: 2<3,5>1,4<6
This shouldn't be underlined
9
00:00:20,501 --> 00:00:21,50
1
00:00:20,501 --> 00:00:21,50
0
This text should be in the normal position...
10
00:00:21,501 --> 00:00:22,50
1
00:00:21,501 --> 00:00:22,50
0
This text should NOT be in the normal position
11
00:00:22,501 --> 00:00:24,50
1
00:00:22,501 --> 00:00:24,50
0
Implementation is the same of the ASS tag
This text should be at the
top and horizontally centered
12
00:00:22,501 --> 00:00:24,50
1
00:00:22,501 --> 00:00:24,50
0
This text should be at the
middle and horizontally centered
13
00:00:22,501 --> 00:00:24,50
1
00:00:22,501 --> 00:00:24,50
0
This text should be at the
bottom and horizontally centered
14
00:00:24,501 --> 00:00:26,50
1
00:00:24,501 --> 00:00:26,50
0
This text should be at the
top and horizontally at the left
15
00:00:24,501 --> 00:00:26,50
1
00:00:24,501 --> 00:00:26,50
0
This text should be at the
middle and horizontally at the left
(The second position must be ignored)
16
00:00:24,501 --> 00:00:26,50
1
00:00:24,501 --> 00:00:26,50
0
This text should be at the
bottom and horizontally at the left
17
00:00:26,501 --> 00:00:28,50
1
00:00:26,501 --> 00:00:28,50
0
This text should be at the
top and horizontally at the right
18
00:00:26,501 --> 00:00:28,50
1
00:00:26,501 --> 00:00:28,50
0
This text should be at the
middle and horizontally at the right
19
00:00:26,501 --> 00:00:28,50
1
00:00:26,501 --> 00:00:28,50
0
This text should be at the
bottom and horizontally at the right
20
00:00:28,501 --> 00:00:31,50
1
00:00:28,501 --> 00:00:31,50
0
This could be the most difficult thing to implement
21
00:00:31,501 --> 00:00:50,50
1
00:00:31,501 --> 00:00:50,50
0
First text
22
...
...
@@ -124,38 +124,38 @@ First text
Second, it shouldn't overlap first
23
00:00:35,501 --> 00:00:37,50
1
00:00:35,501 --> 00:00:37,50
0
Third, it should replace second
24
00:00:36,501 --> 00:00:50,50
1
00:00:36,501 --> 00:00:50,50
0
Fourth, it shouldn't overlap first and third
25
00:00:40,501 --> 00:00:45,50
1
00:00:40,501 --> 00:00:45,50
0
Fifth, it should replace third
26
00:00:45,501 --> 00:00:50,50
1
00:00:45,501 --> 00:00:50,50
0
Sixth, it shouldn't be
showed overlapped
27
00:00:50,501 --> 00:00:52,50
1
00:00:50,501 --> 00:00:52,50
0
TEXT 1 (bottom)
28
00:00:50,501 --> 00:00:52,50
1
00:00:50,501 --> 00:00:52,50
0
text 2
29
00:00:52,501 --> 00:00:54,50
1
00:00:52,501 --> 00:00:54,50
0
Hide these tags:
also hide these tags:
but show this: {normal text}
30
00:00:54,501 --> 00:01:00,50
1
00:00:54,501 --> 00:01:00,50
0
\ N is a forced line break
\ h is a hard space
...
...
@@ -163,21 +163,21 @@ Normal spaces at the start and at the end of the line are trimmed while hard spa
The\hline\hwill\hnever\hbreak\hautomatically\hright\hbefore\hor\hafter\ha\hhard\hspace.\h:-D
31
00:00:54,501 --> 00:00:56,50
1
00:00:54,501 --> 00:00:56,50
0
\h\h\h\h\hA (05 hard spaces followed by a letter)
A (Normal spaces followed by a letter)
A (No hard spaces followed by a letter)
32
00:00:56,501 --> 00:00:58,50
1
00:00:56,501 --> 00:00:58,50
0
\h\h\h\h\hA (05 hard spaces followed by a letter)
A (Normal spaces followed by a letter)
A (No hard spaces followed by a letter)
Show this: \TEST and this: \-)
33
00:00:58,501 --> 00:01:00,50
1
00:00:58,501 --> 00:01:00,50
0
A letter followed by 05 hard spaces: A\h\h\h\h\h
A letter followed by normal spaces: A
...
...
@@ -188,26 +188,26 @@ A letter followed by no hard spaces: A
^--Forced line break
34
00:01:00,501 --> 00:01:02,50
1
00:01:00,501 --> 00:01:02,50
0
Both line should be strikethrough,
yes.
Correctly closed tags
should be hidden.
35
00:01:02,501 --> 00:01:04,50
1
00:01:02,501 --> 00:01:04,50
0
It shouldn't be strikethrough,
not opened tag showed as text.</s>
Not opened tag showed as text.</xxxxx>
36
00:01:04,501 --> 00:01:06,50
1
00:01:04,501 --> 00:01:06,50
0
Three lines should be strikethrough,
yes.
<yyyy>Not closed tags showed as text
37
00:01:06,501 --> 00:01:08,50
1
00:01:06,501 --> 00:01:08,50
0
Both line should be strikethrough but
the wrong closing tag should be showed</b>
tests/ref/fate/sub-webvttenc
View file @
6433618d
...
...
@@ -14,12 +14,12 @@ If you see this with the normal font, the player don't (fully) support font face
00:04.500 --> 00:04.500
Hidden
00:04.501 --> 00:07.50
1
00:04.501 --> 00:07.50
0
This text should be small
This text should be normal
This text should be big
00:07.501 --> 00:11.50
1
00:07.501 --> 00:11.50
0
This should be an E with an accent: È
日本語
<b><i><u>This text should be bold, italics and underline</u></i></b>
...
...
@@ -27,7 +27,7 @@ This text should be small and green
This text should be small and red
This text should be big and brown
00:11.501 --> 00:14.50
1
00:11.501 --> 00:14.50
0
<b>This line should be bold</b>
<i>This line should be italics</i>
<u>This line should be underline</u>
...
...
@@ -35,7 +35,7 @@ This line should be strikethrough
<u>Both lines
should be underline</u>
00:14.501 --> 00:17.50
1
00:14.501 --> 00:17.50
0
>
It would be a good thing to
hide invalid html tags that are closed and show the text in them
...
...
@@ -43,110 +43,110 @@ hide invalid html tags that are closed and show the text in them
Show not opened tags</invalid_tag_not_opened>
<
00:17.501 --> 00:20.50
1
00:17.501 --> 00:20.50
0
and also
hide invalid html tags with parameters that are closed and show the text in them
<invalid_tag_uc par=5>but show un-closed invalid html tags
<u>This text should be showed underlined without problems also: 2<3,5>1,4<6</u>
This shouldn't be underlined
00:20.501 --> 00:21.50
1
00:20.501 --> 00:21.50
0
This text should be in the normal position...
00:21.501 --> 00:22.50
1
00:21.501 --> 00:22.50
0
This text should NOT be in the normal position
00:22.501 --> 00:24.50
1
00:22.501 --> 00:24.50
0
Implementation is the same of the ASS tag
This text should be at the
top and horizontally centered
00:22.501 --> 00:24.50
1
00:22.501 --> 00:24.50
0
This text should be at the
middle and horizontally centered
00:22.501 --> 00:24.50
1
00:22.501 --> 00:24.50
0
This text should be at the
bottom and horizontally centered
00:24.501 --> 00:26.50
1
00:24.501 --> 00:26.50
0
This text should be at the
top and horizontally at the left
00:24.501 --> 00:26.50
1
00:24.501 --> 00:26.50
0
This text should be at the
middle and horizontally at the left
(The second position must be ignored)
00:24.501 --> 00:26.50
1
00:24.501 --> 00:26.50
0
This text should be at the
bottom and horizontally at the left
00:26.501 --> 00:28.50
1
00:26.501 --> 00:28.50
0
This text should be at the
top and horizontally at the right
00:26.501 --> 00:28.50
1
00:26.501 --> 00:28.50
0
This text should be at the
middle and horizontally at the right
00:26.501 --> 00:28.50
1
00:26.501 --> 00:28.50
0
This text should be at the
bottom and horizontally at the right
00:28.501 --> 00:31.50
1
00:28.501 --> 00:31.50
0
This could be the most difficult thing to implement
00:31.501 --> 00:50.50
1
00:31.501 --> 00:50.50
0
First text
00:33.500 --> 00:35.500
Second, it shouldn't overlap first
00:35.501 --> 00:37.50
1
00:35.501 --> 00:37.50
0
Third, it should replace second
00:36.501 --> 00:50.50
1
00:36.501 --> 00:50.50
0
Fourth, it shouldn't overlap first and third
00:40.501 --> 00:45.50
1
00:40.501 --> 00:45.50
0
Fifth, it should replace third
00:45.501 --> 00:50.50
1
00:45.501 --> 00:50.50
0
Sixth, it shouldn't be
showed overlapped
00:50.501 --> 00:52.50
1
00:50.501 --> 00:52.50
0
TEXT 1 (bottom)
00:50.501 --> 00:52.50
1
00:50.501 --> 00:52.50
0
text 2
00:52.501 --> 00:54.50
1
00:52.501 --> 00:54.50
0
Hide these tags:
also hide these tags:
but show this: {normal text}
00:54.501 --> 01:00.50
1
00:54.501 --> 01:00.50
0
\ N is a forced line break
\ h is a hard space
Normal spaces at the start and at the end of the line are trimmed while hard spaces are not trimmed.
The\hline\hwill\hnever\hbreak\hautomatically\hright\hbefore\hor\hafter\ha\hhard\hspace.\h:-D
00:54.501 --> 00:56.50
1
00:54.501 --> 00:56.50
0
\h\h\h\h\hA (05 hard spaces followed by a letter)
A (Normal spaces followed by a letter)
A (No hard spaces followed by a letter)
00:56.501 --> 00:58.50
1
00:56.501 --> 00:58.50
0
\h\h\h\h\hA (05 hard spaces followed by a letter)
A (Normal spaces followed by a letter)
A (No hard spaces followed by a letter)
Show this: \TEST and this: \-)
00:58.501 --> 01:00.50
1
00:58.501 --> 01:00.50
0
A letter followed by 05 hard spaces: A\h\h\h\h\h
A letter followed by normal spaces: A
...
...
@@ -156,22 +156,22 @@ A letter followed by no hard spaces: A
^--Forced line break
01:00.501 --> 01:02.50
1
01:00.501 --> 01:02.50
0
Both line should be strikethrough,
yes.
Correctly closed tags
should be hidden.
01:02.501 --> 01:04.50
1
01:02.501 --> 01:04.50
0
It shouldn't be strikethrough,
not opened tag showed as text.</s>
Not opened tag showed as text.</xxxxx>
01:04.501 --> 01:06.50
1
01:04.501 --> 01:06.50
0
Three lines should be strikethrough,
yes.
<yyyy>Not closed tags showed as text
01:06.501 --> 01:08.50
1
01:06.501 --> 01:08.50
0
Both line should be strikethrough but
the wrong closing tag should be showed</b>
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