http-live-streaming

AVAssetDownloadDelegate methods for HLS caching not getting called

流过昼夜 提交于 2019-12-03 14:34:40
I have followed the tutorial given here for HLS caching, but the control never reaches to any of the delegates ( of AVAssetDownloadDelegate ). Am I missing anything? Here is code I wrote - (void)setupAssetDownloader { NSURL *assetURL = [NSURL URLWithString:@"STREAMING_HOST/video/hls/3729170.m3u8"]; AVURLAsset *hlsAsset = [AVURLAsset assetWithURL:assetURL]; urlSessionConfiguration = [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:@"assetDowloadConfigIdentifier"]; avAssetDownloadSession = [AVAssetDownloadURLSession sessionWithConfiguration:urlSessionConfiguration

Getting PCM data of HLS from AVPlayer

£可爱£侵袭症+ 提交于 2019-12-03 10:32:45
问题 This question seems to be asked few times over last few years but none has answer for that. I am trying to process PCM data from HLS and I have to use AVPlayer. this post taps the local files https://chritto.wordpress.com/2013/01/07/processing-avplayers-audio-with-mtaudioprocessingtap/ and this tap work with remote files but not with .m3u8 hls files. http://venodesigns.net/2014/01/08/recording-live-audio-streams-on-ios/ I can play first two tracks in the playlist but it doesn't start the

Extract/Record Audio from HLS stream (video) while playing iOS

一笑奈何 提交于 2019-12-03 10:29:51
问题 I am playing HLS streams using AVPlayer. And I also need to record these streams as user presses record button. The approach I am using is to record audio and video separately then at the end merge these file to make the final video. And It is successful with remote mp4 files. But now for the HLS (.m3u8) files I am able to record the video using AVAssetWriter but having problems with audio recording. I am using MTAudioProccessingTap to process the raw audio data and write it to a file. I

Detect when AvPlayer switch bit rate

。_饼干妹妹 提交于 2019-12-03 09:57:02
问题 In my application, I use the AVPlayer to read some streams (m3u8 file), with HLS protocol. I need to know how many times, during a streaming session, the client switches bitrate . Let's assume the client's bandwidth is increasing. So the client will switch to a higher bitrate segment. Can the AVPlayer detect this switch ? Thanks. 回答1: I have had a similar problem recently. The solution felt a bit hacky but it worked as far as I saw. First I set up an observer for new Access Log notifications:

Playing .m3u8 file on iOS

最后都变了- 提交于 2019-12-03 09:53:47
问题 I have .m3u8 link which I need to play on iOS which supports the HLS Protocol . When I assign URL directly to the MPMoviePlayerController and play, video is not visible but I can hear the audio. NSURL *movieURL = [NSURL URLWithString:@"http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/sl.m3u8"]; MPMoviePlayerController *mp = [[MPMoviePlayerController alloc] initWithContentURL:movieURL]; [self.view addSubview:self.moviePlayer.view]; if (mp) { // save the movie player object self.moviePlayer

Using openssl encryption for Apple's HTTP Live Streaming

自古美人都是妖i 提交于 2019-12-03 07:26:46
问题 Has anyone had any luck getting encrypted streaming to work with Apple's HTTP Live Streaming using openssl? It seems I'm almost there but my video doesn't play but I don't get any errors in Safari either (like "Video is unplayable" or "You don't have permission to play this video" when I got the key wrong). #bash script: keyFile="key.txt" openssl rand 16 > $keyFile hexKey=$(cat key.txt | hexdump -e '"%x"') hexIV='0' openssl aes-128-cbc -e -in $fileName -out $encryptedFileName -p -nosalt -iv $

Reduce HLS latency from +30 seconds

牧云@^-^@ 提交于 2019-12-03 06:23:27
问题 Ubuntu 12.04 nginx 1.2.4 avconv -version avconv version 0.8.10-4:0.8.10-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers built on Feb 6 2014 20:56:59 with gcc 4.6.3 avconv 0.8.10-4:0.8.10-0ubuntu0.12.04.1 libavutil 51. 22. 2 / 51. 22. 2 libavcodec 53. 35. 0 / 53. 35. 0 libavformat 53. 21. 1 / 53. 21. 1 libavdevice 53. 2. 0 / 53. 2. 0 libavfilter 2. 15. 0 / 2. 15. 0 libswscale 2. 1. 0 / 2. 1. 0 libpostproc 52. 0. 0 / 52. 0. 0 I'm using avconv and nginx to create an HLS stream but

How to create byte-range m3u8 playlist for HLS?

回眸只為那壹抹淺笑 提交于 2019-12-03 06:10:06
问题 Apple gives an example of support for byte-range segments in m3u8 files for HLS #EXTM3U #EXT-X-TARGETDURATION:11 #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-VERSION:4 #EXTINF:10.0, #EXT-X-BYTERANGE:75232@0 media.ts #EXTINF:10.0, #EXT-X-BYTERANGE:82112@752321 media.ts #EXTINF:10.0, #EXT-X-BYTERANGE:69864 media.ts But I cannot figure out how to create such playlist for given .ts file. Are there any tools for that? 回答1: There is -hls_flags as a ffmpeg option. (https://www.ffmpeg.org/ffmpeg-formats.html)

Can AVFoundation be coerced into playing a local .ts file?

本小妞迷上赌 提交于 2019-12-03 06:08:13
问题 Clearly, AVFoundation (and Quicktime X) can demux and play properly encoded .ts containers, because .ts containers underly HTTPS live streaming. Short of setting up a local web service to serve the .m3u8 and associated .ts files, I'd really like to be able to either: convince AVURLAsset and/or URLAssetWithURL to accept a local file .m3u8 URI as if it were an HTTP URI, or better yet, be able to use AVQueuePlayer to load and play a sequence of .ts files without jumping through the live

Mp4 to HLS using ffmpeg

亡梦爱人 提交于 2019-12-03 04:23:17
问题 I'm trying to convert a local .mp4 video to HLS using ffmpeg in an iOS app. I have integrated the ffmpeg wrapper using pods and generated all the segmented .ts files and the m3u8 file, but some of the .ts file segments are not listed in the .m3u8 playlist file as shown below. It is always listing the last 5 video segments. #EXTM3U #EXT-X-VERSION:3 #EXT-X-TARGETDURATION:2 #EXT-X-MEDIA-SEQUENCE:13 #EXTINF:2, out13.ts #EXTINF:1, out14.ts #EXTINF:2, out15.ts #EXTINF:2, out16.ts #EXTINF:1, out17