[FFmpeg-devel] [PATCH v2 1/1] avformat/hlsenc: closed caption tags in the master playlist

Dixit, Vishwanath vdixit at akamai.com
Tue Jan 9 11:54:08 EET 2018



On 1/9/18 3:05 PM, 刘歧 wrote:
>>>>
>>>
>>>
>>> I cannot sure use -cc_stream_map_ccgroup option is ok, because the ccgroup string is not standard, maybe it can be defined bu user.
>>> Maybe two ways:
>>> 1. use -cc_stream_map_ccgroup ? this way is defined the name by ffmpeg, cannot modify.
>>> 2. parse the closed captions group string by KeyValue way? maybe this is better.
>>
>> Actually, these requirements have been already handled. The parsing is happening based on key value pairs. The keys are ‘ccgroup’, ‘instreamid’, ‘language’. The values for these keys can be set after ‘:’ as given the examples in the patch. 
>> I am assuming you are trying to set ccgroup name as closecgroup. In that case, please modify the command as below. Because, the string ‘ccgroup’ is a key value, whatever string that comes after ‘ccgroup:’ is the cc group name.  
>> ./ffmpeg -re -f lavfi -i color=red  -g 25  -b:v 1000k -b:a 64k -a53cc 1 -f hls  -cc_stream_map "ccgroup:closecgroup,instreamid:CC1,language:en"   -master_pl_name master.m3u8  live/out.m3u8
>>
>> To clarify further, consider user wants to set cc group name as ‘mycaptions’, instream id as ‘SERVICE60’ language as Spanish, in that case, the map string would be
>> -cc_stream_map "ccgroup:mycaptions,instreamid:SERVICE60,language:sp”  
> I understand and i got the point, 
> just one question, do you want force the user use ffmpeg must input a string “ccgroup” ? if yes, maybe don’t let the user input it use string, maybe use -cc_stream_map_ccgroup is better, What do you think about it?
Are you suggesting to change the string from ‘–cc_stream_map’ to ‘-cc_stream_map_ccgroup’ and remove the ‘ccgroup’ key from the value string? Could you please clarify?

Apart from this, I would like to highlight some advanced use cases where current implementation will be more meaningful. It is possible that that there could be multiple instream ids under the same closed caption group or there can be different closed captions groups. Example:
-cc_stream_map "ccgroup:group1,instreamid:CC1,language:en ccgroup:group1,instreamid:CC2,language:sp”
-cc_stream_map "ccgroup:eng_group,instreamid:CC1,language:en ccgroup:span_group,instreamid:CC1,language:sp”

In these cases, the same ccgroup is mentioned in the –var_stream_map string as well.
-var_stream_map "v:0,a:0,ccgroup:group1 v:1,a:1,ccgroup:group1" or
-var_stream_map "v:0,a:0,ccgroup:eng_group v:1,a:1,ccgroup:span_group"

Here, ‘ccgroup’ is a common key between –cc_stream_map and –var_stream_map. So, it is better to keep this key so that it will more readable and easily configurable for the user.

>
>
> Thanks
>
> Steven
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel





More information about the ffmpeg-devel mailing list