Streaming

RSS for tag

Deep dive into the technical specifications that influence seamless playback for streaming services, including bitrates, codecs, and caching mechanisms.

Streaming Documentation

Post

Replies

Boosts

Views

Activity

Receiving eventMetadata from AVPlayerItemMetadataOutput stops responding on iOS18 only
Case-ID: 9391388 Our application uses timed Metadata as part of a rating control system. We noticed a problem in production and diagnosis shows that we stop receiving timed Metadata on iOS18 only Our live streams are primed with metadata at least once per second but we are seeing extended gaps in receiving this content, in excess of 10 minutes. We have also observed that this happens more as the player climbs the bitrate ladder, and doesn't happen if we cap to a low resolution i.e. a preferredMaximumResolution of 768x432. Furthermore, if we throttle network conditions after we stop receiving metadata the we start receiving them again. Following is a simple example that demonstrates the above behaviour, unfortunately I cannot share the live stream endpoint which is primed with metadata publicly, but can provide privately to Apple to reproduce the problem. import UIKit import AVKit class ViewController: UIViewController, AVPlayerItemMetadataOutputPushDelegate { var player: AVPlayer? var itemMetadataOutput: AVPlayerItemMetadataOutput? override func viewDidAppear(_ animated: Bool) { guard let url = URL(string: "endpoint redacted") else { return } let player = AVPlayer(url: url) let controller = AVPlayerViewController() controller.player = player self.player = player present(controller, animated: true) { player.play() let currentItem = player.currentItem let itemMetadataOutput = AVPlayerItemMetadataOutput(identifiers: nil) self.itemMetadataOutput = itemMetadataOutput self.itemMetadataOutput?.setDelegate(self, queue: .main) currentItem?.add(itemMetadataOutput) } } public func metadataOutput(_ output: AVPlayerItemMetadataOutput, didOutputTimedMetadataGroups groups: [AVTimedMetadataGroup], from track: AVPlayerItemTrack?) { print("received metadata \(Date())") } }
0
0
104
12h
macOS Sonoma 'Cannot Decode' HLS Video
I use AVPlayer to play HLS video successfully on macOS Sonoma, but I encountered this error on macOS Sequoia. Please help me: Error Domain=AVFoundationErrorDomain Code=-11833 ‘Cannot Decode’ UserInfo={NSUnderlyingError=0x600001e57330 {Error Domain=CoreMediaErrorDomain Code=-12906 ‘(null)’}, NSLocalizedFailureReason=The decoder required for this media cannot be found., AVErrorMediaTypeKey=vide, NSLocalizedDescription=Cannot Decode} Thanks!
1
0
94
3d
iOS 18: ApplicationMusicPlayer.Queue breaks if one more songs in Library
Hi there, After upgrading to iOS 18, I noticed that ApplicationMusicPlayer.Queue behavior has broken if at least one song that is added to the queue is also in to the Apple Music Library on the device. The resulting behavior is that the queue does not accept all the items, and only items that are in the Library are playable in the queue. The expected behavior and the previous behavior on iOS 17 was that all the items would be added to the queue successfully. I confirmed this behavior on a separate test device running iOS 17.7. The items added are all being fetched via MusicCatalogResourceRequest<Song> so I would expect that a requested song being present in the library would have no effect.
2
0
159
1w
From apple account, received an error "Your account can’t access this page." while trying to access the FPS deployment package to check the fairplay encrypted playback.
When we tried to play the encrypted playback for the Verimatrix DRM provider on their player, it did not play on iOS devices. Upon further communication with them, we learned that we need an FPS deployment package from Apple to set up our organization's lab account in the DRM environment. I first tried using my personal Apple account, and then I created a new Apple account with my organization's email address. Both accounts are showing the same error, 'Your account can’t access this page,' when clicking on the FPS deployment package from this link: https://developer.apple.com/streaming/fps/. The error likely arises from insufficient permissions or account roles required to access Apple’s DRM resources. Could you please support to resolve this permission issue or how should we proceed to obtain the FPS deployment package to make the successful fairplay encrypted playback? Awaiting for your response. Thanks, Ramajayadevi.
0
0
124
1w
Issue with Low-Latency HLS Playback Using AVAssetResourceLoaderDelegate
Hi, I am writing to seek any help or workaround regarding an issue I have encountered while implementing Low-Latency HLS playback using the AVAssetResourceLoaderDelegate. I have been successfully loading playlists during HLS live playback using the AVAssetResourceLoaderDelegate. However, after introducing Low-Latency HLS, I have run into a problem. When the AVPlayer loads low-latency content playback natively, everything works fine. But when I use the delegate for loading, I encounter the following error from AVPlayer's status observer: CoreMediaErrorDomain -15410 Low Latency: Server must support http2 ECN and SACK It seems there is no problem since playback does not stop, but there is a very critical part missing. The playback does not achieve the expected low latency and behaves similarly to standard HLS. Additionally, this behavior only occurs on iOS 16 devices and simulators. On iOS 17 simulators and devices, the error message does not appear, and the latency remains low as expected. Therefore, I suspect that there might be some misjudgment in the verification process within the internal implementation of AVPlayer. Since our app needs to support iOS 16, I would appreciate any solutions, methods to try, or workarounds that you could share regarding this issue. Thank you.
0
0
112
1w
HLS streaming from a Uniview IP camera
Hi I'm trying to stream a H264 video feed that is coming from a uniview IP camera in a browser however the stream is just not displaying. Either I get a single frame or just a black screen. I get the same issues on safari on the mac or any browser on an iphone. However the video stream works just fine using hls.js in Windows or on Android. We are grabbing the the RTSP stream from the camera and using ngix to serve the .m3u8 url. However even if we save the stream to a file and try an play it on the iphone it has the same issue (unless we use a separate media player like VLC). I know if we use ffmpeg to reencode as H264 rather than copy it the it will play. My guess there is an incompatibility between how uniview encode the video and what apple can accept. I've asked uniview and they are not sure what the problem is either. Is there a way to get more debug information on why a particular HLS stream is failing in safari on mac or iPhone.
1
0
162
1w
Fairplay Streaming certificate - expiry date and renewal
The list of certificates on the Apple Developer web console shows the expiry of my Fairplay Streaming certificate as 'Never'. However, if I download the same certificate and import it into my KeyChain, the certificate details show the listed expiry as 11 OCT 2023. Which of these is correct? If the expiry in the certificate is correct, how do I renew it safely. With my App the below lines fails at the process of -streamingContentKeyRequestData- CODE guard let contentIdData = (loadingRequest.request.url?.host ?? "").data(using: .utf8), let spcData = try? loadingRequest.streamingContentKeyRequestData( forApp: certificate!, // This certificate is expired contentIdentifier: contentIdData, options: nil ) else { print("Error: Failed to generate SPC data due to expired certificate.") loadingRequest.finishLoading(with: NSError(domain: "com.example.error", code: -3, userInfo: nil)) return false }
0
0
116
2w
HLS output - influence fragment time.
Hello, I'm trying to create HLS output with segment time of 6 seconds, but sync samples (fragments) every 1 second. I want to have AVAssetWriter write a sync sample / moof header every second. Am I correct in understanding that I could only achieve this with a pre-fragmented MP4 and use a passthrough rendition with setting preferredOutputSegmentInterval to indefinite and running flushSegment() as needed? Or is there another method using AVFoundation? Thanks in advance.
0
0
202
3w
Can not playback downloaded encrypted HLS fmp4 on iPhone
Hi all, we want to play downloaded encrypted HLS Fragment MP4 files on iPhone, and we are using UsingAVFoundationToPlayAndPersistHTTPLiveStreams to test. on this HLSCatalog app, we can playback encrypted HLS Fragment MP4 streaming, but when we download the encrypted HLS Fragment MP4 to device/iPhone, then try to playback on device, but now, it has an issue:The error is: Error: Optional("The operation couldn’t be completed. (CoreMediaErrorDomain error 1718449215.)") So, we want to know how can I playback downloaded encrypted HLS fmp4 on iPhone. and you can try below url: http://69.234.244.220/prod/vod/HDR10_2D_LEFT_48FPS_FMP4_Encrypted/prog_index.m3u8 Steps to reproduce: 1: create a HLS fragment mp4 with mediafilesegmenter: mediafilesegmenter --iso-fragmented -t 4 --encrypt-key-file=BT709-2D-48FPS.key --encrypt-key-url=http://69.234.244.220:5000/download/BT709-2D-48FPS.key -f prod/vod/HDR10_2D_LEFT_48FPS_FMP4_Encrypted HDR10_2D_LEFT_48FPS.mp4 2: upload to content server 3: download UsingAVFoundationToPlayAndPersistHTTPLiveStreams from https://developer.apple.com/documentation/avfoundation/offline_playback_and_storage/using_avfoundation_to_play_and_persist_http_live_streams 4: in HLSCatalog app, replace playlist_url of Item-1 of Streams to http://69.234.244.220/prod/vod/HDR10_2D_LEFT_48FPS_FMP4_Encrypted/prog_index.m3u8 5: in HLSCatalog app->click the icon of Advanced Stream-->click download, when download success, the try play...now, it can NOT playback on iPhone.
2
0
213
4w
Can not playback downloaded encrypted HLS fmp4 on iPhone
Hi all, we want to play downloaded encrypted HLS Fragment MP4 files on iPhone, and we are using UsingAVFoundationToPlayAndPersistHTTPLiveStreams to test. on this HLSCatalog app, we can playback encrypted HLS Fragment MP4 streaming, but when we download the encrypted HLS Fragment MP4 to device/iPhone, then try to playback on device, but now, it has an issue:The error is: Error: Optional("The operation couldn’t be completed. (CoreMediaErrorDomain error 1718449215.)") So, we want to know how can I playback downloaded encrypted HLS fmp4 on iPhone. and you can try below url: http://69.234.244.220/prod/vod/HDR10_2D_LEFT_48FPS_FMP4_Encrypted/prog_index.m3u8 Steps to reproduce: 1: create a HLS fragment mp4 with mediafilesegmenter: mediafilesegmenter --iso-fragmented -t 4 --encrypt-key-file=BT709-2D-48FPS.key --encrypt-key-url=http://69.234.244.220:5000/download/BT709-2D-48FPS.key -f prod/vod/HDR10_2D_LEFT_48FPS_FMP4_Encrypted HDR10_2D_LEFT_48FPS.mp4 2: upload to content server 3: download UsingAVFoundationToPlayAndPersistHTTPLiveStreams from https://developer.apple.com/documentation/avfoundation/offline_playback_and_storage/using_avfoundation_to_play_and_persist_http_live_streams 4: in HLSCatalog app, replace playlist_url of Item-1 of Streams to http://69.234.244.220/prod/vod/HDR10_2D_LEFT_48FPS_FMP4_Encrypted/prog_index.m3u8 5: in HLSCatalog app->click the icon of Advanced Stream-->click download, when download success, the try play...now, it can NOT playback on iPhone.
1
0
187
4w
Radio App Rejected with Guideline 5.2.3 - Legal using open source Free Database Radio-Browser.info
Hello A few days ago we sent to Apple for approval the new version of our application, using the free database of Radio-Browser.info After our App rejected for Guideline 5.2.3 - Legal we explained to him that we are exclusively partnered with Radio Browser (https://www.radio-browser.info/), which features open-source radio stations. Please note that only radio station owners have the ability to add their stations to the Radio Browser database through the following link: https://www.radio-browser.info/add. Is there anyone here that explain to us what Apple reviewer means with his answere? Apple Reviewer answer: However, to comply with guideline 5.2.3, it would be appropriate to limit your app to streaming open-source stations only. Alternatively, you may provide documentary evidence proving that you have all the necessary rights or permissions for the third-party audio streaming. We look forward to reviewing your resubmitted app. Thank you
2
0
343
Sep ’24
How to Manage HLS Assets Downloaded with AVAssetDownloadTask to Appear in the iOS Settings App
I have an application that downloads content using AVAssetDownloadTask. In the iOS Settings app, these downloads are listed in the Storage section as a collection of downloaded movies, displaying the asset image, whether it's already watched, the file size, and an option to delete it. Curious about how other apps handle this display, I noticed that Apple Music shows every downloaded artist, album, and song individually. This feature made me wonder: can I achieve something similar in my application? On the other hand, apps like Spotify and Amazon Music don’t show any downloaded files in the Settings app. Is it possible to implement that approach as well? Here is print screen of the Apple Music Storage section in the Settings App: I tried moving the download directory into sub folder using the FileManager, but all the results made the downloads stop showing in the setting app
1
0
346
Aug ’24
HLS authoring - creating Iframe playlist
Hello, Is there an example from Apple on how to extract the data to create an Iframe playlist using the AVAssetSegmentTrackReport? I'm following the example of HLS authoring from WWDC 2020 - Author fragmented MPEG-4 content with AVAssetWriter It states: "You can create the playlist and the I-frame playlist based on the information AVAssetSegmentReport provides." I've examined the AVAssetSegmentTrackReport and it only appears to provide the firstVideoSampleInformation, which is good for the first frame, but the content I'm creating contains an I-Frame every second within 6 second segments. I've tried parsing the data object from the assetWriter delegate function's didOutputSegmentData parameter, but only getting so far parsing the NALUs - the length prefixes seem to go wrong when I hit the first NALU type 8 (PPS) in the first segment. Alternatively, I could parse out the output from ffmpeg, but hoping there's a solution within Swift. Many thanks
2
0
304
Aug ’24
Metadata of Audiotracks Airplay-Receiver different from Source
Description: HLS-VOD-Stream contains several audio tracks, being marked with same language tag but different name tag. https://devstreaming-cdn.apple.com/videos/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8 e.g. #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="bipbop_audio",LANGUAGE="eng",NAME="BipBop Audio 1",AUTOSELECT=YES,DEFAULT=YES #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="bipbop_audio",LANGUAGE="eng",NAME="BipBop Audio 2",AUTOSELECT=NO,DEFAULT=NO,URI="alternate_audio_aac/prog_index.m3u8" You set up Airplay from e.g. iPhone or Mac or iPad to Apple TV or Mac. Expected behavior: You see in AVPlayer and QuickTime Language Audiotrack Dropdown containing info about LANGUAGE and NAME on Airplay Sender as on Airplay Receiver - the User Interface between playing back a local Stream or Airplay-Stream is consistent. Current status: You see in UI of Player of Airplay Receiver only Information of Language Tag. Question: => Do you have an idea, if this is a missing feature of Airplay itself or a bug? Background: We'd like to offer additional Audiotrack with enhanced Audio-Characteristics for better understanding of spoken words - "Klare Sprache". Technically, "Klare Sprache" works by using an AI-based algorithm that separates speech from other audio elements in the broadcast. This algorithm enhances the clarity of the dialogue by amplifying the speech and diminishing the volume of background sounds like music or environmental noise. The technology was introduced by ARD and ZDF in Germany and is available on select programs, primarily via HD broadcasts and digital platforms like HbbTV. Users can enable this feature directly from their television's audio settings, where it may be labeled as "deu (qks)" or "Klare Sprache" depending on the device. The feature is available on a growing number of channels and is part of a broader effort to make television more accessible to viewers with hearing difficulties. It can be correctly signaled in HLS via: e.g. https://ccavmedia-amd.akamaized.net/test/bento4multicodec/airplay1.m3u8 # Audio #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="stereo-aac",LANGUAGE="de",NAME="Deutsch",DEFAULT=YES,AUTOSELECT=YES,CHANNELS="2",URI="ST.m3u8" #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="stereo-aac",LANGUAGE="de",NAME="Deutsch (Klare Sprache)",DEFAULT=NO,AUTOSELECT=YES,CHARACTERISTICS="public.accessibility.enhances-speech-intelligibility",CHANNELS="2",URI="KS.m3u8" Still there's the problem, that with Airplay-Stream you don't get this extra information but only LANGUAGE tag.
2
0
277
Aug ’24
updateConfiguration no work sometimes
I'm using screenCaptureKit for winodow capture. I build a filter like follow code, (I'm not usng independent window filter, because sometime I need capture multi windows in the same time) filter = [[SCContentFilter alloc] initWithDisplay:displayID includingWindows:includingWindows]; At begining, the capture works OK. When the target window's size or position changed, my code monitored this change and called updateConfiguration like below , I got completionHandler without error. [streamConfiguration setSourceRect:newRect]; [streamConfiguration setWidth:newWidth]; [streamConfiguration setHeight:newHeight]; [scStream updateConfiguration:streamConfiguration completionHandler:^(NSError *_Nullable error) { if (error) { // some error log } else { // update done } }]; But sometimes, it still output frame with old size, and the rect is still the old. And int some other cases, it works fine..... Is there any special work before call updateConfiguration to make it work ?
0
0
233
Aug ’24
HLS with SAMPLE-AES download
Hi, I'm trying to download a encripted video using mediafilesegmenter with SAMPLE-AES, not fairplay... I can play the video online without any problems.. When i try download the video using AVAssetDownloadTask I get an error: Error Domain=CoreMediaErrorDomain Code=-12160 "(null)" And, if I use ClearKey system to deliver the key when I have a custom scheme on the m3u8, Airplay doesn't work either Sample-aes only works with fairplay? I can't find any information about it, does anyone know if it is a bug? I hope someone can help me :)
0
0
325
Aug ’24
Samsung/LG/Sony TV airplay fails to seek when audio track is not default
Hello, We have a TV app, based on react-native-video, which was tweaked to suit our requirements. There is a problem with AirPlay streaming. An asset can be streamed on AppleTV, but when we try to stream it on any TV with AirPlay and choose a language different from the default in the manifest there is a problem. Seek freezes the picture and nothing happens. The funny thing is if we do seek back to the starting point +/-20 sec, the video resumes. The obvious difference with AppleTV, which we were able to recognize, is that with AppleTv search an isPlaybackBufferEmpty is observed, while with 3rd party TVs, there are only isPlaybackLikelyToKeepUp events firing. Maybe, there is a solution to that issue? Or at least, there is a way to forcefully empty the buffer when search is called? Thank you
1
0
300
Aug ’24
AVPlayer and HLS streams timeout
I find the default timeout of 1 second to download a segment is not reasonable when playing an HLS stream from a server that is transcoding. Does anyone know if it's possible to change this networking timeout? Error status: -12889, Error domain: CoreMediaErrorDomain, Error comment: No response for map in 1s. Event: <AVPlayerItemErrorLogEvent: 0x301866250> Also there is a delegate to control downloading HLS for offline viewing but no delegate for just streaming HLS.
0
0
352
Jul ’24