From: Mao Hata <xt4ubq@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH v4 0/4] add ARIB caption decoder using libaribcaption
Date: Sat, 2 Jul 2022 01:08:31 +0900
Message-ID: <37fd985e-4250-6593-5d2d-936c32226602@gmail.com> (raw)
In-Reply-To: <db9d924c-f090-32a0-6b57-0d63e0199b39@pc.nifty.jp>
In aribcaption_close() (libaribcaption.c):
```
if (ctx->renderer) {
aribcc_renderer_free(ctx->renderer);
ctx->decoder = NULL;
}
```
This should be `ctx->renderer = NULL;`.
In set_ass_header() (libaribcaption.c):
```
if (fonts && *fonts) {
font_name = av_get_token(&fonts, ",");
if (!font_name)
return AVERROR(ENOMEM);
} else
font_name = av_strdup(DEFAULT_FONT_FAMILY);
```
You should reposition `if (!font_name) return AVERROR(ENOMEM);`, because
av_strdup() can also return NULL.
On some "return"s in aribcaption_init(), I think you have forgotten
aribcaption_close(avctx).
I have tested the features of this patch using some sample files. As you
recommend, the files under https://streams.videolan.org/streams/ts/ARIB/
are good samples. In particular,
https://streams.videolan.org/streams/ts/ARIB/japan/osaka_15.ts uses
various subtitle expressions, I like it.
# ASS formatted text
$ ffmpeg -fix_sub_duration -i osaka_15.ts osaka_15.ass
I think the created ASS by the above command is much better than that of
aribb24. (Erase timing for each subtitle of aribb24 was very
inaccurate.) Then, it's trivial, but is there any reason to set the
default "Alignment" to 2 and always override it with "{\an7}"? I think
the default "Alignment" should be 7.
# Overlay subtitles on the video
$ ffmpeg -sub_type bitmap -i osaka_15.ts -filter_complex
"[0:v][0:s]overlay" -s 1280x720 osaka_15.mp4
The bitmap feature is a cool one. Its output quality is the same as the
subtitles I usually watch on Japanese TV devices. I tested the feature
with many personal files, no particular problem found.
Mao Hata
On 2022/06/24 19:06, TADANO Tokumei wrote:
> 3rd ping!
>
> Are there any other objections to this patch set?
> If not, would someone push it to the repository?
>
> A comment inline:
>
> On 2022/06/17 0:30, TADANO Tokumei wrote:
>>
>> On 2022/06/16 22:40, Soft Works wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
>>>> TADANO Tokumei
>>>> Sent: Thursday, June 16, 2022 3:23 PM
>>>> To: ffmpeg-devel@ffmpeg.org
>>>> Subject: Re: [FFmpeg-devel] [PATCH v4 0/4] add ARIB caption decoder
>>>> using libaribcaption
>>>>
>>>> ping again!
>>>>
>>>> Are there any objections to this patch set?
>>>> If not, would someone push it to the repository?
>>>>
>>>> On 2022/06/08 18:48, TADANO Tokumei wrote:
>>>>> ping
>>>>>
>>>>> The patch set has been well tested by Japanese ISDB-related
>>>> developers and works fine.
>>>>> I think it already has good quality to merge.
>>>>>
>>>>> It requires external library like libaribb24, but the feature is
>>>> disabled by default.
>>>>> There is no impact to current code without `--enable-
>>>> libaribcaption` option is
>>>>> specified at configuration. The patch set provide better subtitle
>>>> feature
>>>>> for ISDB users than libaribb24 if enabled.
>>>
>>> What exactly is better than with the other ARIB decoder?
>>>
>>>
>>>>> On 2022/05/30 23:55, TADANO Tokumei wrote:
>>>>>> This patch set add another ARIB caption decoder using
>>>> libaribcaption
>>>>>> external library: https://github.com/xqq/libaribcaption
>>>>>> The library decodes subtitles of ISDB-based TV broadcasting.
>>>>>> It is not only for Japanese ARIB STD-B24 caption, but also for
>>>>>> Brazilian ABNT NBR 15606-1 and Philippines version of ISDB-T.
>>>>>>
>>>>>> Unlike libaribb24, it supports 3 types of subtitle outputs:
>>>>>> * text: plain text
>>>>>> * ass: ASS formatted text
>>>>>> * bitmap: bitmap image
>>>
>>> This will become obsolete with the introduction of subtitle
>>> filtering (https://github.com/ffstaging/FFmpeg/pull/18).
>
> The subtitle filtering is not ready yet.
> There is no reason to prevent to apply this patch set.
> After the subtitle filtering will be ready, I can modify it to follow
> new API.
>
>>> Just recently, Traian has joined and contributed a filter
>>> for converting text subtitles to graphic subtitles
>>> (https://github.com/softworkz/FFmpeg/pull/1), which fills
>>> the last remaining gap for subtitle conversions.
>>>
>>>
>>> Is this the only advantage over the existing ARIB caption decoder?
>>
>> The existing ARIB caption decoder (libaribb24) has lower reproducibility.
>> For example, it lacks position information that is in original ARIB
>> caption data.
>> With this patch set, the intended caption is almost reproduced as ARIB
>> standard
>> states.
>>
>> Thanks,
>> TADANO
>>
>>> Thanks,
>>> sw
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-07-01 16:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-30 14:55 TADANO Tokumei
2022-05-30 14:55 ` [FFmpeg-devel] [PATCH v4 1/4] lavc/libaribcaption.c: " TADANO Tokumei
2022-05-30 14:55 ` [FFmpeg-devel] [PATCH v4 2/4] lavc/codec_desc.c: remove AV_CODEC_PROP_TEXT_SUB property TADANO Tokumei
2022-05-30 14:55 ` [FFmpeg-devel] [PATCH v4 3/4] lavf/mpegts.c: set some properties for ARIB caption TADANO Tokumei
2022-05-30 14:55 ` [FFmpeg-devel] [PATCH v4 4/4] doc/decoders.texi: add document of aribcaption decoder TADANO Tokumei
2022-06-08 9:48 ` [FFmpeg-devel] [PATCH v4 0/4] add ARIB caption decoder using libaribcaption TADANO Tokumei
2022-06-16 13:23 ` TADANO Tokumei
2022-06-16 13:40 ` Soft Works
2022-06-16 15:30 ` TADANO Tokumei
2022-06-24 10:06 ` TADANO Tokumei
2022-07-01 16:08 ` Mao Hata [this message]
2022-07-03 8:17 ` TADANO Tokumei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=37fd985e-4250-6593-5d2d-936c32226602@gmail.com \
--to=xt4ubq@gmail.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git