I‘m trying to make a Mac broadcast client to encode into H264 using FFmpeg but not x264 library. So basically, I am able to get raw frames out from AVFoundation in either CMSampleBufferRef
or AVPicture
. So is there a way to encode a series of those pictures into H264 frames using Apple framework, like AVVideoCodecH264
. I know the way to encode it use AVAssetWriter, but that only saves the video into file, but I don‘t want the file, instead, I‘d want to have AVPacket so I can send out using FFmpeg. Does anyone have any idea? Thank you.