Skip to content

Is there documentation on when HomeKit will re-encode streams? #6

@Botts85

Description

@Botts85

I am trying to determine what stream parameters cause HomeKit to re-encode video before uploading to iCloud.

A raw stream off my camera is not re-encoded prior to uploading to iCloud. However, if I run it through FFmpeg, it'll record, but it is being compressed prior to upload.

The stream directly off the camera is:
Stream #0:0[0x1e0]: Video: h264 (High), yuvj420p(pc, bt709, progressive), 1280x720, 20 fps, 20 tbr, 90k tbn, 40 tbc

This is what I was using for export settings in FFmpeg:
-c:v libx264 -pix_fmt yuvj420p -bf 0 -vf scale=1280:720,fps=30 -preset ultrafast -b:v 1500k -minrate 1500k -maxrate 1500k -g 120 -r 30 -video_track_timescale 90k -profile:v main -movflags frag_keyframe+empty_moov+default_base_moof

If anyone happens to know where the line is between compatible with HomeKit, and compatible with HomeKit after the AppleTV re-encodes it, that would be awesome.

Perhaps most strangely, is the awful quality that the AppleTV creates on re-encode. Presumably it should have the same H264 encode blocks as an A12 powered iPhone which'll do awesome looking H264 video faster than real time. Attached is two screenshots, one straight from FFMpeg, and one after the AppleTV re-encodes it.

Recorded
Streamed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions