2

I have a site that plays video to subscribers. I use the native browser html5 <video> tag to accomplish this and it works fine in all major browsers.

For Safari, I provide an h.264 mp4 file from a protected url on Cloudfront, and it streams just fine to the browser window.

The Airplay button shows up in the player controls and you can click on it to select an AirPlay device. When this happens, I get a generic playback error and nothing plays on the device.

I've checked my video settings and they appear to match the recommendations from Apple.

Here are the settings of the mp4 variant:

General
Complete name                            : /Users/ben/Desktop/movie.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom
File size                                : 120 MiB
Duration                                 : 18mn 11s
Overall bit rate                         : 918 Kbps
Encoded date                             : UTC 1904-01-01 00:00:00
Tagged date                              : UTC 1904-01-01 00:00:00
Writing application                      : Lavf56.40.101

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.1
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 18mn 11s
Bit rate                                 : 854 Kbps
Nominal bit rate                         : 800 Kbps
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 30.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.031
Stream size                              : 111 MiB (93%)
Writing library                          : x264 core 146 r2555 0c21480
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=12 / 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=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=abr / mbtree=1 / bitrate=800 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Encoded date                             : UTC 1904-01-01 00:00:00
Tagged date                              : UTC 1904-01-01 00:00:00

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 18mn 11s
Duration_LastFrame                       : -10ms
Bit rate mode                            : Constant
Bit rate                                 : 56.0 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy
Stream size                              : 7.29 MiB (6%)
Encoded date                             : UTC 1904-01-01 00:00:00
Tagged date                              : UTC 1904-01-01 00:00:00

What am I missing?

UPDATE

I built a test page to try out some different video formats and turns out this works fine if I direct link to a video, but doesn't work if the browser redirects (which is how my production server behaves). Any ideas on how to get AirPlay to handle redirects would be greatly appreciated.

Ben Scheirman
  • 40,531
  • 21
  • 102
  • 137

0 Answers0