简体   繁体   中英

Is there iOS browser support for mp4 with h264 video and 4 (or more) AAC audio channels?

I added 4 channels (two stereo) of AAC audio to an mp4 with an h264 video using ffmpeg. I am using the Web Audio Api to split the channels and merge them back together for independent control in sync with the video. This is working successfully on Windows and macOs browsers (Chrome, Firefox, Safari, Opera, Edge), but the file is not playable on iOS (Safari and Chrome). I am waiting for an android device to test on that platform, but from what I've gathered this would work. Does anyone have any insight into this issue? Thank you in advance!

I have added the log of a mediainfo query below:

Complete name                            : multi_channel.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 25.7 MiB
Duration                                 : 4 min 33 s
Overall bit rate                         : 787 kb/s
Writing application                      : Lavf58.76.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.1
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 4 min 33 s
Bit rate                                 : 525 kb/s
Width                                    : 1 280 pixels
Height                                   : 536 pixels
Display aspect ratio                     : 2.40:1
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.032
Stream size                              : 17.1 MiB (67%)
Title                                    : ISO Media file produced by Google Inc. Created on: 09/03/2019.
Writing library                          : x264 core 163 r3060 5db6aa6
Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=17 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Menus                                    : 3
Codec configuration box                  : avcC

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 4 min 33 s
Source duration                          : 4 min 33 s
Source_Duration_LastFrame                : -22 ms
Bit rate mode                            : Constant
Bit rate                                 : 257 kb/s
Channel(s)                               : 4 channels
Channel layout                           : L R Ls Rs
Sampling rate                            : 44.1 kHz
Frame rate                               : 43.066 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 8.37 MiB (33%)
Source stream size                       : 8.37 MiB (33%)
Default                                  : Yes
Alternate group                          : 1
Menus                                    : 3
mdhd_Duration                            : 273764

Menu #1
ID                                       : 3
Codec ID                                 : text
Duration                                 : 4 min 33 s
Language                                 : English
Menu For                                 : 1,2
00:00:00.000                             : Tempo: 120.0

Menu #2
00:00:00.000                             : Tempo: 120.0

Can you add some code - like the video attribute - iOS requires the "playsinline" attribute - which would be the first thing to check.

If that is present - what does the console log tell you?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM