xamarin tvos live broadcast - xamarin

I try to play live broadcast video on xamarin.tvos app, but not found the any solution(i see all live streaming solutions).
How to play live broadcast video(ex. rtmp) on xamarin.tvos app?
thnx all.

Apple does not natively support RTMP (Real Time Messaging Protocol) in their OSs (iOS, tvOS, macOS). HTTP Live Streaming (HLS) is natively supported (RFC8216).
There are a number of 3rd-party RTMP libraries (OSS, dual license and commercial/proprietary) that will work on the various Apple OSs.
A Few Examples:
SGPlayer (LGPL as it uses FFMPEG)
VideoKit (Dual license / GPL and Commercial)
VLC (GPL)
SmarterStreaming (Dual license)
etc...
There are many more libraries with all the core transcoding done in C/C++/ObjC (some have Swift framework wrappers) so you can consume them via a Xamarin.iOS binding library. Google/Bing is your friend...

Related

Xamarin.MediaManager RTP STream

I have a Xamarin app that works using MediaManager and plays video content as needed, however I need to also play RTP/RTSP streams not just Http streams. I have tried and it dosn't seem to work on IOS/iPad (required device), has anyone seen this working?
The github repo says it should work but I can't seem to get it going.
<forms:VideoView x:Name="videoView"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand"
Source="rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov"
AspectMode="AspectFill" />
Plugin.MediaManager uses the native AVPlayer and thus RTMP/RTSP is not supported.
Apple does not natively support RTMP (Real Time Messaging Protocol) in their OSs (iOS, tvOS, macOS). HTTP Live Streaming (HLS) is natively supported (RFC8216).
Also see: https://stackoverflow.com/a/47596246/4984832
Send live and on‐demand audio and video to iPhone, iPad, Mac, Apple TV, and PC with HTTP Live Streaming (HLS) technology from Apple.
https://developer.apple.com/streaming/

play MPD file of mpeg-dash on android and IOS

I have used ffmpeg to create a MPD file for my video, and I could play and watch it on my pc using :http://dashplayer.azurewebsites.net/
now I want to make sure it works and plays appropriately on andoid and IOS, could anyone tell me how to test this file on android and IOS?
I'm not sure if you want web-based playback or native apps, so I'll try to cover both:
Android
On Android (depending on the version / browser) this should work fine.
Web
At least Chrome works, but also other browsers might. You will just need a web-player which supports DASH, e.g. Shaka Player, Bitmovin Player or dash.js.
Native apps
For native apps, you could use e.g. Google's ExoPlayer.
iOS
Assuming that you are using fragmented mp4 for your DASH content:
For iOS 10+ you could just create an HLS manifest and re-use the same segments as for DASH. For older iOS versions you will need to create MPEG-2 Transport Stream (.ts) segments plus the HLS manifest:
Web
For a web-based solution, there is currently no way to achieve MPEG-DASH playback on iOS as Safari on iOS does not provide the required JavaScript API, the Media Source Extensions (MSE).
Native apps
It could technically be possible to use MPEG-DASH, but Apple doesn't allow any other streaming format than HLS for content longer than 10 minutes, as stated in the App Store Review Guidelines:
2.5.7 Video streaming content over a cellular network longer than 10 minutes must use HTTP Live Streaming and include a baseline 192 kbps HTTP Live stream.

How to create virtual webcam in Windows 10?

I would like to take video from a webcam, render some text on the frames and do some motion tracking and pass it on to a virtual webcam so it can be streamed easily.
I found some answers on stackoverflow suggesting that I should use DirectShow. According to information in DirectShow documentation, the DirectShow SDK is part of Windows SDK. So I installed the latest Windows SDK but it seems that it doesn't include DirectShow because there are no DirectShow samples under C:\Program Files (x86)\Microsoft SDKs\Windows. (The stackoverflow answers are also pretty old - dated around 2010)
Can you suggest a way to make DirectShow work (including samples working on Visual Studio 2015) or some other alternative to DirectShow, that would help me create a virtual webcam?
Virtual webcam is typically a software only implementation that application discover as if it is a device with physical representation. The mentioned applications use APIs to work with web cameras and ability to extend the APIs and add your own video source is the way to create a virtual web camera.
In Windows there are a few APIs to consume video sources: Video for Windows, DirectShow, Media Foundation (in chronological order).
Video for Windows is not really extensible and limited in capabilities overall. It will see a virtual device if you provide a kernel mode driver for a virtual camera.
DirectShow is the API used by most video capture enabled Windows applications and it is present in all Windows versions including Windows 10 (except just Windows RT). Then it's perfectly extensible and in most cases the term "virtual webcam" refers to DirectShow virtual webcam. Methods to create DirectShow virtual webcam discussed in many StackOverflow questions remain perfectly valid for Windows 10, for applications that implement video capture using DirectShow:
Virtual webcam input as byte stream
Simulate a DirectShow Webcam
DirectShow samples were removed from Windows SDK but you can still find them in older releases:
Getting DirectShow Samples on Windows 8
If you provide a kernel mode driver for video camera device (your virtual webcam through custom kernel driver), DirectShow would also see it just like other video APIs.
Media Foundation is a supposed successor of DirectShow but its video capture capabilities in the part of extensibility simply do not exist1. Microsoft decided to not allow custom video sources application would be able to discover the same way as web cameras. Due to Media Foundation complexity, and overhead and overall unfriendliness it is used by modest amount of applications. To implement a virtual webcam for Media Foundation application you again, like in case of Video for Windows, have to implement a kernel mode driver.
1 Starting with Windows Build 22000 (Windows 11), there is new API MFCreateVirtualCamera which offers virtual camera creation. A developer can implement a video source which the API connects to so called Windows Camera Frame Server service, which in turn distributes the generated video as a source along with regular cameras. Applications see this software implementation the same way as if it was, for example, a webcam.
This is an ancient question internet-wise but I thought I could contribute:
I was looking into this about a year ago and almost abandoned my project altogether until I found Microsoft's SimpleMediaSource driver sample on their Github. It is documented here but it is a tough read if you haven't written drivers before - which was the case for me. Fortunately, documentation seems to have been updated and improved since I used it.
To get it working, I had to manually delete and copy-paste the DLL into C:\System32 after each compilation with Visual Studio. I also had to side-download and install the now removed (from what I can tell) devcon utility to add & remove drivers with devcon dp_add/dp_remove commands. You also need the Windows Driver Kit (WDK).
You need to enable unsigned driver loading within Windows so it may not be a great route if you want to distribute it. Anticheat and DRM software may also not appreciate it :)
There are two projects being compiled:
MediaSource - COM DLL project for the custom media source
SimpleMediaSourceDriver - UMDF driver install package
Just install obs studio
In newer versions it automatiaclly installs an easy to use virtual webcam that mirrors the OBS scene.

Windows 8 tablet streaming support

Does anyone know which video streaming delivery methods will be supported natively and within metro style apps on Windows 8 tablets (and also Windows Phone 8)?
I am hoping one of the following will be supported natively:
Apple HLS (Http Live Streaming)
Microsoft Smooth Streaming
RTSP streaming
I know Smooth streaming is supported in metro style apps, but I can't find any way of presenting links on my site which (if clicked) hand off video play back to the native video player.
Any ideas would be greatly appreciated.
Thanks,
There is no default player (like Windows Phone) on Windows 8, you will have to use some libraries.
Try this one:
http://playerframework.codeplex.com/

How to play H.264 video in a win32 window?

I came across a H.264 video which i would like to play in my c++ application. Could anyone suggest what could be the easiest way of doing it? Or What library can be used for the purpose.
Thanks in advance..
Windows API are DirectShow and Media Foundation (mind availability across Windows verions). You need a codec installed in Windows to be able to play the file, stock codec is only provided with Windows 7 editions. A choice of third party codecs is available.
Another option is to use a different framework such as ffmpeg which includes support for container formats and decoders.

Resources