Hi,
This Apple provided program “SideBySideToMVHEVC” removes the audio track from our videos resulting in useless content.
Advise for:
code changes required permitting keeping the audio track
Or
advise for Apple tools permitting re-inserting the audio track after “SideBySideToMVHEVC”
Sincerely,
Olaf
Streaming
RSS for tagDeep dive into the technical specifications that influence seamless playback for streaming services, including bitrates, codecs, and caching mechanisms.
Post
Replies
Boosts
Views
Activity
Dear Apple Engineers,
I have downloaded the FairPlay Streaming SDK 4.4 - In which i could able to make use of the fps_safari_hls_example.html file to make a successful playback of fairplay protected content in safari, by pointing our fairplay license server, .m3u8 file & certificate.
Now that, i'm trying to achieve the renewal concept, so i tried to use the fps_safari_hls_key_renewal.html file also setting up the ContentKeyDuration to 20sec in FP license server backend. But client didn't make any subsequent FP license request around when nearing 20th sec or post 20th sec. I wonder if this use case be achieved in safari,
the only extra functionality i could see in renewal html file is below piece of code
await runAndWaitForLicenseRequest(session, keyURI, () => {
session.update(stringToUInt8Array("renew"))
});
Based on the above piece, i assume that we are making sure that client to aware the when to renew the license. But in my case, there were no FP request is made , in-fact, this piece of code got executed immediate after the 1st FP license request call & protected media continues to play despite setting the ContentKeyDuration to 20sec with LIMITED as contentkeyType .
Could you please suggest on how to achieve the subsequent renewal request from client based on the ContentKeyDuration send in the CKC response using this sample renewal html file..? Is there any tewaks to be made in html file, kindly suggest.
Mediastreamvalidiator error:
all .m3u8 files relevant have already the REQ-VIDEO-LAYOUT="CH-STEREO" parameter set.
Nevertheless mediastreamvalidator check/reports for HLS Authoring Specification for Apple Devices states:
General requirements
Must Fix Issues
You MUST declare REQ-VIDEO-LAYOUT for variants containing other then standard monoscopic video
Variant #1
Hi all, I am a graduate student who is looking into making MV-HEVC videos streamable. May I ask that is it possible to encode mv-hevc videos with the HLS (Http Live Streaming) protocol?
I've been trying to use the HLS tool by Apple to encode a spatial video recored by VP.
mediafilesegmenter -iso-fragmented -t 4 -f sp_video-1-vp spatial-video-by-vp.MOV
But the output HLS playlist file doesn't look like the format that Apple proposes in the WWDC video. For example, the attribute EXT-X-VERSION is 7 instead of 12, and no attr REQ-VIDEO-LAYOUT=CH-STEREO which should be the key indicator of the spatial video type.
From what the WWDC video showcased, I assume Apple's HLS tool supports it. Maybe my usage is not correct. Just curious what you guys think about it, thank you!
Hi guys, I'm implementing FairPlay support for a video streaming application. I've managed to get as far as generating the SPC and acquiring a license from the license server. However when it comes to parsing the license (CKC) returned from the server, the FPS module returns error code -42671. Has anyone else faced this before and / or knows what the fix is? I thought passing it the license should be enough unless additional data is required?
Now I'm preparing LL-HLS demonstration by using HLS tools.
Generated pattern and screen capture are okay.
But input file option does not work.
Please check whether it's possible to use explicit input file as source.
In case of screen recording, the max resolution of multi variant manifest is FHD even though the display resolution is 3840x2160.
Please check whether it's possible to set 4K UHD resolution.
Does anyone know if the toolset for HLS is still available, and if so, where to find it? I'm clicking links for downloads, but never find it: all I see are beta versions of OSs and some applications.
We have created a hls playback framework and lot of our client's are complaining about this error The operation couldn’t be completed. (CoreMediaErrorDomain error -42716.)
While setting up our premium video-on-demand workflow in AWS, using AWS MediaConvert and MediaPackager and licence delivery from drmToday we encountered an issue with HLS+FairPlay playback (only) in Safari on macOS. The issue is that sometimes (more than 50% on the same video) the videoplayer initialization fails (with simple event of type=”error” in onerror callback).
We are using Shaka player in our web application, so we first assumed that this (random) issue could be due to Shaka. However, we also tested with direct playback via the player and we observed the same issue, with same frequency. Since we have some content for which this problem does not occur and other content when the problem occurs very frequently, we tried to understand what could explain this difference. We noticed that for assets where the problem never occurs the order of the video submanifest was increasing, whereas for assets where the problem occurs frequently the order is decreasing.
To isolate the issue we created a standalone page for a 2-minute asset and we are able to demonstrate that on this asset, when the bitrates are in decreasing order the playback with Safari on macOS fails more than 50% of the time.
Test page using tag:
KO: https://ntg-test-public-scr.s3.eu-west-1.amazonaws.com/aws-video.html
OK: https://ntg-test-public-scr.s3.eu-west-1.amazonaws.com/aws-video.html?ok=1
Test page using Shaka:
KO: https://ntg-test-public-scr.s3.eu-west-1.amazonaws.com/aws-shaka.html
OK: https://ntg-test-public-scr.s3.eu-west-1.amazonaws.com/aws-shaka.html?ok=1
Notes:
the issue is only reproducible with Safari on macOS (not with Safari on iOS)
same HLS content + FairPlay plays OK 100% on tvOS
the issue is only reproducible for HLS content with FairPlay (OK if no DRM)
I have a stream.m3u8 file with the following contents:
#EXTM3U
#EXT-X-VERSION:11
#EXT-X-DEFINE:QUERYPARAM="token"
#EXT-X-STREAM-INF:BANDWIDTH=400000,RESOLUTION=640x360
360.m3u8{$token}
#EXT-X-DEFINE:QUERYPARAM="token"
#EXT-X-STREAM-INF:BANDWIDTH=1000000,RESOLUTION=960x540
540.m3u8{$token}
#EXT-X-STREAM-INF:BANDWIDTH=2000000,RESOLUTION=1280x720
#EXT-X-DEFINE:QUERYPARAM="token"
720.m3u8{$token}
#EXT-X-STREAM-INF:BANDWIDTH=8000000,RESOLUTION=1920x1080
#EXT-X-DEFINE:QUERYPARAM="token"
1080.m3u8{$token}
#EXT-X-STREAM-INF:BANDWIDTH=16000000,RESOLUTION=3840x2160
#EXT-X-DEFINE:QUERYPARAM="token"
2160.m3u8{$token}
The requesting URL is https://example.com/stream.m3u8!?token= and I am using an iPhone 15 running iOS 17.1.
The QUERYPARAM substitution as described here is not working, because the requested URL for 540.m3u8 does not have a token appended it; I know this because I checked my apache error log.
The file is hosted on a Debian 11 server.
Have I implemented this correctly, and do I have the correct tech stack? Furthermore, what debugging tools should I be running to investigate further?
In my app I play HLS streams via AVPlayer. It works well! However, when I try to download those same HLS urls via MakeAssetDownloadTask I regularly come across the error:
Download error for identifier 21222: Error Domain=CoreMediaErrorDomain Code=-12938 "HTTP 404: File Not Found" UserInfo={NSDescription=HTTP 404: File Not Found, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"BackgroundAVAssetDownloadTask <CE9B10ED-E749-49FF-9942-3F8728210B20>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=BackgroundAVAssetDownloadTask <CE9B10ED-E749-49FF-9942-3F8728210B20>.<1>}
I have a feeling that the AVPlayer has a way to resolve this that the MakeAssetDownloadTask lacks. I am wondering if any of you have come across this or have insight.
Thank you!
BTW this is using Xcode Version 15.3 (15E204a) and developing for visionOS 1.0.1
I'm trying to implement the playback of an HLS content with FairPlay, and I want to insert it into a RealityView using a VideoMaterial of a sphere.
When I use unencrypted HLS content everything works correctly, but when I use FairPlay it doesn't.
To initialize FairPlay I am using the following in the view:
let contentKeyDelegate = ContentKeySessionDelegate(licenseURL: licenseURL, certificateURL: certificateURL)
// Create the Content Key Session using the FairPlay Streaming key system.
let contentKeySession = AVContentKeySession(keySystem: .fairPlayStreaming)
contentKeySession.setDelegate(contentKeyDelegate, queue: DispatchQueue.main)
contentKeySession.addContentKeyRecipient(asset)
Has anyone else encountered this problem?
Note: I'm testing in Vision Pro directly because the simulator hasn't support for FairPlay.
I am setting up a HLS server for MVHEVC files...
just find that if tag mp4 files using Asset Writer with
let colorPropertySettings = [
AVVideoColorPrimariesKey: AVVideoColorPrimaries_ITU_R_709_2,
AVVideoYCbCrMatrixKey: AVVideoTransferFunction_ITU_R_709_2,
AVVideoTransferFunctionKey: AVVideoYCbCrMatrix_ITU_R_709_2
]
the HLS playback well on Safari.
but if tag mp4 files using using Asset Writer with
let colorPropertySettings = [
AVVideoColorPrimariesKey: AVVideoColorPrimaries_ITU_R_2020,
AVVideoYCbCrMatrixKey: AVVideoYCbCrMatrix_ITU_R_2020,
AVVideoTransferFunctionKey: AVVideoTransferFunction_SMPTE_ST_2084_PQ
]
the HLS can not play on Safari.
looks like HLS does NOT support MVHEVC HDR10.
OR
have I lost any setting for MVHEVC HDR10?
thanks.
I have an avplayer with an encrypted m3u8 url and this is my code snippet
let contentUrl = URL(string: String(format:videoUrl))
let headers = ["token": token]
let asset: AVURLAsset = AVURLAsset(url: contentUrl!, options:
["AVURLAssetHTTPHeaderFieldsKey": headers])
let playerItem: AVPlayerItem = AVPlayerItem(asset: asset)
self.avPlayer?.replaceCurrentItem(with: playerItem)
self.avPlayer?.play()
When i try to stream Airplay the content not displaying. Airplay is not working with an encrypted url. How can i stream? Is there any way.
Hi,
I am using avplayer, want to stream airplay with my encrypted hls m3u8 url. I am sharing my code snippet.
` let contentUrl = URL(string: String(format:videoUrl))
let headers = ["token": token]
let asset: AVURLAsset = AVURLAsset(url: contentUrl!, options["AVURLAssetHTTPHeaderFieldsKey": headers])
let playerItem: AVPlayerItem = AVPlayerItem(asset: asset)
self.avPlayer?.replaceCurrentItem(with: playerItem)
self.avPlayer?.play()`
Airplay is not working on my tv when i start stream. My encrypted url won't work.
Is there any way to stream airplay with encrypted url. Stuck here........
Is there any update for iOS17 in FairPlay? So far I have found no relevant information.
iOS 16 is fine
Hi everyone, I am having a problem on AVPlayer when I try to play some videos.
The video starts for a few seconds, but immediately after I see a black screen and in the console there is the following error:
<__NSArrayM 0x14dbf9f30>(
{
StreamPlaylistError = "-12314";
comment = "have audio audio-aacl-54 in STREAMINF without EXT-X-MEDIA audio group";
date = "2024-05-13 20:46:19 +0000";
domain = CoreMediaErrorDomain;
status = "-12642";
uri = "http://127.0.0.1:8080/master.m3u8";
},
{
"c-conn-type" = 1;
"c-severity" = 2;
comment = "Playlist parse error";
"cs-guid" = "871C1871-D566-4A3A-8465-2C58FDC18A19";
date = "2024-05-13 20:46:19 +0000";
domain = CoreMediaErrorDomain;
status = "-12642";
uri = "http://127.0.0.1:8080/master.m3u8";
}
)
Hi guys,
I'm investigating failure to play low latency Live HLS stream and I'm getting following error:
(String) “<AVPlayerItemErrorLog: 0x30367da10>\n#Version: 1.0\n#Software: AppleCoreMedia/1.0.0.21L227 (Apple TV; U; CPU OS 17_4 like Mac OS X; en_us)\n#Date: 2024/05/17 13:11:46.046\n#Fields: date time uri cs-guid s-ip status domain comment cs-iftype\n2024/05/17 13:11:16.016 https://s2-h21-nlivell01.cdn.xxxxxx.***/..../xxxx.m3u8 -15410 \“CoreMediaErrorDomain\” \“Low Latency: Server must support http2 ECN and SACK\” -\n2024/05/17 13:11:17.017 -15410 \“CoreMediaErrorDomain\” \“Invalid server blocking reload behavior for low latency\” -\n2024/05/17 13:11:17.017
The stream works when loading from dev server with TLS 1.3, but fails on CDN servers with TLS 1.2.
Regular Live streams and VOD streams work normally on those CDN servers.
I tried to configure TLSv1.2 in Info.plist, but that didn't help.
When running
nscurl --ats-diagnostics --verbose
it is passing for the server with TLS 1.3, but failing for CDN servers with TLS 1.2 due to error Code=-1005 "The network connection was lost."
Is TLS 1.3 required or just recommended?
Refering to
https://developer.apple.com/documentation/http-live-streaming/enabling-low-latency-http-live-streaming-hls
and
https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis
Is it possible to configure AVPlayer to skip ECN and SACK validation?
Thanks.
Doing some testing around player behaviour when a license expires in Safari on MacOS. I had the following outcomes:
On Safari 17.4.1 on an intel based Mac running Ventura, playback stopped when the license expired.
On Safari 17.4.1 on an M3 running Sonoma, playback stalled briefly, and then continued to play unlimited.
On Safari 16.5.2 on an M2 running Ventura, playback stalled briefly, and then continued to play unlimited.
When playback stalled briefly, was at the time the license expired.
I parsed the license and everything is set correctly for a lease license type:
{
"version" : 1,
"payloadLength" : 1072,
"iv" : "0H9NCXLQeh1ziYpmJXsnwQ==",
"assetId" : "䙁㉌䉃\u0000\u0000\u0000",
"hdcp" : "TYPE_0_REQUIRED",
"contentKeyDuration" : {
"leaseDurationSeconds" : 300,
"rentalDurationSeconds" : 0,
"persistenceAllowed" : false
},
"keyType" : "Lease"
}
I cannot find any information relating to this behaviour.
Per the docs for FPS, a lease license type: If the content key is not renewed, the Apple device stops the playback when the lease expires. Which is what is observed on the intel based macbook.
device iPhone 13 Pro max
AVPlayer recieve error
#Version: 1.0
#Software: AppleCoreMedia/1.0.0.21E236 (iPhone; U; CPU OS 17_4_1 like Mac OS X; en_us)
#Date: 2024/06/11 14:06:18.018
CoreMediaErrorDomain error -42716
On system log we see propertyKey:IsLeaseExpired
стандартное 14:38:28.008912+0300 mediaplaybackd <<<< FigCPECryptorPKD >>>> FigPKDCPECryptorSetKeyRequestResponse: 0xcc4160140 612C5D12-F92F-4897-B55D-854F842B41B4 keyResponseOptions:[] keyRequestResponse:0xcc5759d70 err:-42716
стандартное 14:38:28.009052+0300 mediaplaybackd keyboss ckb_transitionRequestToTerminalState: 0xcc5440380 <private> reqFin err <private> (-42716) dokeyCallbacksExist 0
стандартное 14:38:28.009138+0300 mediaplaybackd keyboss ckb_customURLReadCallback: 0xcc5440380 <private> customURLReqID 8 isComplete 1 err 0 error <private> (0) dokeyCallbacksExist 0
стандартное 14:38:28.009169+0300 mediaplaybackd <<<< FigPKDKeyManager >>>> keyManager_copyPropertyForEntryInternal: 0xcc546b280 6143FF61-5E6F-4506-A17D-4DB6B6BA0C5B propertyKey:IsLeaseExpired propertyValue: 0x16e5b17a0
стандартное 14:38:28.009196+0300 mediaplaybackd <<<< FigPKDKeyManager >>>> PKDKeyManagerSetKeyRequestError: keyManager:0xcc546b280 keyID:6143FF61-5E6F-4506-A17D-4DB6B6BA0C5B error:<private> (-19160) err:0
on server leaseDuration always is 0
But we have another device iPhone 15 Pro max, iOS 17.5.1 and he played correctly with the same crypt key from server