[FFmpeg-trac] #6541(avformat:open): HLS fMP4 Bug

FFmpeg trac at avcodec.org
Thu Jul 20 12:56:17 EEST 2017


#6541: HLS fMP4 Bug
------------------------------------+-------------------------------------
             Reporter:  JohnPi      |                    Owner:  stevenliu
                 Type:  defect      |                   Status:  open
             Priority:  normal      |                Component:  avformat
              Version:  git-master  |               Resolution:
             Keywords:  Fmp4 HLS    |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+-------------------------------------

Comment (by stevenliu):

 Replying to [comment:3 JohnPi]:
 > It's now making the ".m4s" segments but the "init.mp4"  initial segment
 is missing.

 I have update the newest version patch at
 ‚Äčhttps://patchwork.ffmpeg.org/patch/4377/


 {{{
 liuqideMBP:hlsfmp4 liuqi$ ./ffmpeg -i ~/Movies/objectC/facebook.mp4 -c
 copy -f hls -hls_segment_type fmp4 -hls_fmp4_init_filename test.mp4 -t 20
 output_test.m3u8
 ffmpeg version N-86820-g3cd616a0c9 Copyright (c) 2000-2017 the FFmpeg
 developers
   built with Apple LLVM version 8.1.0 (clang-802.0.42)
   configuration: --enable-fontconfig --enable-gpl --enable-libass
 --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-
 libspeex --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-
 version3 --cc='ccache gcc' --enable-nonfree --enable-videotoolbox
   libavutil      55. 68.100 / 55. 68.100
   libavcodec     57.102.100 / 57.102.100
   libavformat    57. 76.100 / 57. 76.100
   libavdevice    57.  7.100 / 57.  7.100
   libavfilter     6. 95.100 /  6. 95.100
   libswscale      4.  7.101 /  4.  7.101
   libswresample   2.  8.100 /  2.  8.100
   libpostproc    54.  6.100 / 54.  6.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
 '/Users/liuqi/Movies/objectC/facebook.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 1
     compatible_brands: isomavc1
     creation_time   : 2015-02-02T18:19:19.000000Z
   Duration: 00:45:02.06, start: 0.000000, bitrate: 2708 kb/s
     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
 1280x714 [SAR 1:1 DAR 640:357], 2576 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc
 (default)
     Metadata:
       creation_time   : 2015-02-02T18:19:19.000000Z
       handler_name    : GPAC ISO Video Handler
     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
 stereo, fltp, 127 kb/s (default)
     Metadata:
       creation_time   : 2015-02-02T18:19:23.000000Z
       handler_name    : GPAC ISO Audio Handler
 [hls @ 0x7fbfbc826c00] Opening 'test.mp4' for writing
 Output #0, hls, to 'output_test.m3u8':
   Metadata:
     major_brand     : isom
     minor_version   : 1
     compatible_brands: isomavc1
     encoder         : Lavf57.76.100
     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
 1280x714 [SAR 1:1 DAR 640:357], q=2-31, 2576 kb/s, 25 fps, 25 tbr, 12800
 tbn, 25 tbc (default)
     Metadata:
       creation_time   : 2015-02-02T18:19:19.000000Z
       handler_name    : GPAC ISO Video Handler
     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
 stereo, fltp, 127 kb/s (default)
     Metadata:
       creation_time   : 2015-02-02T18:19:23.000000Z
       handler_name    : GPAC ISO Audio Handler
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (copy)
 Press [q] to stop, [?] for help
 [hls @ 0x7fbfbc826c00] Opening 'output_test0.m4s' for writing
 [hls @ 0x7fbfbc826c00] Opening 'output_test.m3u8.tmp' for writing
 [hls @ 0x7fbfbc826c00] Opening 'output_test1.m4s' for writing
 [hls @ 0x7fbfbc826c00] Opening 'output_test.m3u8.tmp' for writing
 [hls @ 0x7fbfbc826c00] Opening 'output_test2.m4s' for writing
 [hls @ 0x7fbfbc826c00] Opening 'output_test.m3u8.tmp' for writing
 [hls @ 0x7fbfbc826c00] Opening 'output_test3.m4s' for writing
 [hls @ 0x7fbfbc826c00] Opening 'output_test.m3u8.tmp' for writing
 [hls @ 0x7fbfbc826c00] Opening 'output_test4.m4s' for writing
 [hls @ 0x7fbfbc826c00] Opening 'output_test.m3u8.tmp' for writing
 [hls @ 0x7fbfbc826c00] Opening 'output_test5.m4s' for writing
 [hls @ 0x7fbfbc826c00] Opening 'output_test.m3u8.tmp' for writing
 [hls @ 0x7fbfbc826c00] Opening 'output_test6.m4s' for writing
 [hls @ 0x7fbfbc826c00] Opening 'output_test.m3u8.tmp' for writing
 [hls @ 0x7fbfbc826c00] Opening 'output_test7.m4s' for writing
 [hls @ 0x7fbfbc826c00] Opening 'output_test.m3u8.tmp' for writing
 [hls @ 0x7fbfbc826c00] Opening 'output_test8.m4s' for writing
 [hls @ 0x7fbfbc826c00] Opening 'output_test.m3u8.tmp' for writing
 [hls @ 0x7fbfbc826c00] Opening 'output_test.m3u8.tmp' for writing
 frame=  500 fps=0.0 q=-1.0 Lsize=N/A time=00:00:19.98 bitrate=N/A speed=
 203x
 video:6246kB audio:303kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 liuqideMBP:hlsfmp4 liuqi$ cat output_test.m3u8
 #EXTM3U
 #EXT-X-VERSION:7
 #EXT-X-TARGETDURATION:6
 #EXT-X-MEDIA-SEQUENCE:4
 #EXT-X-MAP:URI="test.mp4"
 #EXTINF:1.040000,
 output_test4.m4s
 #EXTINF:2.920000,
 output_test5.m4s
 #EXTINF:1.720000,
 output_test6.m4s
 #EXTINF:0.960000,
 output_test7.m4s
 #EXTINF:5.960000,
 output_test8.m4s
 #EXT-X-ENDLIST
 liuqideMBP:hlsfmp4 liuqi$ ./ffmpeg -i ~/Movies/objectC/facebook.mp4 -c
 copy -f hls -hls_segment_type fmp4  -t 20  output_test.m3u8
 ffmpeg version N-86820-g3cd616a0c9 Copyright (c) 2000-2017 the FFmpeg
 developers
   built with Apple LLVM version 8.1.0 (clang-802.0.42)
   configuration: --enable-fontconfig --enable-gpl --enable-libass
 --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-
 libspeex --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-
 version3 --cc='ccache gcc' --enable-nonfree --enable-videotoolbox
   libavutil      55. 68.100 / 55. 68.100
   libavcodec     57.102.100 / 57.102.100
   libavformat    57. 76.100 / 57. 76.100
   libavdevice    57.  7.100 / 57.  7.100
   libavfilter     6. 95.100 /  6. 95.100
   libswscale      4.  7.101 /  4.  7.101
   libswresample   2.  8.100 /  2.  8.100
   libpostproc    54.  6.100 / 54.  6.100
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
 '/Users/liuqi/Movies/objectC/facebook.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 1
     compatible_brands: isomavc1
     creation_time   : 2015-02-02T18:19:19.000000Z
   Duration: 00:45:02.06, start: 0.000000, bitrate: 2708 kb/s
     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
 1280x714 [SAR 1:1 DAR 640:357], 2576 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc
 (default)
     Metadata:
       creation_time   : 2015-02-02T18:19:19.000000Z
       handler_name    : GPAC ISO Video Handler
     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
 stereo, fltp, 127 kb/s (default)
     Metadata:
       creation_time   : 2015-02-02T18:19:23.000000Z
       handler_name    : GPAC ISO Audio Handler
 [hls @ 0x7f94a2831600] Opening 'init.mp4' for writing
 Output #0, hls, to 'output_test.m3u8':
   Metadata:
     major_brand     : isom
     minor_version   : 1
     compatible_brands: isomavc1
     encoder         : Lavf57.76.100
     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
 1280x714 [SAR 1:1 DAR 640:357], q=2-31, 2576 kb/s, 25 fps, 25 tbr, 12800
 tbn, 25 tbc (default)
     Metadata:
       creation_time   : 2015-02-02T18:19:19.000000Z
       handler_name    : GPAC ISO Video Handler
     Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
 stereo, fltp, 127 kb/s (default)
     Metadata:
       creation_time   : 2015-02-02T18:19:23.000000Z
       handler_name    : GPAC ISO Audio Handler
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (copy)
 Press [q] to stop, [?] for help
 [hls @ 0x7f94a2831600] Opening 'output_test0.m4s' for writing
 [hls @ 0x7f94a2831600] Opening 'output_test.m3u8.tmp' for writing
 [hls @ 0x7f94a2831600] Opening 'output_test1.m4s' for writing
 [hls @ 0x7f94a2831600] Opening 'output_test.m3u8.tmp' for writing
 [hls @ 0x7f94a2831600] Opening 'output_test2.m4s' for writing
 [hls @ 0x7f94a2831600] Opening 'output_test.m3u8.tmp' for writing
 [hls @ 0x7f94a2831600] Opening 'output_test3.m4s' for writing
 [hls @ 0x7f94a2831600] Opening 'output_test.m3u8.tmp' for writing
 [hls @ 0x7f94a2831600] Opening 'output_test4.m4s' for writing
 [hls @ 0x7f94a2831600] Opening 'output_test.m3u8.tmp' for writing
 [hls @ 0x7f94a2831600] Opening 'output_test5.m4s' for writing
 [hls @ 0x7f94a2831600] Opening 'output_test.m3u8.tmp' for writing
 [hls @ 0x7f94a2831600] Opening 'output_test6.m4s' for writing
 [hls @ 0x7f94a2831600] Opening 'output_test.m3u8.tmp' for writing
 [hls @ 0x7f94a2831600] Opening 'output_test7.m4s' for writing
 [hls @ 0x7f94a2831600] Opening 'output_test.m3u8.tmp' for writing
 [hls @ 0x7f94a2831600] Opening 'output_test8.m4s' for writing
 [hls @ 0x7f94a2831600] Opening 'output_test.m3u8.tmp' for writing
 [hls @ 0x7f94a2831600] Opening 'output_test.m3u8.tmp' for writing
 frame=  500 fps=0.0 q=-1.0 Lsize=N/A time=00:00:19.98 bitrate=N/A speed=
 231x
 video:6246kB audio:303kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 liuqideMBP:hlsfmp4 liuqi$ cat output_test.m3u8
 #EXTM3U
 #EXT-X-VERSION:7
 #EXT-X-TARGETDURATION:6
 #EXT-X-MEDIA-SEQUENCE:4
 #EXT-X-MAP:URI="init.mp4"
 #EXTINF:1.040000,
 output_test4.m4s
 #EXTINF:2.920000,
 output_test5.m4s
 #EXTINF:1.720000,
 output_test6.m4s
 #EXTINF:0.960000,
 output_test7.m4s
 #EXTINF:5.960000,
 output_test8.m4s
 #EXT-X-ENDLIST
 liuqideMBP:hlsfmp4 liuqi$
 }}}

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


More information about the FFmpeg-trac mailing list