#5858: HLS single file playback broken when encryption enabled
-------------------------------------+-------------------------------------
             Reporter:  bmurphy1976  |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  ffmpeg       |                  Version:  git-
             Keywords:               |  master
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------
 HLS files generated with encryption enabled and the single segment (byte
 range) option result in videos that are unplayable in QuickTime and Safari
 on OSX.  The same videos play without issue when encryption is not
 utilized.

 The specific behavior is that video playback starts, but there are periods
 where video playback gets stuck and then resumes, get stuck, and then
 resumes.  It seems to be related to the different segment offsets where
 some segments play without issue while other segments get frozen on a
 single frame.

 I can reproduce this with origin/master checked out on 9/22/16.

 Using the following as input:

 https://s3.amazonaws.com/1d4326f61a9a4ed596de9e1a41d48413/input.ts

 I created a "good" version here which does not utilize encryption and
 plays back without issue:

 
https://s3.amazonaws.com/1d4326f61a9a4ed596de9e1a41d48413/encryption/good/good.m3u8

 I also created a "bad" version here which utilizes encryption and exhibits
 the undesired behavior:

 
https://s3.amazonaws.com/1d4326f61a9a4ed596de9e1a41d48413/encryption/bad/bad.m3u8

 Here is the console log for generating the "bad" version:

 {{{
 bash-4.3# openssl rand 16 > output/bad/bad.key
 bash-4.3# cat <<EOF > input.conf
 > bad.key
 > output/bad/bad.key
 > EOF
 bash-4.3# ffmpeg -y -i input.ts -c copy -map 0 -hls_flags single_file
 -hls_list_size 0 -hls_playlist_type vod -hls_key_info_file input.conf
 output/bad/bad.m3u8
 ffmpeg version N-81723-g6d9a46e Copyright (c) 2000-2016 the FFmpeg
 developers
   built with gcc 5.3.0 (Alpine 5.3.0)
   configuration: --prefix=/usr --enable-avresample --enable-avfilter
 --enable-gnutls --enable-gpl --enable-libmp3lame --enable-librtmp
 --enable-libvorbis --enable-libvpx --enable-libxvid --enable-libx264
 --enable-libx265 --enable-libtheora --enable-libv4l2 --enable-postproc
 --enable-pic --enable-pthreads --enable-shared --enable-x11grab --disable-
 stripping --disable-static --enable-vaapi --enable-libopus --enable-
 nonfree --enable-libfdk-aac
   libavutil      55. 30.100 / 55. 30.100
   libavcodec     57. 57.101 / 57. 57.101
   libavformat    57. 50.100 / 57. 50.100
   libavdevice    57.  0.102 / 57.  0.102
   libavfilter     6. 62.100 /  6. 62.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
 [h264 @ 0x7fb1ee66fae0] non-existing SPS 0 referenced in buffering period
 [h264 @ 0x7fb1ee66fae0] SPS unavailable in decode_picture_timing
 [h264 @ 0x7fb1ee66fae0] non-existing SPS 0 referenced in buffering period
 [h264 @ 0x7fb1ee66fae0] SPS unavailable in decode_picture_timing
 Input #0, mpegts, from 'input.ts':
   Duration: 00:00:30.06, start: 1.415333, bitrate: 3982 kb/s
   Program 1
     Metadata:
       service_name    : Service01
       service_provider: FFmpeg
     Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B),
 yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95
 tbc
     Stream #0:1[0x101](und): Audio: aac (LC) ([15][0][0][0] / 0x000F),
 48000 Hz, stereo, fltp, 120 kb/s
 Output #0, hls, to 'output/bad/bad.m3u8':
   Metadata:
     encoder         : Lavf57.50.100
     Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p,
 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 23.98 tbr, 90k tbn, 23.98
 tbc
     Stream #0:1(und): Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz,
 stereo, 120 kb/s
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (copy)
 Press [q] to stop, [?] for help
 frame=  720 fps=0.0 q=-1.0 Lsize=N/A time=00:00:29.99 bitrate=N/A
 speed=49.3x
 video:13001kB audio:471kB subtitle:0kB other streams:0kB global
 headers:0kB muxing overhead: unknown
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5858>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-trac

Reply via email to