[vlc-devel] [PATCH] Map AV_CODEC_ID_ASS to VLC_CODEC_SSA

张晖 zhanghuicuc at 163.com
Wed Dec 26 02:50:35 CET 2018


Yes, that's exactly my case. And in that case, this built-in modules / codec / libass.c doesn't work for me.

At 2018-12-26 09:33:25, "Zhao Zhili" <quinkblack at foxmail.com> wrote:
>On 2018/12/26 上午12:43, Zhao Zhili wrote:
>>
>>> On Dec 25, 2018, at 2:11 PM, zhanghuicuc at 163.com wrote:
>>>
>>> From: Zhang Hui <zhanghui at formovie.cn>
>>>
>>> so we can use libass with avformat for ass subtitles
>> There is a video filter in FFmpeg based on libass
>> ffmpeg$ grep 'ass_library_init' -r ./
>> ./libavfilter/vf_subtitles.c:    ass->library = ass_library_init();
>>
>> I cannot find other modules based on libass in FFmpeg master.
>>
>> Maybe off-topic, can you elaborate your use case, and does the built-in modules / codec / libass.c works for you?
>
>OK, I think I got it. Demux with libavformat and extracting the embeded 
>subtitle from the container (MKV, most likely :D).
>
>>> ---
>>> modules/codec/avcodec/fourcc.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/modules/codec/avcodec/fourcc.c b/modules/codec/avcodec/fourcc.c
>>> index 40e98e0..b6c1f3f 100644
>>> --- a/modules/codec/avcodec/fourcc.c
>>> +++ b/modules/codec/avcodec/fourcc.c
>>> @@ -474,6 +474,7 @@ static const struct vlc_avcodec_fourcc spu_codecs[] =
>>>      { VLC_CODEC_SUBT, AV_CODEC_ID_TEXT },
>>>      { VLC_CODEC_XSUB, AV_CODEC_ID_XSUB },
>>>      { VLC_CODEC_SSA, AV_CODEC_ID_SSA },
>>> +    { VLC_CODEC_SSA, AV_CODEC_ID_ASS },
>>>      /* AV_CODEC_ID_MOV_TEXT */
>>>      { VLC_CODEC_BD_PG, AV_CODEC_ID_HDMV_PGS_SUBTITLE },
>>> #if LIBAVCODEC_VERSION_CHECK( 57, 999, 999, 71, 100 )
>>> @@ -493,7 +494,6 @@ static const struct vlc_avcodec_fourcc spu_codecs[] =
>>>      /* ffmpeg only: AV_CODEC_ID_MPL2 */
>>>      /* ffmpeg only: AV_CODEC_ID_VPLAYER */
>>>      /* ffmpeg only: AV_CODEC_ID_PJS */
>>> -    /* ffmpeg only: AV_CODEC_ID_ASS */
>>> };
>>>
>>> bool GetFfmpegCodec( enum es_format_category_e cat, vlc_fourcc_t i_fourcc,
>>> -- 
>>> 1.9.1
>>>
>>>
>>> _______________________________________________
>>> vlc-devel mailing list
>>> To unsubscribe or modify your subscription options:
>>> https://mailman.videolan.org/listinfo/vlc-devel
>>
>>
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20181226/adef756e/attachment.html>


More information about the vlc-devel mailing list