[FFmpeg-trac] #6238(avformat:new): Wrong first TS segment length in HLS output
FFmpeg
trac at avcodec.org
Tue Mar 14 15:55:26 EET 2017
#6238: Wrong first TS segment length in HLS output
----------------------------------+--------------------------------------
Reporter: pero | Type: defect
Status: new | Priority: normal
Component: avformat | Version: git-master
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
----------------------------------+--------------------------------------
Hi All!
My original ffmpeg command is very complicated, so I reproduce this bug
with a much simplier command, here it is:
{{{
ffmpeg -i 720.mp4 -c:a aac -ab 64k -c:v mpeg4 -b:v 1800k -r 25 -g 100 -f
hls -hls_time 4 -hls_list_size 5400 -hls_flags
+delete_segments+append_list+omit_endlist playlist.m3u8
}}}
output:
{{{
ffmpeg version N-83894-g4e3cc4b Copyright (c) 2000-2017 the FFmpeg
developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --enable-filter=drawtext --enable-nonfree --enable-
libfreetype
libavutil 55. 48.100 / 55. 48.100
libavcodec 57. 83.100 / 57. 83.100
libavformat 57. 66.104 / 57. 66.104
libavdevice 57. 3.100 / 57. 3.100
libavfilter 6. 76.100 / 6. 76.100
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '720.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.66.101
Duration: 00:44:51.20, start: 0.000000, bitrate: 1858 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], 1802 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
(default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 16000 Hz, mono,
fltp, 51 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, hls, to '2/playlist.m3u8':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.66.104
Stream #0:0(und): Video: mpeg4, yuv420p, 1280x720 [SAR 1:1 DAR 16:9],
q=2-31, 1800 kb/s, 25 fps, 90k tbn, 25 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc57.83.100 mpeg4
Side data:
cpb: bitrate max/min/avg: 0/0/1800000 buffer size: 0 vbv_delay: -1
Stream #0:1(und): Audio: aac (LC), 16000 Hz, mono, fltp, 64 kb/s
(default)
Metadata:
handler_name : SoundHandler
encoder : Lavc57.83.100 aac
}}}
the created m3u8:
{{{
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:5
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-DISCONTINUITY
#EXTINF:4.064000,
playlist0.ts
#EXTINF:4.000000,
playlist1.ts
#EXTINF:4.000000,
playlist2.ts
#EXTINF:4.000000,
playlist3.ts
#EXTINF:4.000000,
playlist4.ts
#EXTINF:4.000000,
playlist5.ts
#EXTINF:4.000000,
playlist6.ts
#EXTINF:4.000000,
playlist7.ts
#EXTINF:4.000000,
}}}
As you can see the first segment is 4.064 sec long, which is wrong.
Thank you!
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6238>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list