[FFmpeg-trac] #6825(avformat:new): hlsenc muxer in fmp4 mode creates broken init.mp4 with ac3 surround sound input

FFmpeg trac at avcodec.org
Thu Nov 9 22:46:50 EET 2017


#6825: hlsenc muxer in fmp4 mode creates broken init.mp4 with ac3 surround sound
input
------------------------------------+------------------------------------
             Reporter:  tmm1        |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  normal      |                Component:  avformat
              Version:  git-master  |               Resolution:
             Keywords:              |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+------------------------------------

Comment (by tmm1):

 Yes, it works fine when remuxing into mp4 directly:

 {{{
 $ ffmpeg -i sample.mpg -c copy -y test.mp4
 $ ffmpeg -i test.mp4
 ...
     Stream #0:1(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side),
 fltp, 384 kb/s (default)
 ..
 }}}

 Reproduced on git-master:

 {{{
 $ /tmp/ffmpeg-master/bin/ffmpeg -i sample.mpg -c copy -hls_segment_type
 fmp4 stream.m3u8
 ffmpeg version N-88676-g51090133b3 Copyright (c) 2000-2017 the FFmpeg
 developers
   built with Apple LLVM version 9.0.0 (clang-900.0.38)
   configuration: --prefix=/tmp/ffmpeg-master --enable-shared --disable-
 static
   libavutil      56.  0.100 / 56.  0.100
   libavcodec     58.  1.100 / 58.  1.100
   libavformat    58.  2.100 / 58.  2.100
   libavdevice    58.  0.100 / 58.  0.100
   libavfilter     7.  0.101 /  7.  0.101
   libswscale      5.  0.101 /  5.  0.101
   libswresample   3.  0.101 /  3.  0.101
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] decode_slice_header error
 [h264 @ 0x7f8c74826200] no frame!
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] decode_slice_header error
 [h264 @ 0x7f8c74826200] no frame!
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] decode_slice_header error
 [h264 @ 0x7f8c74826200] no frame!
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] decode_slice_header error
 [h264 @ 0x7f8c74826200] no frame!
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] decode_slice_header error
 [h264 @ 0x7f8c74826200] no frame!
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] decode_slice_header error
 [h264 @ 0x7f8c74826200] no frame!
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] decode_slice_header error
 [h264 @ 0x7f8c74826200] no frame!
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] decode_slice_header error
 [h264 @ 0x7f8c74826200] no frame!
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] decode_slice_header error
 [h264 @ 0x7f8c74826200] no frame!
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] decode_slice_header error
 [h264 @ 0x7f8c74826200] no frame!
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] decode_slice_header error
 [h264 @ 0x7f8c74826200] no frame!
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] decode_slice_header error
 [h264 @ 0x7f8c74826200] no frame!
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] decode_slice_header error
 [h264 @ 0x7f8c74826200] no frame!
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] decode_slice_header error
 [h264 @ 0x7f8c74826200] no frame!
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] decode_slice_header error
 [h264 @ 0x7f8c74826200] no frame!
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] SPS unavailable in decode_picture_timing
 [h264 @ 0x7f8c74826200] non-existing PPS 1 referenced
 [h264 @ 0x7f8c74826200] decode_slice_header error
 [h264 @ 0x7f8c74826200] no frame!
 [mpegts @ 0x7f8c74800000] PES packet size mismatch
     Last message repeated 1 times
 Input #0, mpegts, from 'sample.mpg':
   Duration: 00:00:21.54, start: 86589.358267, bitrate: 4956 kb/s
   Program 1256
     Stream #0:0[0xa01]: Video: h264 (High) ([27][0][0][0] / 0x001B),
 yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], Closed
 Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
     Stream #0:1[0xa02]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz,
 5.1(side), fltp, 384 kb/s
     Stream #0:2[0xa03]: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz,
 mono, fltp, 64 kb/s
     Stream #0:3[0xa04]: Data: scte_35
 [hls @ 0x7f8c74801e00] Opening 'init.mp4' for writing
 [mp4 @ 0x7f8c76012a00] track 1: codec frame size is not set
 Output #0, hls, to 'stream.m3u8':
   Metadata:
     encoder         : Lavf58.2.100
     Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv,
 bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 29.97 fps, 29.97
 tbr, 30k tbn, 29.97 tbc
     Stream #0:1: Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz,
 5.1(side), fltp, 384 kb/s
 Stream mapping:
   Stream #0:0 -> #0:0 (copy)
   Stream #0:1 -> #0:1 (copy)
 Press [q] to stop, [?] for help
 [NULL @ 0x7f8c74826200] non-existing PPS 1 referenced
     Last message repeated 15 times
 [hls @ 0x7f8c74801e00] Opening 'stream0.m4s' for writing
 [hls @ 0x7f8c74801e00] Opening 'stream.m3u8.tmp' for writing
 [hls @ 0x7f8c74801e00] Opening 'stream1.m4s' for writing
 [hls @ 0x7f8c74801e00] Opening 'stream.m3u8.tmp' for writing
 [mp4 @ 0x7f8c76012a00] Track 0 starts with a nonzero dts 35715, while the
 moov already has been written. Set the delay_moov flag to handle this
 case.
 [hls @ 0x7f8c74801e00] Opening 'stream2.m4s' for writing
 [hls @ 0x7f8c74801e00] Opening 'stream.m3u8.tmp' for writing
 [hls @ 0x7f8c74801e00] Opening 'stream3.m4s' for writing
 [hls @ 0x7f8c74801e00] Opening 'stream.m3u8.tmp' for writing
 [hls @ 0x7f8c74801e00] Opening 'stream4.m4s' for writing
 [hls @ 0x7f8c74801e00] Opening 'stream.m3u8.tmp' for writing
 [hls @ 0x7f8c74801e00] Opening 'stream5.m4s' for writing
 [hls @ 0x7f8c74801e00] Opening 'stream.m3u8.tmp' for writing
 [hls @ 0x7f8c74801e00] Opening 'stream6.m4s' for writing
 [hls @ 0x7f8c74801e00] Opening 'stream.m3u8.tmp' for writing
 [hls @ 0x7f8c74801e00] Opening 'stream7.m4s' for writing
 [hls @ 0x7f8c74801e00] Opening 'stream.m3u8.tmp' for writing
 [hls @ 0x7f8c74801e00] Opening 'stream8.m4s' for writing
 [hls @ 0x7f8c74801e00] Opening 'stream.m3u8.tmp' for writing
 [hls @ 0x7f8c74801e00] Opening 'stream9.m4s' for writing
 [hls @ 0x7f8c74801e00] Opening 'stream.m3u8.tmp' for writing
 [hls @ 0x7f8c74801e00] Opening 'stream10.m4s' for writing
 [hls @ 0x7f8c74801e00] Opening 'stream.m3u8.tmp' for writing
 [hls @ 0x7f8c74801e00] Opening 'stream11.m4s' for writing
 [hls @ 0x7f8c74801e00] Opening 'stream.m3u8.tmp' for writing
 [mpegts @ 0x7f8c74800000] PES packet size mismatch
 [hls @ 0x7f8c74801e00] Opening 'stream.m3u8.tmp' for writing
 frame=  606 fps=0.0 q=-1.0 Lsize=N/A time=00:00:21.37 bitrate=N/A speed=
 514x
 video:11291kB audio:974kB subtitle:0kB other streams:0kB global
 headers:0kB muxing overhead: unknown
 }}}

 {{{
 $ /tmp/ffmpeg-master/bin/ffmpeg -hide_banner -nostats -i init.mp4
 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fa237002600] Could not find codec parameters
 for stream 0 (Video: h264 (avc1 / 0x31637661), none, 1920x1080):
 unspecified pixel format
 Consider increasing the value for the 'analyzeduration' and 'probesize'
 options
 Guessed Channel Layout for Input Stream #0.1 : stereo
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'init.mp4':
   Metadata:
     major_brand     : iso5
     minor_version   : 512
     compatible_brands: iso6mp41
     encoder         : Lavf58.2.100
   Duration: N/A, bitrate: N/A
     Stream #0:0(und): Video: h264 (avc1 / 0x31637661), none, 1920x1080,
 SAR 1:1 DAR 16:9, 30k tbr, 30k tbn, 60k tbc (default)
     Metadata:
       handler_name    : VideoHandler
     Stream #0:1(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, stereo,
 fltp (default)
     Metadata:
       handler_name    : SoundHandler
 }}}

 Note that the pixel format for the video track is also missing in init.mp4

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


More information about the FFmpeg-trac mailing list