[FFmpeg-trac] #5839(avformat:open): [feature request] [hls] hls_flags to limit single_file size

FFmpeg trac at avcodec.org
Fri Sep 16 19:06:57 EEST 2016


#5839: [feature request] [hls] hls_flags to limit single_file size
-------------------------------------+-------------------------------------
             Reporter:  ARQfBfnD     |                    Owner:  stevenliu
                 Type:  enhancement  |                   Status:  open
             Priority:  wish         |                Component:  avformat
              Version:  git-master   |               Resolution:
             Keywords:  hls          |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by ARQfBfnD):

 I tried your latest patch from the mailing list - it appears to do
 something, but the output files sizes (5MB+) are all over the place,
 nowhere near the number I specified (2.5MB)


 {{{
 root at 28340ba48105:~# ./bin/ffmpeg  -i bus486.mov -c copy -hls_list_size 0
 -hls_segment_size 2500000 -t 60 -f hls -hls_time 10 -hls_segment_filename
 'file%03d.ts' output-test.m3u8
 ffmpeg version N-81669-gb82c1a3 Copyright (c) 2000-2016 the FFmpeg
 developers
   built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.2) 20160609
   configuration: --prefix=/root/ffmpeg_build --pkg-config-flags=--static
 --extra-cflags=-I/root/ffmpeg_build/include --extra-
 ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --enable-gpl --enable-
 libass --enable-libx264 --enable-nonfree
   libavutil      55. 29.100 / 55. 29.100
   libavcodec     57. 55.101 / 57. 55.101
   libavformat    57. 49.100 / 57. 49.100
   libavdevice    57.  0.102 / 57.  0.102
   libavfilter     6. 62.100 /  6. 62.100
   libswscale      4.  1.100 /  4.  1.100
   libswresample   2.  1.100 /  2.  1.100
   libpostproc    54.  0.100 / 54.  0.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bus486.mov':
   Metadata:
     major_brand     : qt
     minor_version   : 0
     compatible_brands: qt
     creation_time   : 2016-09-09T00:47:25.000000Z
   Duration: 03:29:46.96, start: 0.000000, bitrate: 5906 kb/s
     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
 bt709), 1280x720 [SAR 1:1 DAR 16:9], 5760 kb/s, 25 fps, 25 tbr, 2500 tbn,
 50 tbc (default)
     Metadata:
       creation_time   : 2016-09-09T00:47:25.000000Z
       handler_name    : Core Media Data Handler
       encoder         : H.264
       timecode        : 00:00:00:00
     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
 stereo, fltp, 108 kb/s (default)
     Metadata:
       creation_time   : 2016-09-09T00:47:25.000000Z
       handler_name    : Core Media Data Handler
     Stream #0:2(und): Data: none (tmcd / 0x64636D74) (default)
     Metadata:
       creation_time   : 2016-09-09T00:47:25.000000Z
       handler_name    : Core Media Data Handler
       timecode        : 00:00:00:00
 [hls @ 0x3741ac0] Using AVStream.codec to pass codec parameters to muxers
 is deprecated, use AVStream.codecpar instead.
     Last message repeated 1 times
 Output #0, hls, to 'output-test.m3u8':
   Metadata:
     major_brand     : qt
     minor_version   : 0
     compatible_brands: qt
     encoder         : Lavf57.49.100
     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv,
 bt709), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 5760 kb/s, 25 fps, 25 tbr,
 90k tbn, 25 tbc (default)
     Metadata:
       creation_time   : 2016-09-09T00:47:25.000000Z
       handler_name    : Core Media Data Handler
       encoder         : H.264
       timecode        : 00:00:00:00
     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
 stereo, 108 kb/s (default)
     Metadata:
       creation_time   : 2016-09-09T00:47:25.000000Z
       handler_name    : Core Media Data Handler
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (copy)
 Press [q] to stop, [?] for help
 frame= 1501 fps=0.0 q=-1.0 Lsize=N/A time=00:01:00.01 bitrate=N/A speed=
 544x
 video:43785kB audio:846kB subtitle:0kB other streams:0kB global
 headers:0kB muxing overhead: unknown
 root at 28340ba48105:~# ls -lh
 -rw-r--r-- 1 root root 5.7M Sep 16 16:01 file000.ts
 -rw-r--r-- 1 root root 5.7M Sep 16 16:01 file001.ts
 -rw-r--r-- 1 root root 5.8M Sep 16 16:01 file002.ts
 -rw-r--r-- 1 root root 5.8M Sep 16 16:01 file003.ts
 -rw-r--r-- 1 root root  16M Sep 16 16:01 file004.ts
 -rw-r--r-- 1 root root 7.0M Sep 16 16:01 file005.ts
 -rw-r--r-- 1 root root  431 Sep 16 16:01 output-test.m3u8
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5839#comment:16>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list