[FFmpeg-trac] #1572(undetermined:new): HLS input destroys DTS/PTS information

FFmpeg trac at avcodec.org
Tue Jul 24 16:15:08 CEST 2012


#1572: HLS input destroys DTS/PTS information
-------------------------------------+-------------------------------------
             Reporter:  crtmpserver  |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:               |                  Version:
  undetermined                       |  unspecified
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 When using an HLS as input, ffmpeg does not preserve the DTS timestamps
 which are usually present whenever B-frames are present. For simplicity, I
 chosen fly output because is very easy to eye-ball the resulted file in a
 hex editor and determine if a file has or has not dts timestamps.

 How to reproduce:

 method 1 (DTS timestamps are destroyed/absent)
 {{{
 % ffmpeg -i http://rtmpd.com/assets/11/test.m3u8 -an -vcodec copy
 /tmp/a.flv
 }}}

 method 2 (DTS timestamps are preserved/present)
 {{{
 % ffmpeg -i http://rtmpd.com/assets/11/all.ts -an -vcodec copy /tmp/a.flv
 }}}

 Observations:
 1. all.ts input file is nothing more nothing less than all the chunks
 concatenated from test.m3u8. Basically, '''identical''' content. Logically
 speaking, both methods should generate proper DTS timestamps (I don't
 expect them to be identical, but at least present). Why? because both
 methods are in the end falling back on mpegts demuxer. I think the problem
 is somewhere in libavformat/hls.c
 1. I removed the audio track for simplicity
 1. ffplay will playback just fine both resulted files (fly files).
 However, flash player - the primary consumer of those files - will choke
 on the one with bogus DTS. And it makes sense, because the file is not
 adhering to the FLV specs.

 My ffmpeg version is:
 {{{
 ffmpeg version 0.11.1.git
 built on Jul 24 2012 04:23:34 with llvm-gcc 4.2.1 (LLVM build 2336.9.00)
 configuration: --enable-libx264 --enable-libfaac --enable-gpl --enable-
 nonfree --enable-libmp3lame --enable-shared --disable-filter=mp
 --prefix=/Users/shiretu/work/ffmpeg_bin
 libavutil      51. 65.100 / 51. 65.100
 libavcodec     54. 44.100 / 54. 44.100
 libavformat    54. 20.100 / 54. 20.100
 libavdevice    54.  2.100 / 54.  2.100
 libavfilter     3.  3.100 /  3.  3.100
 libswscale      2.  1.100 /  2.  1.100
 libswresample   0. 15.100 /  0. 15.100
 libpostproc    52.  0.100 / 52.  0.100
 }}}

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1572>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list