[FFmpeg-user] For HLS, playlist.m3u8 file skips last segment entry

ajay parashar ajay_382000 at yahoo.co.in
Tue Sep 30 07:14:58 CEST 2014


Hi,

I am creating HLS segments and playlist file by using below command.
it creates total 6 segment files (out000.ts to out005.ts) but playlist contain entry only for first 4 , it always skips out0005.ts
I do not know why it does not deal with last segment file ? 

here is my playlist.m3u8 file contents

==============================================================================
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:17
#EXTINF:15.015000,
out000.ts
#EXTINF:8.341667,
out001.ts
#EXTINF:8.341667,
out002.ts
#EXTINF:8.341667,
out003.ts
#EXTINF:16.683333,
out004.ts


==============================================================================

ffmpeg -i 'udp://226.0.0.1:1234?fifo_size=50000&overrun_nonfatal=1' -map 0:v:1 -map 0:a:0 -vcodec libx264 -acodec copy -f ssegment -hls_list_size 10 -segment_list playlist.m3u8 -segment_list_flags +live -segment_time 10 out%03d.ts
ffmpeg version 2.4.1 Copyright (c) 2000-2014 the FFmpeg developers
  built on Sep 29 2014 13:53:35 with gcc 4.8.3 (GCC) 20140624 (Red Hat 4.8.3-1)
  configuration: --enable-gpl --enable-libx264 --enable-shared --disable-static --disable-stripping
  libavutil      54.  7.100 / 54.  7.100
  libavcodec     56.  1.100 / 56.  1.100
  libavformat    56.  4.101 / 56.  4.101
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  1.100 /  5.  1.100
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
[mpegts @ 0x1d65e40] PES packet size mismatch
Input #0, mpegts, from 'udp://226.0.0.1:1234?fifo_size=50000&overrun_nonfatal=1':
  Duration: N/A, start: 80713.733156, bitrate: 192 kb/s
  Program 1 
    Stream #0:0[0x5f](???): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:1[0x60]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
    Stream #0:2[0x61]: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p(tv, smpte170m), 704x480 [SAR 10:11 DAR 4:3], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
[libx264 @ 0x1e863e0] using SAR=10/11
[libx264 @ 0x1e863e0] using cpu capabilities: MMX2 SSE2 SSE3 Cache64
[libx264 @ 0x1e863e0] profile High, level 3.0
[mpegts @ 0x1e35740] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
    Last message repeated 1 times
Output #0, stream_segment,ssegment, to 'out%03d.ts':
  Metadata:
    encoder         : Lavf56.4.101
    Stream #0:0: Video: h264 (libx264), yuv420p, 704x480 [SAR 10:11 DAR 4:3], q=-1--1, 29.97 fps, 29.97 tbn, 29.97 tbc
    Metadata:
      encoder         : Lavc56.1.100 libx264
    Stream #0:1(???): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, 192 kb/s
Stream mapping:
  Stream #0:2 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
[stream_segment,ssegment @ 0x1e85dc0] Non-monotonous DTS in output stream 0:1; previous: 74880, current: 73459; changing to 74881. This may result in incorrect timestamps in the output file.
[mpegts @ 0x1d65e40] DTS 7264406208 < 7264407506 out of orderN/A dup=38 drop=0    
[mpegts @ 0x20dba60] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
    Last message repeated 1 times
[mpegts @ 0x21507a0] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
    Last message repeated 1 times
[mpegts @ 0x21507a0] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
    Last message repeated 1 times
[mpegts @ 0x21507a0] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
    Last message repeated 1 times
[mpegts @ 0x21507a0] Using AVStream.codec.time_base as a timebase hint to the muxer is deprecated. Set AVStream.time_base instead.
    Last message repeated 1 times
frame= 1879 fps= 26 q=29.0 size=N/A time=00:01:02.76 bitrate=N/A dup=38 drop=0    



Regards 
Ajay


More information about the ffmpeg-user mailing list