Opened 6 years ago

Closed 6 years ago

#7035 closed defect (duplicate)

HLS does not demux entire clip if start_time > 0

Reported by: ronag Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

The hls demuxer doesn't seem to play the entire file. From what i can see it seems to play "duration - start_time" time of the file. I've reproduced this on multiple different files.

If I simply play the .ts file everything works fine. However, if I play the m3u8 file I seem to be missing "start_time" time in the end, i.e. the file is ~5.4s but it stops at ~4s.

It seems to me that the demuxer seems to do "frame->pts += start_time" and then stop outputting packets once "frame->ts + start_time >= duration". However, "frame->pts" already includes start_time so somehow start_time gets added into "frame->pts" twice.

How to reproduce:

cd ffmpeg
npm i -g http-server
http-server .
ffplay -i http://localhost:8080/file/M6nmzk2FDeesWy.m3u8
C:\Users\Boffins\Desktop\CasparCG 2.2.0>ffplay.exe -i http://localhost:8080/file/M6nmzk2FDeesWy.m3u8
ffplay version N-90061-gfb580731c1 Copyright (c) 2003-2018 the FFmpeg developers
  built with gcc 7.2.0 (GCC)
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libmfx --enable-amf --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth
  libavutil      56.  7.101 / 56.  7.101
  libavcodec     58. 11.101 / 58. 11.101
  libavformat    58.  9.100 / 58.  9.100
  libavdevice    58.  1.100 / 58.  1.100
  libavfilter     7. 12.100 /  7. 12.100
  libswscale      5.  0.101 /  5.  0.101
  libswresample   3.  0.101 /  3.  0.101
  libpostproc    55.  0.100 / 55.  0.100
[hls,applehttp @ 000002343b33dd80] Opening 'http://localhost:8080/file/M6nmzk2FDeesWy.ts' for reading
[hls,applehttp @ 000002343b33dd80] Opening 'http://localhost:8080/file/M6nmzk2FDeesWy.ts' for reading
Input #0, hls,applehttp, from 'http://localhost:8080/file/M6nmzk2FDeesWy.m3u8':
  Duration: 00:00:05.40, start: 1.458667, bitrate: 0 kb/s
  Program 0
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 0
    Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 0
   5.39 A-V: -5.723 fd=   0 aq=    0KB vq=    0KB sq=    0B f=0/0

Attachments (1)

ffmpeg.zip (658.1 KB ) - added by ronag 6 years ago.
contains .ts and .mu38 sample

Download all attachments as: .zip

Change History (2)

by ronag, 6 years ago

Attachment: ffmpeg.zip added

contains .ts and .mu38 sample

comment:1 by Carl Eugen Hoyos, 6 years ago

Component: avformatundetermined
Keywords: hls http removed
Priority: importantnormal
Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.