2

I'm facing a strange WARNING message in the logs of FFMPEG when trying to capture an HLS stream.

This is the log with some information changed to avoid problems with my boss:

[info] Input #0, hls, from 'https://cdn.youtube.com/w/application/stream_key/playlist.m3u8':
[info]   Duration: N/A, start: 421.372522, bitrate: N/A
[info]   Program 0
[info]     Metadata:
[info]       variant_bitrate : 3534714
[info]     Stream #0:0, 0, 1/90000: Data: timed_id3 (ID3  / 0x20334449), 0/1
[info]     Metadata:
[info]       variant_bitrate : 3534714

[info]     Stream #0:1, 21, 1/90000: Video: h264 (High), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p, 1280x720, 0/1, 60 tbr, 90k tbn, 180k tbc
[info]     Metadata:
[info]       variant_bitrate : 3534714
[info]     Stream #0:2, 33, 1/90000: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, mono, fltp
[info]     Metadata:
[info]       variant_bitrate : 3534714
[debug] Successfully opened the file.
[debug] Parsing a group of options: output url application/stream_key/playlist.m3u8.
[debug] Applying option c (codec name) with argument copy.
[debug] Applying option f (force format) with argument hls.
[debug] Successfully parsed a group of options.
[debug] Opening an output file: application/stream_key/playlist.m3u8.

[debug] Successfully opened the file.

[mpegts @ 0x400b000] [verbose] service 1 using PCR in pid=256, pcr_period=0ms
[mpegts @ 0x400b000] [verbose] muxrate VBR, sdt every 1073741822000 ms, pat/pmt every 1073741822000 ms
[file @ 0x3fc0040] [debug] Setting default whitelist 'file,crypto,data'
[hls muxer @ 0x4049e40] [debug] Found playlist sequence number: 0
[AVIOContext @ 0x4107900] [verbose] Statistics: 132 bytes read, 0 seeks
[info] Output #0, hls, to 'application/stream_key/playlist.m3u8':
[info]   Metadata:
[info]     encoder         : Lavf58.65.100

[info]     Stream #0:0, 0, 1/90000: Video: h264 (High), 1 reference frame ([27][0][0][0] / 0x001B), yuv420p, 1280x720 (0x0), 0/1, q=2-31, 60 tbr, 90k tbn, 90k tbc
[info]     Metadata:
[info]       variant_bitrate : 3534714
[info]     Stream #0:1, 0, 1/90000: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, mono, fltp
[info]     Metadata:
[info]       variant_bitrate : 3534714
[info] Stream mapping:
[info]   Stream #0:1 -> #0:0 (copy)
[info]   Stream #0:2 -> #0:1 (copy)
[info] Press [q] to stop, [?] for help
[debug] cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[debug] cur_dts is invalid st:1 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[debug] cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[debug] cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[debug] cur_dts is invalid st:0 (0) [init:1 i_done:0 finish:0] (this is harmless if it occurs once at the start per stream)
[hls @ 0x4076e00]
[warning] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x4076e00] [warning] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x4076e00] [warning] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x4076e00] [warning] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x4076e00] [warning] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x4076e00] [warning] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x4076e00] [warning] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x4076e00] [warning] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x4076e00] [warning] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x4076e00] [warning] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x4076e00] [warning] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x4076e00] [warning] pkt->duration = 0, maybe the hls segment duration will not precise

[hls @ 0x4076e00] [warning] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x4076e00] [warning] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x4076e00] [warning] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x4076e00] [warning] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x4076e00] [warning] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x4076e00] [warning] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x4076e00] [warning] pkt->duration = 0, maybe the hls segment duration will not precise
[hls @ 0x4076e00] [warning] pkt->duration = 0, maybe the hls segment duration will not precise

FFMPEG command used:

ffmpeg -hide_banner -loglevel repeat+level+debug -y \
-xerror -i cdn.youtube.com/w/application/stream_key/playlist.m3u8 \
-c copy -f hls -hls_list_size 0 -hls_segment_filename \
application/stream_key/chunck_list_JMV%d.ts -hls_flags \
append_list application/stream_key/playlist.m3u8

FFMPEG version

ffmpeg -version 
ffmpeg version 4.2.4-1ubuntu0.1 
Copyright (c) 2000-2020 the FFmpeg developers built with gcc 9 (Ubuntu 9.3.0-10ubuntu2) 
libavformat 58. 29.100 / 58. 29.100 libavdevice 58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc 55. 5.100 / 55. 5.100

I want to know what this pkt->duration = 0 means. Is it a problem in the output or the input?

Since now, thanks.

  • If you need more info please write it down and I'll try to provide it.
9
  • Does the output look OK? Unable to provide any suggestions without your command and the complete log (you may omit stream key).
    – llogan
    May 5, 2021 at 17:28
  • I don't really know if the output is ok because the program manager kills the FFMPEG process when a warning or error is detected. I want to know what that warning means. May 5, 2021 at 19:01
  • The command used was ffmpeg -hide_banner -loglevel repeat+level+debug -y -xerror -i cdn.youtube.com/w/application/stream_key/playlist.m3u8 -c copy -f hls -hls_list_size 0 -hls_segment_filename application/stream_key/chunck_list_JMV%d.ts -hls_flags append_list application/stream_key/playlist.m3u8 May 5, 2021 at 19:04
  • ffmpeg -version ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 9 (Ubuntu 9.3.0-10ubuntu2) libavformat 58. 29.100 / 58. 29.100 libavdevice 58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc 55. 5.100 / 55. 5.100 May 5, 2021 at 19:05
  • Sorry, I'm trying to send the comment configured to enhance the readability May 5, 2021 at 19:33

0

You must log in to answer this question.

Browse other questions tagged .