[FFmpeg-trac] #6915(avformat:open): DASH audio segments duration doesn't match exactly with video segments duration.

FFmpeg trac at avcodec.org
Fri Dec 22 02:32:17 EET 2017


#6915: DASH audio segments duration doesn't match exactly with video segments
duration.
------------------------------------+-------------------------------------
             Reporter:  beloko      |                    Owner:  stevenliu
                 Type:  defect      |                   Status:  open
             Priority:  normal      |                Component:  avformat
              Version:  git-master  |               Resolution:
             Keywords:              |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+-------------------------------------

Comment (by beloko):

 I was checking the real segments duration of the Apple's HLS sample stream
 with FFPROBE.

 Video segments are really cut at 6 seconds exactly.

 C:\Users\Beloko\Desktop\FFMPEG>ffprobe https://devstreaming-
 cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/v5/fileSequence2.ts

 {{{
 ffprobe version N-89544-gcfd5209-Reino Copyright (c) 2007-2017 the FFmpeg
 developers
   built with gcc 7.1.0 (GCC)
   configuration: --arch=x86 --target-os=mingw32 --cross-
 prefix=/home/beloko/FFMpeg_Builder/sandbox/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32-
 --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=Reino
 --enable-gray --enable-version3 --disable-debug --disable-doc --disable-
 htmlpages --disable-manpages --disable-podpages --disable-txtpages
 --disable-w32threads --enable-fontconfig --enable-gmp --enable-gnutls
 --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
 --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme
 --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
 --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb
 --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-
 libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-
 libtwolame --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
 --enable-libwebp --enable-libzimg --enable-libzvbi --extra-
 cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-
 cflags=-DCACA_STATIC --enable-gpl --enable-avisynth --enable-frei0r
 --enable-filter=frei0r --enable-librubberband --enable-libvidstab
 --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid
 --enable-avresample --extra-cflags='-mtune=generic' --extra-cflags=-O3
 --enable-static --disable-shared
 --prefix=/home/beloko/FFMpeg_Builder/sandbox/cross_compilers/mingw-w64-i686/i686-w64-mingw32
 --enable-nonfree --enable-decklink --enable-libfdk-aac
   libavutil      56.  6.100 / 56.  6.100
   libavcodec     58.  8.100 / 58.  8.100
   libavformat    58.  3.100 / 58.  3.100
   libavdevice    58.  0.100 / 58.  0.100
   libavfilter     7.  7.100 /  7.  7.100
   libavresample   4.  0.  0 /  4.  0.  0
   libswscale      5.  0.101 /  5.  0.101
   libswresample   3.  0.101 /  3.  0.101
   libpostproc    55.  0.100 / 55.  0.100
 Input #0, mpegts, from 'https://devstreaming-
 cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/v5/fileSequence2.ts':
   Duration: 00:00:06.00, start: 22.016667, bitrate: 2055 kb/s
   Program 1
     Stream #0:0[0x101]: Video: h264 (High) ([27][0][0][0] / 0x001B),
 yuv420p(progressive), 960x540 [SAR 1:1 DAR 16:9], Closed Captions, 60 fps,
 60 tbr, 90k tbn, 120 tbc
 }}}

 But audio segments are roughly cut around 6 seconds.

 Sometime at 5.33 before 6 seconds long.

 {{{

 C:\Users\Beloko\Desktop\FFMPEG>ffprobe https://devstreaming-
 cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/a1/fileSequence4.aac
 ffprobe version N-89544-gcfd5209-Reino Copyright (c) 2007-2017 the FFmpeg
 developers
   built with gcc 7.1.0 (GCC)
   configuration: --arch=x86 --target-os=mingw32 --cross-
 prefix=/home/beloko/FFMpeg_Builder/sandbox/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32-
 --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=Reino
 --enable-gray --enable-version3 --disable-debug --disable-doc --disable-
 htmlpages --disable-manpages --disable-podpages --disable-txtpages
 --disable-w32threads --enable-fontconfig --enable-gmp --enable-gnutls
 --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
 --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme
 --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
 --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb
 --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-
 libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-
 libtwolame --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
 --enable-libwebp --enable-libzimg --enable-libzvbi --extra-
 cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-
 cflags=-DCACA_STATIC --enable-gpl --enable-avisynth --enable-frei0r
 --enable-filter=frei0r --enable-librubberband --enable-libvidstab
 --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid
 --enable-avresample --extra-cflags='-mtune=generic' --extra-cflags=-O3
 --enable-static --disable-shared
 --prefix=/home/beloko/FFMpeg_Builder/sandbox/cross_compilers/mingw-w64-i686/i686-w64-mingw32
 --enable-nonfree --enable-decklink --enable-libfdk-aac
   libavutil      56.  6.100 / 56.  6.100
   libavcodec     58.  8.100 / 58.  8.100
   libavformat    58.  3.100 / 58.  3.100
   libavdevice    58.  0.100 / 58.  0.100
   libavfilter     7.  7.100 /  7.  7.100
   libavresample   4.  0.  0 /  4.  0.  0
   libswscale      5.  0.101 /  5.  0.101
   libswresample   3.  0.101 /  3.  0.101
   libpostproc    55.  0.100 / 55.  0.100
 Input #0, aac, from 'https://devstreaming-
 cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/a1/fileSequence4.aac':
   Duration: 00:00:05.33, bitrate: 183 kb/s
     Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 183 kb/s
 }}}

 Or sometime at 6.22 after 6 seconds long.

 {{{
 C:\Users\Beloko\Desktop\FFMPEG>ffprobe https://devstreaming-
 cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/a1/fileSequence1.aac
 ffprobe version N-89544-gcfd5209-Reino Copyright (c) 2007-2017 the FFmpeg
 developers
   built with gcc 7.1.0 (GCC)
   configuration: --arch=x86 --target-os=mingw32 --cross-
 prefix=/home/beloko/FFMpeg_Builder/sandbox/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32-
 --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=Reino
 --enable-gray --enable-version3 --disable-debug --disable-doc --disable-
 htmlpages --disable-manpages --disable-podpages --disable-txtpages
 --disable-w32threads --enable-fontconfig --enable-gmp --enable-gnutls
 --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
 --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme
 --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
 --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb
 --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-
 libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-
 libtwolame --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx
 --enable-libwebp --enable-libzimg --enable-libzvbi --extra-
 cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-
 cflags=-DCACA_STATIC --enable-gpl --enable-avisynth --enable-frei0r
 --enable-filter=frei0r --enable-librubberband --enable-libvidstab
 --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid
 --enable-avresample --extra-cflags='-mtune=generic' --extra-cflags=-O3
 --enable-static --disable-shared
 --prefix=/home/beloko/FFMpeg_Builder/sandbox/cross_compilers/mingw-w64-i686/i686-w64-mingw32
 --enable-nonfree --enable-decklink --enable-libfdk-aac
   libavutil      56.  6.100 / 56.  6.100
   libavcodec     58.  8.100 / 58.  8.100
   libavformat    58.  3.100 / 58.  3.100
   libavdevice    58.  0.100 / 58.  0.100
   libavfilter     7.  7.100 /  7.  7.100
   libavresample   4.  0.  0 /  4.  0.  0
   libswscale      5.  0.101 /  5.  0.101
   libswresample   3.  0.101 /  3.  0.101
   libpostproc    55.  0.100 / 55.  0.100
 Input #0, aac, from 'https://devstreaming-
 cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/a1/fileSequence1.aac':
   Duration: 00:00:06.22, bitrate: 156 kb/s
     Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 156 kb/s
 }}}

 That's really strange results ?!

 If Apple provide HLS streams with approximative audio segment duration.
 Why FFMPEG segmenters couldn't simulate the same. Like rounding the
 #EXTINF value to the nearest integer that should be the expected segment
 duration in the FFMPEG command line.

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


More information about the FFmpeg-trac mailing list