Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#9101 closed defect (invalid)

Issue with creating hls m3u8 playlist with .m4s

Reported by: Den Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

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

Attachments (3)

m4s-issue.gif (504.5 KB ) - added by Den 4 years ago.
How is hls m4s works with rtsp stream
ts-works.gif (161.2 KB ) - added by Den 4 years ago.
How is hls ts works with rtsp stream
cat-m3u8-result.gif (147.1 KB ) - added by Den 4 years ago.
ts m3u8 file result

Download all attachments as: .zip

Change History (7)

comment:1 by Carl Eugen Hoyos, 4 years ago

Component: ffmpegundetermined

Are you reporting an issue with rtsp input or with hls output?

Please test current FFmpeg git head and post a simplified command line you tested together with the complete, uncut console output to make this a valid ticket.

comment:2 by Steven Liu, 4 years ago

Resolution: wontfix
Status: newclosed

Yes, because you are using hls_playlist_type argument and "EVENT or VOD playlists imply sliding window (hls_list_size) cannot be used"

Version 0, edited 4 years ago by Steven Liu (next)

by Den, 4 years ago

Attachment: m4s-issue.gif added

How is hls m4s works with rtsp stream

by Den, 4 years ago

Attachment: ts-works.gif added

How is hls ts works with rtsp stream

by Den, 4 years ago

Attachment: cat-m3u8-result.gif added

ts m3u8 file result

comment:3 by Den, 4 years ago

Resolution: wontfixcompleted (art)

stevenliu, You are totally right, removed this option and all works as expected. You saved my time, thank you!

comment:4 by Carl Eugen Hoyos, 4 years ago

Resolution: completed (art)invalid
Note: See TracTickets for help on using tickets.