[FFmpeg-trac] #9101(ffmpeg:new): Issue with creating hls m3u8 playlist with .m4s

FFmpeg trac at avcodec.org
Thu Feb 11 23:52:55 EET 2021


#9101: Issue with creating hls m3u8 playlist with .m4s
-------------------------------------+-------------------------------------
             Reporter:  dkirilenko   |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  ffmpeg       |                  Version:
                                     |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 I’m trying to create hls m3u8 playlist with `.m4s` files instead of `.ts`.
 It needs for streaming h265 video from live RTSP camera. I’m trying to add
 `hls_flags delete_segments+append_list` to remove the end of file + add
 segments to the m3u8 file but look like ffmpeg skips this option. Also
 `m3u8` creates only after stopping ffmpeg command, but should during the
 process.
 How to reproduce:
 {{{
 ffmpeg -use_wallclock_as_timestamps 1 \
       -loglevel warning \
       -fflags nobuffer \
       -rtsp_transport tcp  \
       -i rtsp://username:password@192.168.2.252:554/Streaming/Channels/101
 \
       -c:v libx264 -b:v 1500k \
       -c:a aac \
       -b:a 64k \
       -ar 44100 \
       -af aresample=async=1000 \
       -g 48 \
       -keyint_min 48 \
       -sc_threshold 0 \
       -use_localtime 1 \
       -hls_time 2 \
       -hls_list_size 2 \
       -hls_flags delete_segments+append_list \
       -c:v libx264 -b:v 1500k \
       -hls_playlist_type vod \
       -hls_segment_type fmp4 \
       -hls_base_url
 ‘/api/v3/cameras/5d4442faa34dbe188129ccbe/live?token=[TOKEN]&file=’ \
       -hls_segment_filename 5d4442faa34dbe188129ccbe-%s.ts \
       5d4442faa34dbe188129ccbe.m3u8
 }}}
 Expected behaviour:
 1. It creates `5d4442faa34dbe188129ccbe.m3u8` when starting process
 2. Creates `5d4442faa34dbe188129ccbe.m3u8` without `#EXT-X-ENDLIST`
 3. Should have only 2 segments filenames
 What I have in result:
 1. It creates `5d4442faa34dbe188129ccbe.m3u8` only after force stop
 process (control + C)
 2. Creates `5d4442faa34dbe188129ccbe.m3u8` with `#EXT-X-ENDLIST` in the
 end of file
 3. The file has all m4s segments filenames
 Here is content of 5d4442faa34dbe188129ccbe.m3u8:
 {{{
 #EXTM3U
 #EXT-X-VERSION:7
 #EXT-X-TARGETDURATION:4
 #EXT-X-MEDIA-SEQUENCE:0
 #EXT-X-PLAYLIST-TYPE:VOD
 #EXT-X-MAP:URI=“init.mp4”
 #EXT-X-DISCONTINUITY
 #EXTINF:3.840000,
 5d4442faa34dbe188129ccbe-1613079721.m4s
 #EXTINF:1.920000,
 5d4442faa34dbe188129ccbe-1613079728.m4s
 #EXTINF:1.920000,
 5d4442faa34dbe188129ccbe-1613079729.m4s
 #EXTINF:1.920000,
 5d4442faa34dbe188129ccbe-1613079731.m4s
 #EXTINF:1.920000,
 5d4442faa34dbe188129ccbe-1613079733.m4s
 #EXTINF:1.920000,
 5d4442faa34dbe188129ccbe-1613079735.m4s
 #EXTINF:0.880000,
 5d4442faa34dbe188129ccbe-1613079737.m4s
 #EXT-X-ENDLIST
 }}}
 ffmpeg version:
 {{{
 ffmpeg -version
 ffmpeg version N-97685-gde7b690300 Copyright (c) 2000-2020 the FFmpeg
 developers
 built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
 configuration: --enable-libx264 --enable-libfdk-aac --enable-gpl --enable-
 nonfree --enable-shared --enable-pic --enable-openssl
 libavutil      56. 43.100 / 56. 43.100
 libavcodec     58. 83.100 / 58. 83.100
 libavformat    58. 43.100 / 58. 43.100
 libavdevice    58.  9.103 / 58.  9.103
 libavfilter     7. 80.100 /  7. 80.100
 libswscale      5.  6.101 /  5.  6.101
 libswresample   3.  6.100 /  3.  6.100
 libpostproc    55.  6.100 / 55.  6.100
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/9101>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list