[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:02:29 EET 2017


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

 {{{
 $ curl -o sample.mpg tmm1.s3.amazonaws.com/h264.ts
 $ ffprobe sample.mpg
 ffprobe version 3.4 Copyright (c) 2007-2017 the FFmpeg developers
 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
 }}}

 Using the hls muxer to create a fmp4 HLS stream appears to work:

 {{{
 $ ffmpeg -i sample.mpg -c copy -hls_segment_type fmp4 stream.m3u8
 Output #0, hls, to 'stream.m3u8':
   Metadata:
     encoder         : Lavf57.83.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)
 }}}

 However, the generated init.mp4 is marked as having only two channels,
 which causes the stream.m3u8 to be unplayable in Safari.

 {{{
 $ ffmpeg -i init.mp4
 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'init.mp4':
   Metadata:
     major_brand     : iso5
     minor_version   : 512
     compatible_brands: iso6mp41
     encoder         : Lavf57.83.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)
     Stream #0:1(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, stereo,
 fltp (default)
 }}}

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


More information about the FFmpeg-trac mailing list