[FFmpeg-devel] Test case for Closed caption decoder.

Clément Bœsch u at pkh.me
Mon Apr 27 19:08:45 CEST 2015


On Mon, Apr 27, 2015 at 10:35:49PM +0530, Anshul wrote:
> Hello,
> 
> I am attaching patch for closed caption decoder.
> 
> Thanks
> Anshul

> From 230cd5d9de356a8e84d2c36f91510631317986db Mon Sep 17 00:00:00 2001
> From: Anshul Maheshwari <er.anshul.maheshwari at gmail.com>
> Date: Mon, 27 Apr 2015 22:33:48 +0530
> Subject: [PATCH] Adding Closed caption sub test case
> 
> Signed-off-by: Anshul Maheshwari <er.anshul.maheshwari at gmail.com>
> ---
>  tests/fate/subtitles.mak |  3 +++
>  tests/ref/fate/sub-cc    | 13 +++++++++++++
>  2 files changed, 16 insertions(+)
>  create mode 100644 tests/ref/fate/sub-cc
> 
> diff --git a/tests/fate/subtitles.mak b/tests/fate/subtitles.mak
> index 53cd4cb..7f71602 100644
> --- a/tests/fate/subtitles.mak
> +++ b/tests/fate/subtitles.mak
> @@ -1,6 +1,9 @@
>  FATE_SUBTITLES_ASS-$(call ALLYES, AQTITLE_DEMUXER TEXT_DECODER ICONV) += fate-sub-aqtitle
>  fate-sub-aqtitle: CMD = fmtstdout ass -sub_charenc windows-1250 -i $(TARGET_SAMPLES)/sub/AQTitle_capability_tester.aqt
>  
> +FATE_SUBTITLES_ASS-$(call ALLYES, CCAPTION_DECODER ) += fate-sub-cc
> +fate-sub-cc: CMD = fmtstdout ass -f lavfi -i "movie=$(TARGET_SAMPLES)/sub/Closedcaption_atsc_rollup.ts[out0+subcc]"

it seems to also depend on TS demuxer, and movie source filter

> +
>  FATE_SUBTITLES_ASS-$(call DEMDEC, JACOSUB, JACOSUB) += fate-sub-jacosub
>  fate-sub-jacosub: CMD = fmtstdout ass -i $(TARGET_SAMPLES)/sub/JACOsub_capability_tester.jss
>  
> diff --git a/tests/ref/fate/sub-cc b/tests/ref/fate/sub-cc
> new file mode 100644
> index 0000000..5ea8c22
> --- /dev/null
> +++ b/tests/ref/fate/sub-cc
> @@ -0,0 +1,13 @@
> +[Script Info]
> +; Script generated by FFmpeg/Lavc
> +ScriptType: v4.00+
> +PlayResX: 384
> +PlayResY: 288
> +
> +[V4+ Styles]
> +Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
> +Style: Default,Arial,16,&Hffffff,&Hffffff,&H0,&H0,0,0,0,0,100,100,0,0,1,1,0,2,10,10,10,0
> +
> +[Events]
> +Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
> +Dialogue: 0,0:00:36.87,0:00:38.37,Default,,0,0,0,,( explosion )\NDialogue: 0,0:00:38.37,0:00:40.51,Default,,0,0,0,,( explosion )\N( inaudible radio chatter )\NDialogue: 0,0:00:40.51,0:00:41.88,Default,,0,0,0,,( inaudible radio chatter )\N>> Safety remains our number one\NDialogue: 0,0:00:41.88,0:00:43.34,Default,,0,0,0,,>> Safety remains our number one\Npriority.\NDialogue: 0,0:00:43.34,0:00:44.51,Default,,0,0,0,,priority.\N>> BP can talk about safety all\NDialogue: 0,0:00:44.51,0:00:45.88,Default,,0,0,0,,>> BP can talk about safety all\Nthey want, but they're not going\NDialogue: 0,0:00:45.88,0:00:47.95,Default,,0,0,0,,they want, but they're not going\Nto become a safer company.\NDialogue: 0,0:00:47.95,0:00:49.52,Default,,0,0,0,,to become a safer company.\N>> They base everything on risk.\NDialogue: 0,0:00:49.52,0:00:50.65,Default,,0,0,0,,>> They base everything on risk.\N"How many lives can we afford to\NDialogue: 0,0:00:50.65,0:00:51.65,Default,,0,0,0,,"How many lives can we afford to\Nlose before we need to deal with\NDialogue: 0,0:00:51.65,0:00:52.55,Default,,0,0,0,,lose before we need to deal with\Nthis?"\NDialogue: 0,0:00:52.55,0:00:53.25,Default,,0,0,0,,this?"\N>> 9-1.\NDialogue: 0,0:00:53.25,0:00:55.22,Default,,0,0,0,,>> 9-1.\N>> Yes, this plant just blew up!\NDialogue: 0,0:00:55.22,0:00:57.19,Default,,0,0,0,,>> Yes, this plant just blew up!\N>> From Texas and Alaska to the\NDialogue: 0,0:00:57.19,0:00:58.39,Default,,0,0,0,,>> From Texas and Alaska to the\NGulf of Mexico...\NDialogue: 0,0:00:58.39,0:01:00.19,Default,,0,0,0,,Gulf of Mexico...\N>> BP apologized again...\NDialogue: 0,0:01:00.19,0:01:02.33,Default,,0,0,0,,>> BP apologized again...\N>> ... Apology after apology.\NDialogue: 0,0:01:02.33,0:01:03.10,Default,,0,0,0,,>> ... Apology after apology.\N>> They pledged repeatedly to\NDialogue: 0,0:01:03.10,0:01:05.40,Default,,0,0,0,,>> They pledged repeatedly to\Nrun a safer operation, yet they\NDialogue: 0,0:01:05.40,0:01:07.17,Default,,0,0,0,,run a safer operation, yet they\Ncontinued to cut costs.\NDialogue: 0,0:01:07.17,0:01:08.67,Default,,0,0,0,,continued to cut costs.\N>> We have a facility here that\NDialogue: 0,0:01:08.67,0:01:10.17,Default,,0,0,0,,>> We have a facility here that\Ncould produce a cloud of gas\NDialogue: 0,0:01:10.17,0:01:11.57,Default,,0,0,0,,could produce a cloud of gas\Nthat would make this place look\NDialogue: 0,0:01:11.57,0:01:13.04,Default,,0,0,0,,that would make this place look\Nlike Hiroshima.\NDialogue: 0,0:01:13.04,0:01:15.21,Default,,0,0,0,,like Hiroshima.\N>> What went wrong at BP?\NDialogue: 0,0:01:15.21,0:01:17.11,Default,,0,0,0,,>> What went wrong at BP?\N>> The culture of BP management\N

Where are the line breaks?

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150427/8f1ad1a4/attachment.asc>


More information about the ffmpeg-devel mailing list