[FFmpeg-user] issue with [PATCH] avformat/hlsenc: actual segment file size and duration in segment filenames

Christian Johannesen chrisjohannesen at gmail.com
Thu Jan 12 20:22:19 EET 2017


On Thu, Jan 12, 2017 at 11:56 AM, Steven Liu <lingjiujianke at gmail.com>
wrote:

>
>
> patch update, and fix it, the problem is in hls_write_trailer for the last
> segments.
>

 Looks to be working all TS segments are named correctly. Thanks!

ffmpeg.exe -i D:\media\mix_of_clip_960x540_2128.mp4 -codec copy -f hls
-hls_time 6 -hls_list_size 0 -hls_flags
second_level_segment_index+second_level_segment_size+second_level_segment_duration
-use_localtime 1 -use_localtime_mkdir 1 -hls_segment_filename
"D:\media\mix_of_clip_960x540_2128\segment_%%04d_%%08s_%%013t.ts"
D:\media\mix_of_clip_960x540_2128\index.m3u8
ffmpeg version N-83083-gf7191cc Copyright (c) 2000-2017 the FFmpeg
developers
  built with gcc 6.2.0 (Rev2, Built by MSYS2 project)
  configuration:
  libavutil      55. 43.100 / 55. 43.100
  libavcodec     57. 72.100 / 57. 72.100
  libavformat    57. 62.100 / 57. 62.100
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 69.100 /  6. 69.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'D:\media\mix_of_clip_960x540_2128.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.11.100
  Duration: 00:12:00.68, start: 0.000000, bitrate: 1248 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv,
bt709), 960x540 [SAR 1:1 DAR 16:9], 1115 kb/s, 23.98 fps, 23.98 tbr, 24k
tbn, 47.95 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Output #0, hls, to 'D:\media\mix_of_clip_960x540_2128\index.m3u8':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.62.100
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv,
bt709), 960x540 [SAR 1:1 DAR 16:9], q=2-31, 1115 kb/s, 23.98 fps, 23.98
tbr, 90k tbn, 23.98 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
stereo, fltp, 128 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[hls @ 0000000002412800] hls->dpp = [0.041711]
frame=17278 fps=15362 q=-1.0 Lsize=N/A time=00:12:00.61 bitrate=N/A speed=
641x
video:98101kB audio:11261kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: unknown

 Directory of D:\media\mix_of_clip_960x540_2128

01/12/2017  01:20 PM    <DIR>          .
01/12/2017  01:20 PM    <DIR>          ..
01/12/2017  01:20 PM            11,008 index.m3u8
01/12/2017  01:20 PM           470,940
segment_0000_00470940_0000006049067.ts
01/12/2017  01:20 PM           552,908
segment_0001_00552908_0000006006400.ts
01/12/2017  01:20 PM           807,836
segment_0002_00807836_0000006006400.ts
01/12/2017  01:20 PM           895,256
segment_0003_00895256_0000006006400.ts
01/12/2017  01:20 PM           858,972
segment_0004_00858972_0000006006400.ts
01/12/2017  01:20 PM           553,660
segment_0005_00553660_0000006006400.ts
01/12/2017  01:20 PM           488,048
segment_0006_00488048_0000006006400.ts
01/12/2017  01:20 PM           570,768
segment_0007_00570768_0000006006400.ts
01/12/2017  01:20 PM           364,720
segment_0008_00364720_0000006006400.ts
01/12/2017  01:20 PM           435,972
segment_0009_00435972_0000006006400.ts
01/12/2017  01:20 PM           801,444
segment_0010_00801444_0000006006400.ts
01/12/2017  01:20 PM           661,384
segment_0011_00661384_0000006006400.ts
01/12/2017  01:20 PM           607,992
segment_0012_00607992_0000006006400.ts
01/12/2017  01:20 PM           899,768
segment_0013_00899768_0000006006400.ts
01/12/2017  01:20 PM         1,095,100
segment_0014_01095100_0000006006400.ts
01/12/2017  01:20 PM         1,072,164
segment_0015_01072164_0000006006400.ts
01/12/2017  01:20 PM           916,688
segment_0016_00916688_0000006006400.ts
01/12/2017  01:20 PM           827,012
segment_0017_00827012_0000006006400.ts
01/12/2017  01:20 PM         1,098,672
segment_0018_01098672_0000006006400.ts
01/12/2017  01:20 PM           971,772
segment_0019_00971772_0000006006400.ts
01/12/2017  01:20 PM           824,380
segment_0020_00824380_0000006006400.ts
01/12/2017  01:20 PM           710,452
segment_0021_00710452_0000006006400.ts
01/12/2017  01:20 PM           707,068
segment_0022_00707068_0000006006400.ts
01/12/2017  01:20 PM         1,019,712
segment_0023_01019712_0000006006400.ts
01/12/2017  01:20 PM           579,040
segment_0024_00579040_0000006006400.ts
01/12/2017  01:20 PM           572,084
segment_0025_00572084_0000006006400.ts
01/12/2017  01:20 PM           813,288
segment_0026_00813288_0000006006400.ts
01/12/2017  01:20 PM           491,432
segment_0027_00491432_0000006006400.ts
01/12/2017  01:20 PM           573,776
segment_0028_00573776_0000006006400.ts
01/12/2017  01:20 PM           725,492
segment_0029_00725492_0000006006400.ts
01/12/2017  01:20 PM           491,056
segment_0030_00491056_0000006006400.ts
01/12/2017  01:20 PM           544,824
segment_0031_00544824_0000006006400.ts
01/12/2017  01:20 PM           783,208
segment_0032_00783208_0000006006400.ts
01/12/2017  01:20 PM           640,704
segment_0033_00640704_0000006006400.ts
01/12/2017  01:20 PM           601,036
segment_0034_00601036_0000006006400.ts
01/12/2017  01:20 PM           581,860
segment_0035_00581860_0000006006400.ts
01/12/2017  01:20 PM           539,748
segment_0036_00539748_0000006006400.ts
01/12/2017  01:20 PM           478,272
segment_0037_00478272_0000006006400.ts
01/12/2017  01:20 PM           503,464
segment_0038_00503464_0000006006400.ts
01/12/2017  01:20 PM           733,576
segment_0039_00733576_0000006006400.ts
01/12/2017  01:20 PM         1,118,224
segment_0040_01118224_0000006006400.ts
01/12/2017  01:20 PM           710,828
segment_0041_00710828_0000006006400.ts
01/12/2017  01:20 PM         1,170,864
segment_0042_01170864_0000006006400.ts
01/12/2017  01:20 PM         1,243,056
segment_0043_01243056_0000006006400.ts
01/12/2017  01:20 PM         1,215,044
segment_0044_01215044_0000006006400.ts
01/12/2017  01:20 PM         1,675,080
segment_0045_01675080_0000006006400.ts
01/12/2017  01:20 PM         1,583,712
segment_0046_01583712_0000006006400.ts
01/12/2017  01:20 PM         1,718,508
segment_0047_01718508_0000006006400.ts
01/12/2017  01:20 PM         1,672,636
segment_0048_01672636_0000006006400.ts
01/12/2017  01:20 PM         1,656,468
segment_0049_01656468_0000006006400.ts
01/12/2017  01:20 PM         1,673,012
segment_0050_01673012_0000006006400.ts
01/12/2017  01:20 PM         1,655,528
segment_0051_01655528_0000006006400.ts
01/12/2017  01:20 PM         1,571,304
segment_0052_01571304_0000006006400.ts
01/12/2017  01:20 PM         1,697,076
segment_0053_01697076_0000006006400.ts
01/12/2017  01:20 PM         1,672,636
segment_0054_01672636_0000006006400.ts
01/12/2017  01:20 PM         1,678,652
segment_0055_01678652_0000006006400.ts
01/12/2017  01:20 PM         1,702,716
segment_0056_01702716_0000006006400.ts
01/12/2017  01:20 PM         1,603,452
segment_0057_01603452_0000006006400.ts
01/12/2017  01:20 PM         1,697,452
segment_0058_01697452_0000006006400.ts
01/12/2017  01:20 PM         1,492,156
segment_0059_01492156_0000006006400.ts
01/12/2017  01:20 PM         1,864,396
segment_0060_01864396_0000006006400.ts
01/12/2017  01:20 PM         1,561,152
segment_0061_01561152_0000006006400.ts
01/12/2017  01:20 PM         1,669,816
segment_0062_01669816_0000006006400.ts
01/12/2017  01:20 PM         1,669,628
segment_0063_01669628_0000006006400.ts
01/12/2017  01:20 PM         1,659,664
segment_0064_01659664_0000006006400.ts
01/12/2017  01:20 PM         1,727,720
segment_0065_01727720_0000006006400.ts
01/12/2017  01:20 PM         1,608,904
segment_0066_01608904_0000006006400.ts
01/12/2017  01:20 PM         1,637,856
segment_0067_01637856_0000006006400.ts
01/12/2017  01:20 PM         1,724,148
segment_0068_01724148_0000006006400.ts
01/12/2017  01:20 PM         1,561,904
segment_0069_01561904_0000006006400.ts
01/12/2017  01:20 PM         1,704,972
segment_0070_01704972_0000006006400.ts
01/12/2017  01:20 PM         1,640,676
segment_0071_01640676_0000006006400.ts
01/12/2017  01:20 PM         1,666,056
segment_0072_01666056_0000006006400.ts
01/12/2017  01:20 PM         1,651,392
segment_0073_01651392_0000006006400.ts
01/12/2017  01:20 PM         1,674,516
segment_0074_01674516_0000006006400.ts
01/12/2017  01:20 PM         1,695,760
segment_0075_01695760_0000006006400.ts
01/12/2017  01:20 PM         1,572,056
segment_0076_01572056_0000006006400.ts
01/12/2017  01:20 PM         1,747,836
segment_0077_01747836_0000006006400.ts
01/12/2017  01:20 PM         1,553,444
segment_0078_01553444_0000006006400.ts
01/12/2017  01:20 PM         1,696,324
segment_0079_01696324_0000006006400.ts
01/12/2017  01:20 PM         1,613,228
segment_0080_01613228_0000006006400.ts
01/12/2017  01:20 PM         1,736,744
segment_0081_01736744_0000006006400.ts
01/12/2017  01:20 PM         1,574,688
segment_0082_01574688_0000006006400.ts
01/12/2017  01:20 PM         1,617,740
segment_0083_01617740_0000006006400.ts
01/12/2017  01:20 PM         1,717,568
segment_0084_01717568_0000006006400.ts
01/12/2017  01:20 PM         1,696,136
segment_0085_01696136_0000006006400.ts
01/12/2017  01:20 PM         1,628,268
segment_0086_01628268_0000006006400.ts
01/12/2017  01:20 PM         1,599,692
segment_0087_01599692_0000006006400.ts
01/12/2017  01:20 PM         1,695,572
segment_0088_01695572_0000006006400.ts
01/12/2017  01:20 PM         1,843,716
segment_0089_01843716_0000006006400.ts
01/12/2017  01:20 PM           309,072
segment_0090_00309072_0000006006400.ts
01/12/2017  01:20 PM           308,884
segment_0091_00308884_0000006006400.ts
01/12/2017  01:20 PM           308,320
segment_0092_00308320_0000006006400.ts
01/12/2017  01:20 PM           309,260
segment_0093_00309260_0000006006400.ts
01/12/2017  01:20 PM           309,824
segment_0094_00309824_0000006006400.ts
01/12/2017  01:20 PM           308,696
segment_0095_00308696_0000006006400.ts
01/12/2017  01:20 PM           308,884
segment_0096_00308884_0000006006400.ts
01/12/2017  01:20 PM           308,320
segment_0097_00308320_0000006006400.ts
01/12/2017  01:20 PM           309,260
segment_0098_00309260_0000006006400.ts
01/12/2017  01:20 PM           309,824
segment_0099_00309824_0000006006400.ts
01/12/2017  01:20 PM           308,320
segment_0100_00308320_0000006006400.ts
01/12/2017  01:20 PM           309,260
segment_0101_00309260_0000006006400.ts
01/12/2017  01:20 PM           307,944
segment_0102_00307944_0000006006400.ts
01/12/2017  01:20 PM           309,636
segment_0103_00309636_0000006006400.ts
01/12/2017  01:20 PM           309,448
segment_0104_00309448_0000006006400.ts
01/12/2017  01:20 PM           308,696
segment_0105_00308696_0000006006400.ts
01/12/2017  01:20 PM           308,884
segment_0106_00308884_0000006006400.ts
01/12/2017  01:20 PM           308,320
segment_0107_00308320_0000006006400.ts
01/12/2017  01:20 PM           309,260
segment_0108_00309260_0000006006400.ts
01/12/2017  01:20 PM           309,824
segment_0109_00309824_0000006006400.ts
01/12/2017  01:20 PM           308,696
segment_0110_00308696_0000006006400.ts
01/12/2017  01:20 PM           308,884
segment_0111_00308884_0000006006400.ts
01/12/2017  01:20 PM           308,320
segment_0112_00308320_0000006006400.ts
01/12/2017  01:20 PM           309,260
segment_0113_00309260_0000006006400.ts
01/12/2017  01:20 PM           309,824
segment_0114_00309824_0000006006400.ts
01/12/2017  01:20 PM           308,320
segment_0115_00308320_0000006006400.ts
01/12/2017  01:20 PM           309,260
segment_0116_00309260_0000006006400.ts
01/12/2017  01:20 PM           307,944
segment_0117_00307944_0000006006400.ts
01/12/2017  01:20 PM           309,636
segment_0118_00309636_0000006006400.ts
01/12/2017  01:20 PM           302,868
segment_0119_00302868_0000005922978.ts
             121 File(s)    117,359,480 bytes
               2 Dir(s)  98,451,709,952 bytes free


More information about the ffmpeg-user mailing list