[FFmpeg-trac] #2828(avformat:new): HLS segment MPEGTS continuity counter is being incorrectly set to 0 on each segment

FFmpeg trac at avcodec.org
Mon Jul 28 18:08:44 CEST 2014


#2828: HLS segment MPEGTS continuity counter is being incorrectly set to 0 on each
segment
-------------------------------------+------------------------------------
             Reporter:  dlevinson5   |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  avformat
              Version:  unspecified  |               Resolution:
             Keywords:  hls mpegts   |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+------------------------------------

Comment (by trnsz):

 I am having the same problem.  I am also not using the ffmpeg tool, but
 the libraries directly, but the problem can easily be made to show itself
 using the tool as well:

 Here are unredacted commands and outputs.

 (Output too big to post here when trying to submit, so here is pastebin):
 $ ffmpeg -i http://download.wavetlan.com/SVV/Media/HTTP/MP4/ConvertedFiles
 /Media-Convert/Media-
 Convert_test1_36s_AVC_VBR_521kbps_320x240_25fps_AACLCv4_VBR_96kbps_Stereo_44100Hz.mp4
 -c copy -map 0:v -map 0:a -bsf h264_mp4toannexb -flags -global_header
 -segment_list_flags +live-cache -segment_time 2 -segment_list_size 30
 -segment_wrap 60 -segment_time_delta 0.08 -segment_list ./test.m3u8 -f
 ssegment "./test%05d.ts" -report

 http://pastebin.com/aScZgCnN

 Now let's read it back:

 (Output too big to post here when trying to submit, so here is pastebin,
 again):

 $ ffmpeg -debug 1 -i test.m3u8 -f null /dev/null -report

 http://pastebin.com/kyd6k6rt

 As you can see, at the start of each segment, there are failed continuity
 checks as the timestamp is incorrectly reset at the start of each new
 segment:

 (Excerpt from above)

 [hls,applehttp @ 0x1b54a20] HLS request for url 'test00003.ts', offset 0,
 playlist 0
  [mpegts @ 0x1b573e0] Continuity check failed for pid 17 expected 5 got 0
  [mpegts @ 0x1b573e0] Continuity check failed for pid 0 expected 8 got 0
  [mpegts @ 0x1b573e0] Continuity check failed for pid 4096 expected 8 got
 0
  [mpegts @ 0x1b573e0] Continuity check failed for pid 256 expected 7 got 0

 This will cause the output to fail Apple validation and is breaking
 specification, so technically the output is corrupted.  While the output
 does play in ffmpeg, VLC, ffplay, etc, but gives warnings similar to above
 in all cases.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/2828#comment:16>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list