Opened 8 years ago

Closed 7 years ago

#5705 closed defect (needs_more_info)

m3u8 incorrect duration

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

Description

When transcoding a file using ffmpeg to a http stream all the involved duration are different and in the case of 2.m3u8 and 3.m3u8 they are totally wrong

As reported by ffprobe the "source.mxf", "dest.m3u8" and "dest.ts" all have different durations.

I have uploaded all files here together with console output and parsed durations:

https://www.dropbox.com/sh/y7ektsjrg8jw6kj/AADAEMuPnyJJDYcV2XR_lK7ca?dl=0

Change History (4)

comment:1 by Carl Eugen Hoyos, 8 years ago

Please post both the command line that you tested and the complete, uncut console output here on the bug tracker, only use external resources for input files.

comment:2 by ronag, 8 years ago

@cehoyos: It is available under the link I posted.

1-ffmpeg.txt
2-ffmpeg.txt
3-ffmpeg.txt

comment:3 by ronag, 8 years ago

Here is e.g. 1-ffmpeg.txt

cd rh59ec2765:~ ronagy$ cd Projects/hlsjstest/hlsjs/
h59ec2765:hlsjs ronagy$ ffmpeg -i 1.mxf -pix_fmt yuv420p -g 50 -hls_flags single_file -hls_list_size 0 1.m3u8
ffmpeg version 3.1.1 Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 7.3.0 (clang-703.0.31)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.1.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libtheora --enable-libvorbis --enable-libvpx --enable-librtmp --enable-libass --enable-ffplay --enable-openssl --enable-libwebp --disable-lzma --enable-nonfree --enable-vda
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 47.100 /  6. 47.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Guessed Channel Layout for Input Stream #0.1 : mono
Guessed Channel Layout for Input Stream #0.2 : mono
Input #0, mxf, from '1.mxf':
  Metadata:
    uid             : 261afb25-a0ea-c141-92b2-388d535b19fd
    generation_uid  : 14d6a7eb-9c84-da46-bb16-15f9cd8ea0fd
    company_name    : AVID
    product_name    : TRMG
    product_version : 3.01
    product_uid     : 00000000-0000-0000-0000-000000000000
    modification_date: 2016-05-11 15:00:37
    material_package_umid: 0x060A2B340101010501010D131300000083AA585995F522419025249154405B46
    timecode        : 00:00:00:00
  Duration: 00:00:20.08, start: 0.000000, bitrate: 52795 kb/s
    Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 50000 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
    Metadata:
      file_package_umid: 0x060A2B340101010501010D131300000038D499646FCBA9408D71B7E7591B92E7
    Stream #0:1: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D131300000038D499646FCBA9408D71B7E7591B92E7
    Stream #0:2: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D131300000038D499646FCBA9408D71B7E7591B92E7
[libx264 @ 0x7fbe6d804600] using SAR=1/1
[libx264 @ 0x7fbe6d804600] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 0x7fbe6d804600] profile High, level 4.0
[hls @ 0x7fbe6d842e00] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
    Last message repeated 1 times
Output #0, hls, to '1.m3u8':
  Metadata:
    uid             : 261afb25-a0ea-c141-92b2-388d535b19fd
    generation_uid  : 14d6a7eb-9c84-da46-bb16-15f9cd8ea0fd
    company_name    : AVID
    product_name    : TRMG
    product_version : 3.01
    product_uid     : 00000000-0000-0000-0000-000000000000
    modification_date: 2016-05-11 15:00:37
    material_package_umid: 0x060A2B340101010501010D131300000083AA585995F522419025249154405B46
    timecode        : 00:00:00:00
    encoder         : Lavf57.41.100
    Stream #0:0: Video: h264 (libx264), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 25 fps, 90k tbn, 25 tbc
    Metadata:
      file_package_umid: 0x060A2B340101010501010D131300000038D499646FCBA9408D71B7E7591B92E7
      encoder         : Lavc57.48.101 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1: Audio: aac (LC), 48000 Hz, mono, fltp (24 bit), 69 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D131300000038D499646FCBA9408D71B7E7591B92E7
      encoder         : Lavc57.48.101 aac
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg2video (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (pcm_s24le (native) -> aac (native))
Press [q] to stop, [?] for help
frame=  502 fps= 24 q=-1.0 Lsize=N/A time=00:00:20.09 bitrate=N/A speed=0.947x
video:6017kB audio:128kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[libx264 @ 0x7fbe6d804600] frame I:11    Avg QP:19.08  size:108450
[libx264 @ 0x7fbe6d804600] frame P:131   Avg QP:21.56  size: 21453
[libx264 @ 0x7fbe6d804600] frame B:360   Avg QP:24.02  size:  5995
[libx264 @ 0x7fbe6d804600] consecutive B-frames:  4.2%  0.0%  1.8% 94.0%
[libx264 @ 0x7fbe6d804600] mb I  I16..4: 11.0% 80.0%  9.0%
[libx264 @ 0x7fbe6d804600] mb P  I16..4:  1.1%  2.2%  0.1%  P16..4: 48.0%  9.4%  6.5%  0.0%  0.0%    skip:32.7%
[libx264 @ 0x7fbe6d804600] mb B  I16..4:  0.1%  0.1%  0.0%  B16..8: 41.6%  0.9%  0.1%  direct: 0.4%  skip:56.8%  L0:45.7% L1:53.3% BI: 1.0%
[libx264 @ 0x7fbe6d804600] 8x8 transform intra:75.2% inter:92.4%
[libx264 @ 0x7fbe6d804600] coded y,uvDC,uvAC intra: 62.6% 72.0% 35.8% inter: 7.4% 14.8% 0.3%
[libx264 @ 0x7fbe6d804600] i16 v,h,dc,p: 17% 34%  9% 40%
[libx264 @ 0x7fbe6d804600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 24% 21%  3%  6%  7%  7%  5%  6%
[libx264 @ 0x7fbe6d804600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 23%  8%  4%  9% 11%  9%  5%  4%
[libx264 @ 0x7fbe6d804600] i8c dc,h,v,p: 50% 26% 20%  5%
[libx264 @ 0x7fbe6d804600] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7fbe6d804600] ref P L0: 61.7%  9.9% 19.8%  8.6%
[libx264 @ 0x7fbe6d804600] ref B L0: 92.1%  6.2%  1.6%
[libx264 @ 0x7fbe6d804600] ref B L1: 96.3%  3.7%
[libx264 @ 0x7fbe6d804600] kb/s:2454.85
[aac @ 0x7fbe6d843400] Qavg: 17730.281
h59ec2765:hlsjs ronagy$ ffprobe -i 1.m3u8 -show_format | grep duration
ffprobe version 3.1.1 Copyright (c) 2007-2016 the FFmpeg developers
  built with Apple LLVM version 7.3.0 (clang-703.0.31)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.1.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libtheora --enable-libvorbis --enable-libvpx --enable-librtmp --enable-libass --enable-ffplay --enable-openssl --enable-libwebp --disable-lzma --enable-nonfree --enable-vda
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 47.100 /  6. 47.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, hls,applehttp, from '1.m3u8':
  Duration: 00:00:20.04, 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, 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, mono, fltp, 72 kb/s
duration=20.040000
h59ec2765:hlsjs ronagy$ ffprobe -i 1.ts -show_format | grep duration
ffprobe version 3.1.1 Copyright (c) 2007-2016 the FFmpeg developers
  built with Apple LLVM version 7.3.0 (clang-703.0.31)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.1.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libtheora --enable-libvorbis --enable-libvpx --enable-librtmp --enable-libass --enable-ffplay --enable-openssl --enable-libwebp --disable-lzma --enable-nonfree --enable-vda
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 47.100 /  6. 47.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mpegts, from '1.ts':
  Duration: 00:00:20.10, start: 1.458667, bitrate: 2590 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, mono, fltp, 72 kb/s
duration=20.101333
h59ec2765:hlsjs ronagy$ ffprobe -i 1.mxf -show_format | grep duration
ffprobe version 3.1.1 Copyright (c) 2007-2016 the FFmpeg developers
  built with Apple LLVM version 7.3.0 (clang-703.0.31)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.1.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libxvid --enable-libtheora --enable-libvorbis --enable-libvpx --enable-librtmp --enable-libass --enable-ffplay --enable-openssl --enable-libwebp --disable-lzma --enable-nonfree --enable-vda
  libavutil      55. 28.100 / 55. 28.100
  libavcodec     57. 48.101 / 57. 48.101
  libavformat    57. 41.100 / 57. 41.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 47.100 /  6. 47.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  1.100 /  2.  1.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mxf, from '1.mxf':
  Metadata:
    uid             : 261afb25-a0ea-c141-92b2-388d535b19fd
    generation_uid  : 14d6a7eb-9c84-da46-bb16-15f9cd8ea0fd
    company_name    : AVID
    product_name    : TRMG
    product_version : 3.01
    product_uid     : 00000000-0000-0000-0000-000000000000
    modification_date: 2016-05-11 15:00:37
    material_package_umid: 0x060A2B340101010501010D131300000083AA585995F522419025249154405B46
    timecode        : 00:00:00:00
  Duration: 00:00:20.08, start: 0.000000, bitrate: 52795 kb/s
    Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 50000 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
    Metadata:
      file_package_umid: 0x060A2B340101010501010D131300000038D499646FCBA9408D71B7E7591B92E7
    Stream #0:1: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D131300000038D499646FCBA9408D71B7E7591B92E7
    Stream #0:2: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D131300000038D499646FCBA9408D71B7E7591B92E7
duration=20.080000
h59ec2765:hlsjs ronagy$

comment:4 by Carl Eugen Hoyos, 7 years ago

Resolution: needs_more_info
Status: newclosed
Note: See TracTickets for help on using tickets.