I want to play video from a url in my application... I want to first stream the video and store the data in a buffer and then feed the data from the buffer to the player.
There is a bufferedplaybackdemo sample in BlackBerry Eclipse Plugin, for audio. I do believe it's not hard to rewrite it for video playback.
See Buffer and play streamed media
Related
I want to:
play videos in my Xamarin Forms app (iOS + Android + UWP)
follow best practices and use maintained code
be able to secure my content (subscription based access)
if possible, style the transport controls to have a the same look and feel as my app
I found multiple ways that are possible, but not sure what is to be advised given my scenario:
Azure Media player
I found this talk that implied that it is best to use Azure Media Services to transcode your video to different qualities / formats so you can do Adaptive Bitrate Streaming, which means that depending on the quality of the connection and the device type, you will always have the "best possible" video on every type of device with the lowest bandwith usage. According to this talk this requires a "smart player" with the logic to do the switching between quality levels. In the talk the azure media player is mentioned as the go-to video player because it has support for Adaptive Bitrate Streaming (ABS) from azure media services.
It does not mention other players with ABS compatibility.
The transcoded video in the sample is played with Azure Media Player, which is hosted in a WebView. And since this talk was from 2018 and in a very recent release of Xamarin Forms (5.0) they have removed support for UIWebView and replaced it with WKWebView and I'm not sure if the WebView (and thus the video player) used in the sample is still supported / advised.
Custom Renderer
The Xamarin Forms documentation has a section "implementing a video player" where they give you a sample video player in the form of a custom renderer. I like that they allow you to style the transport controls yourself.
It is not mentioned if this video player has the same "smart switching" like the azure media player.
Use vimeo
With a paid subscription you can apperently secure the access your content. The styling of the player is limited, but maybe enough for my purposes. They do the content encoding / smart switching in the player for you. You pay a monthly fee, and have a limit on how many video minutes you can add each month, but no other bandwith / storage costs (as far as I can see).
Quick and dirty (naive?)
I can upload an mp4 to azure blob storage and use the customer renderer sample to playback the video directly from the blob.
This however would mean that there is no dynamic switching of video quality on the client and they would always consume "full bandwidth".
I am new to video transcoding / streaming.
Am I missing something in my analysis?
I would definitely go with option 2 because:
It's recommended by Xamarin and Microsoft.
It's free!
Taking adventage of the native implementation, you would be using the full potential of each platform and you can display videos from any source, local videos from the phone or the project or from YouTube, Vimeo, etc (as long as they are public videos).
Easy to use.
It's easy to customize because you handle the native code, that means you are in charge and not some WebView or someone else library.
I would discard the other options because:
Option 1 might be a good option, but you're consuming Azure and eventually it will cost you or your client money and use a WebView to display a video it's not very friendly from the UX point of view.
Options 3: I would definitely discard a paid solution if I have other options, specially if the other options are free.
Option 4 as same as before, you would be consuming Azure time and process, that lead you to lose money, if you want to upload a public video always upload to YouTube or some similar service, but as you said, consume the video from a native video player is the best option.
And by last, check this official sample, is more updated than the docs.
P.D: it's, custom renderer, not customer renderer ;-)
I've managed to download the hls from a website I've legally subscired to and am trying to save the videos for offline playback on my computer because the buffering is way too slow and doesn't allow me to shuffle through content quickly.
Is there a way to decrypt the downloaded hls stream file by feeding it with the online feed of the website or can it be read somewhere in the site's code itself?
Is there another way to capture the videos? By maybe tapping the buffer feed?
Although I haven't found an app yet that can do this. I usually used video download helper but that doesn't work anymore with encrypted hls streams.
Is it possible to use the GNSDK recognition feature within a video camera application? Ie, starting to record a video would concurrently trigger the GNSDK recognition function.
GNSDK does not work with video. You need to feed decoded audio stream to GNSDK. As long as you provide the correct audio data, when or how you start the recognition is totally up to you, the developer.
I am getting started with the youtube api but was wondering is a few things:
do i need to upload the video the youtube or can i just use it's
player?
if it does require me to upload to youtube, performance wise it
it better?
if i do upload to youtube can i make the videos private so they can
be viewed from my site only without being accessible through youtube
it self?
do i have limits on the number of videos i can upload, or the number
of playlists i can create?
can i get the video thumbnail using the api?
sorry if it appears random, thanks.
You have to upload it.
Assuming the clients are scattered around the world: yes, youtube will perform better than your own solution. If the clients are all within your building, on your network, then .. maybe. Depends on what you have hosting it, how many simultaneous and far more questions than is feasible to type out here.
More to the point on this one, if YouTube is serving the videos then you don't have to worry about that bandwidth coming from your server which may be important in terms of cost and bandwidth you need.
Yes. See https://developers.google.com/youtube/2.0/reference for some details about "authorized" requests.
The only limitations have to do with the length and size of the video. If you need videos longer than 15 minutes or 2GB then you need to request authorization. http://support.google.com/youtube/bin/answer.py?hl=en&answer=71673
See How do I get a YouTube video thumbnail from the YouTube API?
We have a need to stream live audio from remote devices and be able to listen to it in a web page. I can stream stored audio files, but the live stream has me a bit confused, since we will be adding the data at runtime. Can someone point me in the right direction to show me how to do this?
Thanks
Two things:
If all you want is simple streaming, that is, progressive download, then just define the mime type on the server, and it will stream. Keep in mind that you will have to have an audio format that plays progressively (most, but not all these days, do).
If you're looking to take fine control over what's going on, you'll need to embed an audio player and use a media server SDK. Here is the link to Microsoft's product for this: Windows Media Server SDK.