ChinaFFmpeg

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 8076|回复: 1

[Windows] 切片疑惑

[复制链接]
发表于 2020-3-24 11:54:37 | 显示全部楼层 |阅读模式
如何指定前几个为5秒,后面都是30秒
回复

使用道具 举报

发表于 2020-3-26 20:49:20 | 显示全部楼层
  1. Muxer hls [Apple HTTP Live Streaming]:
  2.     Common extensions: m3u8.
  3.     Default video codec: h264.
  4.     Default audio codec: aac.
  5.     Default subtitle codec: webvtt.
  6. hls muxer AVOptions:
  7.   -start_number      <int64>      E........ set first number in the sequence (from 0 to I64_MAX) (default 0)
  8.   -hls_time          <float>      E........ set segment length in seconds (from 0 to FLT_MAX) (default 2)
  9.   -hls_init_time     <float>      E........ set segment length in seconds at init list (from 0 to FLT_MAX) (default 0)
  10.   -hls_list_size     <int>        E........ set maximum number of playlist entries (from 0 to INT_MAX) (default 5)
  11.   -hls_delete_threshold <int>        E........ set number of unreferenced segments to keep before deleting (from 1 to INT_MAX) (default 1)
  12.   -hls_ts_options    <string>     E........ set hls mpegts list of options for the container format used for hls
  13.   -hls_vtt_options   <string>     E........ set hls vtt list of options for the container format used for hls
  14.   -hls_wrap          <int>        E........ set number after which the index wraps (will be deprecated) (from 0 to INT_MAX) (default 0)
  15.   -hls_allow_cache   <int>        E........ explicitly set whether the client MAY (1) or MUST NOT (0) cache media segments (from INT_MIN to INT_MAX) (default -1)
  16.   -hls_base_url      <string>     E........ url to prepend to each playlist entry
  17.   -hls_segment_filename <string>     E........ filename template for segment files
  18.   -hls_segment_size  <int>        E........ maximum size per segment file, (in bytes) (from 0 to INT_MAX) (default 0)
  19.   -hls_key_info_file <string>     E........ file with key URI and key file path
  20.   -hls_enc           <boolean>    E........ enable AES128 encryption support (default false)
  21.   -hls_enc_key       <string>     E........ hex-coded 16 byte key to encrypt the segments
  22.   -hls_enc_key_url   <string>     E........ url to access the key to decrypt the segments
  23.   -hls_enc_iv        <string>     E........ hex-coded 16 byte initialization vector
  24.   -hls_subtitle_path <string>     E........ set path of hls subtitles
  25.   -hls_segment_type  <int>        E........ set hls segment files type (from 0 to 1) (default mpegts)
  26.      mpegts                       E........ make segment file to mpegts files in m3u8
  27.      fmp4                         E........ make segment file to fragment mp4 files in m3u8
  28.   -hls_fmp4_init_filename <string>     E........ set fragment mp4 file init filename (default "init.mp4")
  29.   -hls_flags         <flags>      E........ set flags affecting HLS playlist and media file generation (default 0)
  30.      single_file                  E........ generate a single media file indexed with byte ranges
  31.      temp_file                    E........ write segment and playlist to temporary file and rename when complete
  32.      delete_segments              E........ delete segment files that are no longer part of the playlist
  33.      round_durations              E........ round durations in m3u8 to whole numbers
  34.      discont_start                E........ start the playlist with a discontinuity tag
  35.      omit_endlist                 E........ Do not append an endlist when ending stream
  36.      split_by_time                E........ split the hls segment by time which user set by hls_time
  37.      append_list                  E........ append the new segments into old hls segment list
  38.      program_date_time              E........ add EXT-X-PROGRAM-DATE-TIME
  39.      second_level_segment_index              E........ include segment index in segment filenames when use_localtime
  40.      second_level_segment_duration              E........ include segment duration in segment filenames when use_localtime
  41.      second_level_segment_size              E........ include segment size in segment filenames when use_localtime
  42.      periodic_rekey               E........ reload keyinfo file periodically for re-keying
  43.      independent_segments              E........ add EXT-X-INDEPENDENT-SEGMENTS, whenever applicable
  44.      iframes_only                 E........ add EXT-X-I-FRAMES-ONLY, whenever applicable
  45.   -use_localtime     <boolean>    E........ set filename expansion with strftime at segment creation(will be deprecated ) (default false)
  46.   -strftime          <boolean>    E........ set filename expansion with strftime at segment creation (default false)
  47.   -use_localtime_mkdir <boolean>    E........ create last directory component in strftime-generated filename(will be deprecated) (default false)
  48.   -strftime_mkdir    <boolean>    E........ create last directory component in strftime-generated filename (default false)
  49.   -hls_playlist_type <int>        E........ set the HLS playlist type (from 0 to 2) (default 0)
  50.      event                        E........ EVENT playlist
  51.      vod                          E........ VOD playlist
  52.   -method            <string>     E........ set the HTTP method(default: PUT)
  53.   -hls_start_number_source <int>        E........ set source of first number in sequence (from 0 to 2) (default generic)
  54.      generic                      E........ start_number value (default)
  55.      epoch                        E........ seconds since epoch
  56.      datetime                     E........ current datetime as YYYYMMDDhhmmss
  57.   -http_user_agent   <string>     E........ override User-Agent field in HTTP header
  58.   -var_stream_map    <string>     E........ Variant stream map string
  59.   -cc_stream_map     <string>     E........ Closed captions stream map string
  60.   -master_pl_name    <string>     E........ Create HLS master playlist with this name
  61.   -master_pl_publish_rate <int>        E........ Publish master play list every after this many segment intervals (from 0 to UINT32_MAX) (default 0)
  62.   -http_persistent   <boolean>    E........ Use persistent HTTP connections (default false)
  63.   -timeout           <duration>   E........ set timeout for socket I/O operations (default -0.000001)
  64.   -ignore_io_errors  <boolean>    E........ Ignore IO errors for stable long-duration runs with network output (default false)
  65.   -headers           <string>     E........ set custom HTTP headers, can override built in default headers
复制代码
用-hls_init_time可以设置前几片5秒,hls_time后面30秒, 但是这个只适合直播,不适合点播,点播的话,需要您自己改,目前不支持这么干
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|Archiver|ChinaFFmpeg

GMT+8, 2024-12-27 13:34 , Processed in 0.045103 second(s), 14 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表