How to get an array of all available sub-stream before we download an HLS stream? - ios10

How to extract metadata from available HLS stream, so that i can have all available resolutions ,bandwidth and sub-stream information before i download a HLS stream. I want to allow user to choose a resolution they want to download from all available HLS Sub-stream resolution. How can i get all available sub-stream information before hand?

I answered this question, please check that answer. What you need to do is, before stream HSL, create an M3U8PlaylistModel object. So you can get all the available sub-stream.

Related

Obtain stream format from AVPlayer Swift

May someone of you know if it's possible to obtain the stream format from the current playing item through AVPlayer? I would need to observe if it's: mpeg4, HLS, flv or whatever.
Thank you so much!
Depends on what ending does the player video link has. The correct way is to check the manifest which you can find with a proxy. But for the easiest way if your link is .m3u8 it's HLS.
Now to get the codec that the video has you need to get the manifest from the response of the .m3u8.

Video streaming solutions

I am attempting to stream a video, in a format unity3d can access, like an mjpg. I have gone through several possible solutions, including gstreamer(only does client side as far as I could tell by the examples), yawcam(I couldn't find a way to access the image directly), and silverlight(due to simply not being able to find how the heck webcam streaming was doable) I am currently just looking for any more methods of getting video over from one side to the other. Could I possibly simply read the images into a byte array and send it over a socket? Maybe I missed something in the previous three possible solutions?
If you are looking to stream video from a server than you can use Ogg encoding + WWW.movie to map it to a texture. Assuming you have a Pro license, as I think this is a Pro only feature. If this is a local file, either bundled with the app or in external folder, we use the brilliant AVPro Windows Media or AVPro QuickTime. MJPEG does offers super smooth scrubbing with AVPro but generates enormous files. Definitely not ideal for streaming or even download!
Finally RenderHead also has a Live Camera capture plugin that could meet your needs.

are there any tools/scripts for analyzing/retrieving flash/html5 video information/metadata

I want to play youtube video with a certain resolution, like 360p
and capture the packets, and then extract the video from the packets
and then I want to analyzing/retrieving flash/html5 video information/metadata from these videos
BTW, are videos still with the same resolution when they are extracted from the captured packets?
note that these videos may not be complete
are there any good tools for analyzing/retrieving flash/html5 video information/metadata
like video bit rate, video resolution(like 360p, 480p), used audio/video codecs, video size and duration/duration
if the video is not complete, the information would ideally include the original video size, the actual video size, the original video length/duration and the actual video length/duration
I hope it is a script, if it is a tool. I hope it can be run through shell using command line coz I want automation.
A paper says perl could do this, but I don't how
thanks!
(long comment, not a complete answer)
IANAL, but your goals may not fit the YouTube Terms of Service:
Section 4. C
You agree not to access Content through any technology or means other than the video playback pages of the Service itself, the Embeddable Player, or other explicitly authorized means YouTube may designate.
Section 4. H
You agree not to use or launch any automated system, including without limitation, "robots," "spiders," or "offline readers," that […] sends more request messages to the YouTube servers […] than a human can reasonably produce in the same period by using a conventional on-line web browser. Notwithstanding the foregoing, YouTube grants the operators of public search engines permission to use spiders to copy materials from the site for the sole purpose of and solely to the extent necessary for creating publicly available searchable indices of the materials, but not caches or archives of such materials. […]
You may be able to access the required information directly using the YouTube Data API. Here is a reference, and here is a list of directly supported programming languages. Perl will work as well, as the underlying data format is plain XML or JSON.
You might also find these SO questions YouTube Player API: How to get duration of a loaded/cued video without playing it? and Youtube API get video duration from the XML enlightening.

IPhone: Video API: Live video streaming modify

I have a question about video stream processing. Is it possible to get access and modify real time video stream during recording (f.e. I want to add some text to video)? I can do this as a preview by getting separate frames, but I'm looking for tool which will allow me to store video with my text in video frames.
Probably there is already some libraries/tools available (but I haven't found any yet).
Try GPUIMAGE library. It can help you.
You should check AVCam sample code by apple. That might be a starting point.

iPhone streaming debugging information

I'm looking for a way (doesn't need to be app-store save!!) to get ahold of video-streaming-relevant debugging information.
What I'm trying to do, is to write an application that opens a video stream and displays information like:
framerate
bitrate audio / video
etc etc.
codec information
basically i want to display as much information for any given stream.
Thanks for any information in advance,
best regards
sam
Even though you tagged your question with MPMoviePlayerController, that class probably isn't going to help you out very much. First of all, there's a limited amount of information you can access from it at a high level, certainly nothing about codecs and audio bitrate. And even if the class does store this type of information somehow, your app would be disqualified from being in the iTunes App Store if you access non-public methods or properties.
Secondly, MPMoviePlayerController only supports a limited number of codecs itself, namely the ones that can be decoded in hardware on the iPhone/iPad (H.264 baseline and MPEG-4 videos).
Anyways, a good option could be FFMpeg for the iPhone. Getting the information you need seems to be much more straightforward this way; check out this blog post for a nice tutorial for using the libraries.
I'm not sure about the potential legal issues concerning distributing such a program in the App Store, but if you statically link it with your binary that would at least satisfy Apple... you'll have to check the FFMpeg Legal Site for their end.