[FFmpeg-devel] [PATCH V2 1/2] doc/muxers: fix and update docs for HLS muxer

Gyan ffmpeg at gyani.pro
Thu Jul 4 14:35:55 EEST 2019



On 04-07-2019 03:50 PM, Liu Steven wrote:
>
>> 在 2019年7月4日,下午6:15,Gyan <ffmpeg at gyani.pro> 写道:
>>
>>
>>
>> On 04-07-2019 02:37 PM, Liu Steven wrote:
>>>> 在 2019年7月4日,下午4:49,Gyan <ffmpeg at gyani.pro> 写道:
>>>>
>>>>
>>>>
>>>> On 28-06-2019 08:36 PM, Jun Zhao wrote:
>>>>> From: Jun Zhao <barryjzhao at tencent.com>
>>>>>
>>>>> fix and update docs for HLS muxer
>>>>>
>>>>> Signed-off-by: Jun Zhao <barryjzhao at tencent.com>
>>>>> ---
>>>>>   doc/muxers.texi |   24 ++++++++++++++++--------
>>>>>   1 files changed, 16 insertions(+), 8 deletions(-)
>>>>>
>>>>> diff --git a/doc/muxers.texi b/doc/muxers.texi
>>>>> index dd64672..d179584 100644
>>>>> --- a/doc/muxers.texi
>>>>> +++ b/doc/muxers.texi
>>>>> @@ -525,7 +525,7 @@ See also the @ref{framehash} muxer.
>>>>>   @anchor{hls}
>>>>>   @section hls
>>>>>   -Apple HTTP Live Streaming muxer that segments MPEG-TS according to
>>>>> +Apple HTTP Live Streaming muxer that segments MPEG-TS/fragmented MP4 according to
>>>>>   the HTTP Live Streaming (HLS) specification.
>>>>>     It creates a playlist file, and one or more segment files. The output filename
>>>>> @@ -767,20 +767,20 @@ ffmpeg -f lavfi -re -i testsrc -c:v h264 -hls_flags delete_segments \
>>>>>     -hls_key_info_file file.keyinfo out.m3u8
>>>>>   @end example
>>>>>   - at item -hls_enc @var{enc}
>>>>> + at item hls_enc @var{enc}
>>>>>   Enable (1) or disable (0) the AES128 encryption.
>>>>>   When enabled every segment generated is encrypted and the encryption key
>>>>>   is saved as @var{playlist name}.key.
>>>>>   - at item -hls_enc_key @var{key}
>>>>> + at item hls_enc_key @var{key}
>>>>>   Hex-coded 16byte key to encrypt the segments, by default it
>>>>>   is randomly generated.
>>>>>   - at item -hls_enc_key_url @var{keyurl}
>>>>> + at item hls_enc_key_url @var{keyurl}
>>>>>   If set, @var{keyurl} is prepended instead of @var{baseurl} to the key filename
>>>>>   in the playlist.
>>>>>   - at item -hls_enc_iv @var{iv}
>>>>> + at item hls_enc_iv @var{iv}
>>>>>   Hex-coded 16byte initialization vector for every segment instead
>>>>>   of the autogenerated ones.
>>>>>   @@ -901,14 +901,22 @@ are always written into temporary file regardles of this flag if @code{master_pl
>>>>>     @end table
>>>>>   - at item hls_playlist_type event
>>>>> + at item hls_playlist_type @var{int}
>>>>> +Set the HLS playlist type, Default value is 0.
>>>> I would prefer if you add an entry for PLAYLIST_TYPE_NONE in the options table and document it here.
>>> There have no TYPE named NONE,
>>> it’s only EVENT and VOD now in RFC 8216, there will have no playlist type when not use hls_playlist_type.
>>> keep the current option please.
>> I'm not referring to the types in RFC 8216. The muxer defines a constant for when no type is set, but the user can't set that via a string, so for consistency, add a string option value. It can be called 'none' or 'unset'. Right now, it can only set using an integer 0 but the two RFC types are set using a string.
> If user want use none, don’t use the option is a better way, not use the option to set a value.
> the option is here long time, i think write the description in document is ok, keep the option current status in hlsenc please.
I think it's a good convention that if a variable can assume a value at 
initialization,  user should be able to set it to that value. Assignment 
by omission shouldn't be the _only_ way.  What do you think?

Gyan


More information about the ffmpeg-devel mailing list