Streaming RTMP(E) videos to Android phones - G1 Apps and Games

A lot of popular video streaming sites are still using Flash and RTMP to serve their videos. These are always embedded in an FLV container. Currently Android doesn't natively support RTMP or FLV format, but it does support RTSP for streaming.
I recently patched solid RTMP support into ffmpeg, and have now succeeded in getting RTSP working as well. So if you have a machine with decent network connectivity, you can install ffmpeg/ffserver and make it act as a proxy/relay to grab RTMP videos and republish them on RTSP for viewing on your phone.
I've posted the details here
http://forum.xda-developers.com/showpost.php?p=6495551&postcount=8
as a proof of concept. It should be pretty easy for someone else interested to turn this into a polished app. Enjoy...

Related

Stream Video & Music On the Fly

For the past few weeks I've been looking into different media servers to stream video to my android devices without re-encoding each video for mobile use. I tried TVersity, but I wasn't able to get the streaming to work. Lately I've been using Subsonic to stream everything and it's been great. It streams any type of video through a flash player on the fly. It's also very easy to install and even works outside of your home network. The amazing thing is how fluid this flash player works on the G-Tab. Coming from a rooted Pandigital Novel, this device's video and flash playback capabilities keep amazing me. If you are looking for a media server application to stream video, I'd highly recommend subsonic. What other media servers does everyone use?
I use Twonky Server on my Netgear ReadyNAS Duo and Twonky Mobile on my Gtab. Works great.

Video Player with Chromecast Support

Am I correct in thinking there is no video play with chromecast push support? I.e. MX Player, you are watching video on phone then you press cast button?
Not possible or just no app has done it yet?
Avia has paid ($2.99) CC support.
Sent from my Galaxy Nexus using xda app-developers app
There is an app called y2cast which can cast videos to the Chromecast together with an app called Moliplayer. The 1. problem of this is that everytime you turn on your TV, you have to connect y2cast with your Chromecast before you can start casting via Moliplayer and the 2. is that Moliplayer doesn't play every file format (even when you haven't connected it to the Chromecast) and is also very slow/has a lot of lag.
---------- Post added at 03:43 PM ---------- Previous post was at 03:27 PM ----------
Does Avia play every file format and can avia cast every file format to the chromecast?
There are loads of apps now that will play media from phone to Chromecast - BubbleUPnP is my personal choice, Allcast, Localcast, Avia....there are more.
They vary in their capabilities - most can't cast videos that are not encoded in a Chromecast friendly format. BubbleUPnP can with the help of a Bubble Server installed on a PC on the local network.
neu - smurph said:
There are loads of apps now that will play media from phone to Chromecast - BubbleUPnP is my personal choice, Allcast, Localcast, Avia....there are more.
They vary in their capabilities - most can't cast videos that are not encoded in a Chromecast friendly format. BubbleUPnP can with the help of a Bubble Server installed on a PC on the local network.
Click to expand...
Click to collapse
Well then you could just cast the video in a tab via Chrome. I'd love to see a solution where an android device does that, most of the devices are probably capable of doing it.
Pete1612 said:
Well then you could just cast the video in a tab via Chrome. I'd love to see a solution where an android device does that, most of the devices are probably capable of doing it.
Click to expand...
Click to collapse
Share the page to either vGet or Web Video Caster, and cast from there.
It's one extra step - sharing the link - but it works great for supported video formats.
vGet has more options and is a paid app. Web Video Caster just casts and is free.
EarlyMon said:
Share the page to either vGet or Web Video Caster, and cast from there.
It's one extra step - sharing the link - but it works great for supported video formats.
vGet has more options and is a paid app. Web Video Caster just casts and is free.
Click to expand...
Click to collapse
for thus you can also use chrome for android (free from google obviously), go to chrome://flags and turn on chromecast support
Avia does NOT work on all formats. It's a bit of a hit and miss. Some work some dont
The moment everyone is waiting for is for mx player or vlc to support Chromecast !
I think that the limitions are not in the players but in the software of ccast that can play only a few format and codecs.
Do you think that, in future, ccast will be updated and so it will play other video format? Is a feature that can be implemented with a firmware upgrade?
Thanks!
davboc said:
I think that the limitions are not in the players but in the software of ccast that can play only a few format and codecs.
Do you think that, in future, ccast will be updated and so it will play other video format? Is a feature that can be implemented with a firmware upgrade?
Thanks!
Click to expand...
Click to collapse
Yes and Maybe....
You're right in that the CCast is limited in codec and container support.
But that is really only true if the Player app that gets loaded into CCast relies on the CCast hardware to play the files.
Android itself is almost as limited as the CCast is as far as Compatible file formats are concerned but the video players we use on Android add the support for those different codecs and container types into the APPs themselves.
The same could be done on the CCast side and BubbleUPnP seems to be the one (and Only) app that has gone the farthest in doing that.
All the others seem to just send whatever format the file is in and if it isn't CCast compatible it won't play.
What needs to happen is for someone to create an MX Player type CCast Player app that can play many Container and Codec types without the need for Transcoding. Then others could potentially use that Player App (think along the lines of a JW Player type CCast Application) when sending Media to the CCast without the worry of incompatible file and codec format.
Or Google needs to create it and add it to the CCast OS as the default player.
As of now there is no option close to that...Bubble supports more container types than others and in conjunction with the Bubble Server will transcode the ones it doesn't support.
Plex seems to transcode everything that isn't directly CCast compatible and the other Player Apps we have for Android don't deal with Compatibility at all they merely send the media to CCast and it works only if it is compatible.
Perhaps in time they will add to the CCast Player side to gain more support but Bubble is so far the only one to really focus as much on the Player side compatibility expansion and features.
Plex is working on it as well but they are less focused on Compatibility due to the fact they are able to transcode everything to whatever format they want. After they get all the transcoding perfected they might turn focus into finding ways to avoid transcoding for those who have issues due to low power servers.
Asphyx said:
...
Click to expand...
Click to collapse
perfect explanation! Really thank you. I hope that this device will be supported with the right software, meaning apps, in the near future.
Thanks again.
davboc said:
perfect explanation! Really thank you. I hope that this device will be supported with the right software, meaning apps, in the near future.
Thanks again.
Click to expand...
Click to collapse
The problem right now seems to be that every App creates their own CCast Player App (called the receiver) but the DIAL protocol really doesn't require that to happen.
If the Open Source community would create a FREE TO USE Player App for CCast that any Android (or iOS app for that matter) could have the CCast load You might see a situation where all players could use that app to play to CCast and remove the need to code a Player themselves.
The only reason to code your own player then would be if you wanted to add other features like Media Info Mirroring and if the Player was Open Source it could be used inside their custom versions as well provided there is no issue with GPL license and Commercial Use.
the CCast support has come a long way since December...
I hope by next December we see more after people figure it out better.
The holdup is Google Locking it all up with the Whitelist.
I keep looking here hoping to find a developer that has decided to work on a CCast Player side to bring full client side support that others can use.
So Far Bubble is the only one focused on that side of the coding.
In the end the CCast player should support any container, Most Codecs, Client side selectable Subtitles and Multitrack Audio with Client side selection as well.
If they could add Dolby Support (not likely given the Licensing requirements) it would set the bar for all the others.
Localcast works well for me. Even let's me access and stream movies/TV shows straight from my USB stick on my Note 2 using an otg cable.
Sent from my Sinclair ZX81.
Koush tried software decoding for H.264 video - the processor ran hot enough to destroy his Chromecast, and that was using a known and mature routine.
The MediaTek processor is very good but it has limitations.
Maybe someone will take it further and succeed. I think it's more reasonable to look for more codecs on Chromecast 2, if at all.
Btw, LocalCast now lets you use your phone for headphones for stuff you're casting.
Not doubting you here...I know the Hardware is close to being an Egg Cooker even under normal usage....
But I'm curious as to why would he software decode H.264? No need to do that as it's already supported.
I'm just wondering if he was trying to do transcode from unsupported codec to H.264 on the device.
That method I would expect to not work at all.
But by adding loadable Software codecs it should not require the same proc cycles and speed as trying to transcode as it's really just a decoding operation which is roughly half the intense of transcoding which both decodes then re-encodes.
The Tricky part would be getting the player to load codecs on an as needed basis which is where I expect it might make the approach impossible.
I'm personally less concerned with codec support as I am with Containers, Subtitles and Audio Track selection being done on the Player side.
All of my Library is already H.264 But I much prefer MKV container for keeping Subs and Multiple Audio (for Commentary) so once a player comes out that supports all of those without transcoding I'll be a very happy puppy.
I don't know but I imagine that he was simply following a standard best practice -
Comparing known quantities to map the solution space before proceeding into the unknown.
The H.264 routine (just a software codec attached to a simple player from what I recall looking at the time) made sense for that, precisely because it was a mature, known quantity that could be compared to the existing feature in hardware.
Apples to apples.
perhap he tried that since H.264 is the most hardware intensive compression compared to say On2, Cinepak or the older Indeo...
If it could software decode H.264 then it could pretty much decode everything else just fine with the exception of MPEG2 which requires specific hardware.
Asphyx said:
What needs to happen is for someone to create an MX Player type CCast Player app that can play many Container and Codec types without the need for Transcoding. Then others could potentially use that Player App (think along the lines of a JW Player type CCast Application) when sending Media to the CCast without the worry of incompatible file and codec format.
Click to expand...
Click to collapse
Are you saying if a player i.e. MX player had the cast function builtin into it then you can cast any video format that MX player supports?
ermacwins said:
Are you saying if a player i.e. MX player had the cast function builtin into it then you can cast any video format that MX player supports?
Click to expand...
Click to collapse
That's what a lot of people want.
ermacwins said:
Are you saying if a player i.e. MX player had the cast function builtin into it then you can cast any video format that MX player supports?
Click to expand...
Click to collapse
No not at all.....an App's (aka Transmitter) ability to cast to a CCast has little to do with it can support but what the CCast supports....Other than through the player app it tells CCast to load to receive the stream (aka the Receiver app).
Every App tells the CCast to load a player and it is that player that determines what format can be played not what the App that started the cast supports.
So even if MX Player supported CCast now...Doesn't mean at all that streaming from it to a CCast means MKV or MOV files will play on the CCast despite the fact they play in MX Player just fine.
That is unless MX Player wrote a custom player (receiver) for the CCast that supported all the formats MX Player does or MX Player added the ability to transcode any format to work with the receiver they load into the CCast.
As of today just about every app that supports more than just the standard CCast compatible media do so via Transcoding.
And thats not likely to change soon unless someone figures out a way to do it without frying the unit.
I bet it would work a lot better if the player app was run outside of the Google Sandbox the way Netflix is when it does it's own decryption.
The question is will anyone other than one of the Partners who invented the DIAL protocol ever get that type of access to the hardware?
Not without Google being fully on board....

[Q] why is google shying away from playing all video formats in chromecast??

hi
has any one got an opinion why chromecast despite having the required hardware to play many more video formats is not given the ability to do so??
mahi98 said:
hi
has any one got an opinion why chromecast despite having the required hardware to play many more video formats is not given the ability to do so??
Click to expand...
Click to collapse
Licensing of Codecs for one....
Understand that CCast is really meant to be an HTML5 appliance so it is built to play anything that is HTML5 compatible and that leaves a lot of codecs off the supported list because they are old and inefficient or not suited for streaming over WiFi.
The device is simply not meant to be a ROKU, it is a device that is meant to put Web content onto a big screen and not much more.
If you want more features and video support then AndroidTV is probably the device you are looking for.
It's not like Roku plays a lot of formats either - just mp4 with the standard expected codecs and a small subset of mkv files that happen to be compatible.
I just don't worry about it. I mostly play downloaded files via Plex, relying on Plex to do the transcoding. I only check out the actual file format if Plex seems to be stumbling over some HD file with a rare slow codec. In that case I run it through a video converter utility with hardware GPU acceleration on my desktop PC that can convert a 1-hour video to standard mp4 in about 60 seconds. Problem solved.
DJames1 said:
It's not like Roku plays a lot of formats either - just mp4 with the standard expected codecs and a small subset of mkv files that happen to be compatible.
Click to expand...
Click to collapse
Aren't mp4 and MKV containers? Meaning two different mkv files could use two different codecs (the reason why *some* mkv files are compatible and other are not).
Like you, I use Plex or Allcast and let them do the transcoding. I haven't run into many issues with this approach.
That's correct, but you'd find that most mp4 files today consistently use H.264 as the video codec and stereo AAC as the audio codec. It's possible to use other codecs in an mp4 files, but with so many devices that will play standard mp4s and most of them choking on any unexpected codec it's just easiest to stick to the standard. mkv files tend to have more variety, so a large percentage of them will fail on devices like the Roku or Chromecast that support a very narrow range of codecs and format variations. For example an extra track of chapter marks or an extra audio track will cause many devices to fail even though these are allowed within both the mkv and mp4 container format.
DJames1 said:
It's not like Roku plays a lot of formats either - just mp4 with the standard expected codecs and a small subset of mkv files that happen to be compatible.
I just don't worry about it. I mostly play downloaded files via Plex, relying on Plex to do the transcoding. I only check out the actual file format if Plex seems to be stumbling over some HD file with a rare slow codec. In that case I run it through a video converter utility with hardware GPU acceleration on my desktop PC that can convert a 1-hour video to standard mp4 in about 60 seconds. Problem solved.
Click to expand...
Click to collapse
Yes but the main focus of the Roku is for Alternative video where as the CCast will play video but is designed more as a Web Content device.
This is why the Roku all have wired network connections (recent dongle excluded of course as it is meant to compete with CCast.)
Roku supports more merely because it has the App support.
There is nothing to stop someone like MX Player from making a receiver app that will add codec and container support to the CCast.
What is keeping some developers away is the convoluted discovery and control protocol needed.
Roku doesn't need any of that so they can just focus on the player code cause the remote does the navigation for them.
And in time as more support for the CCast comes around you will find that killer receiver app made that supports more codecs and containers and if the folks at plex are smart they will either license it or make it themselves!
99% of their complaints could all be handled better and go away with a little work on the player side.

video streaming PC vs Android

hey guys,
basically ive noticed that when im stream a video from my nexus 5 to my chromecast the video streams straight to the chromecast rather than stream to the nexus and then to the chromecast. In the same way that when you use the youtube app it casts directly. My question is, is there any way to have this arrangement from my mac/PC.
the website in question is a popular movie stream site.
cheers in advance
Long story short, when apps are developed for the Chromecast, a virtual webpage with the video stream is opened in the Chromecast and then the video is streamed directly into it. Simple, right?
However, when a video appears on your screen in a site not optimized for the Chromecast, the Google Chrome extension must copy the contents of your tab (that are receiving a streamed video already) into a new stream that is sent to your Chromecast with your pc as a server. This is why it's slow as dirt.
There really is no easy solution, besides
1) writing it yourself (possible but improbable and unfeasible)
2) begging the website developers to do it (and if the site is illegal, Google Corporation can censor the app or site anyway),
3) downloading the movie beforehand and use something like Plex, or
4) purchasing a video streaming service made by a corporation that has made agreements with Google Corporation and is Chromecast compatible, like Netflix or... Netflix.
I opt for ripping my DVDs, converting them to movie files with Handbrake, putting them on my laptop Plex server, and casting them from there. But that's just me.
primetechv2 said:
Long story short, when apps are developed for the Chromecast, a virtual webpage with the video stream is opened in the Chromecast and then the video is streamed directly into it. Simple, right?
However, when a video appears on your screen in a site not optimized for the Chromecast, the Google Chrome extension must copy the contents of your tab (that are receiving a streamed video already) into a new stream that is sent to your Chromecast with your pc as a server. This is why it's slow as dirt.
There really is no easy solution, besides
1) writing it yourself (possible but improbable and unfeasible)
2) begging the website developers to do it (and if the site is illegal, Google Corporation can censor the app or site anyway),
3) downloading the movie beforehand and use something like Plex, or
4) purchasing a video streaming service made by a corporation that has made agreements with Google Corporation and is Chromecast compatible, like Netflix or... Netflix.
I opt for ripping my DVDs, converting them to movie files with Handbrake, putting them on my laptop Plex server, and casting them from there. But that's just me.
Click to expand...
Click to collapse
Hey primetechv2,
Please excuse my ignorance but I don't understand how can an android app like 'web video caster' can take a normal html page (not optimized for mobiles), find an embedded video and send it to Chromecast to play it directly on Chromecast. Using the same logic, a' browser app' could be designed for PCs which finds the embedded video link in a html page. The video link is then sent to the chromecast (via chrome browser if thats the only way) and a virtual page is opened in the chromecast (as you mentioned in case of mobile apps) and video is played on your chromecast. Please note that we don't want our computer to be used as a server to stream the video to Chromecast. Instead just a link to the video is extracted and is sent to the chromecast.
Am I missing something obvious here?
I don't have a perfect answer because I've never developed media apps for the Chromecast in Android, but it has something to do with the difference between writing an app that runs in Android versus one that runs on Chrome.
On Android, apps have direct access to files on your phone. They can read the files and transfer the data across a network to any device, such as a Chromecast, via a simple API.
On Chrome, for obvious security reasons no random webpage can just hijack your local filesystem. There's a chance that if media was loaded, it could be streamed via a socket or some advanced Javascript magic, but I've never seen any app that does this.
Often, apps will leverage the ability of a PC to behave as a web server, where files CAN be accessed on request and then sent to webpages. Unfortunately, Google Cast restricts Receiver pages being displayed on their hardware unless they're on a rather limited whitelist, so only domains that hvev registered with Google (e.g. http://plex.tv) can have a receiver page displayed on your Cast.
That's sorta the explanation for why apps like BubbleUPNP "hijack" Windows as a media server and as a transcoder.. As long as Android can pull transcoded media back, or perhaps allow access to the transcoded media via the Internet on a registered webpage, I've never set one up, so that's all conjecture. But I'm pretty darn sure a PC has a lot more processing power than an Android device. And when you want to send unsupported-on-the-Chromecast media from a phone to the Cast, you have to manage both the transcoding AND the streaming.
enmbs said:
Hey primetechv2,
Please excuse my ignorance but I don't understand how can an android app like 'web video caster' can take a normal html page (not optimized for mobiles), find an embedded video and send it to Chromecast to play it directly on Chromecast. Using the same logic, a' browser app' could be designed for PCs which finds the embedded video link in a html page. The video link is then sent to the chromecast (via chrome browser if thats the only way) and a virtual page is opened in the chromecast (as you mentioned in case of mobile apps) and video is played on your chromecast. Please note that we don't want our computer to be used as a server to stream the video to Chromecast. Instead just a link to the video is extracted and is sent to the chromecast.
Am I missing something obvious here?
Click to expand...
Click to collapse
It can do it only because the App or Site is written to support the CCast specifically where many other sites are not.
So lets cite examples of what I mean....
Web Video Caster is a CCast app that has a Player/receiver the CCast loads that can accept links from the app to display on the unit.
In the case of Websites the Embedded Player they use to play the Video has this support built in.
ESPN uses JWPlayer Pro for their site videos which has CCast support built in. JW Player has it's own Player/Receiver that gets loaded into the CCast to facilitate this.
You Tube has it's own receiver actually ON the CCast that also is similar to the JW Payer.
I believe both require the Browser you are using to be CCast aware using either an extension like GoogleCast for Chrome to let the site know to display the CCast icon. (I may be mistaken but I believe Firefox now has this capability built into the browser)
So it really is a combination of the player the site uses and the Browser that determines if CCast Support is enabled.
But in the end ANYTHING that is sent to a CCast DIRECTLY has to have a corresponding Player/Receiver app written for the CCast to send the linkage to.
It will take some time but I suspect in the future, Most of not ALL embedded players used by Websites will add this functionality in time.
Which is really all about the drive to become HTML5 compatible as much as any desire to support the CCast.
Asphyx said:
It can do it only because the App or Site is written to support the CCast specifically where many other sites are not.
So lets cite examples of what I mean....
Web Video Caster is a CCast app that has a Player/receiver the CCast loads that can accept links from the app to display on the unit.
In the case of Websites the Embedded Player they use to play the Video has this support built in.
ESPN uses JWPlayer Pro for their site videos which has CCast support built in. JW Player has it's own Player/Receiver that gets loaded into the CCast to facilitate this.
You Tube has it's own receiver actually ON the CCast that also is similar to the JW Payer.
I believe both require the Browser you are using to be CCast aware using either an extension like GoogleCast for Chrome to let the site know to display the CCast icon. (I may be mistaken but I believe Firefox now has this capability built into the browser)
So it really is a combination of the player the site uses and the Browser that determines if CCast Support is enabled.
But in the end ANYTHING that is sent to a CCast DIRECTLY has to have a corresponding Player/Receiver app written for the CCast to send the linkage to.
It will take some time but I suspect in the future, Most of not ALL embedded players used by Websites will add this functionality in time.
Which is really all about the drive to become HTML5 compatible as much as any desire to support the CCast.
Click to expand...
Click to collapse
Thanks Asphyx, It makes sense now :good:.

Best Chromecast app for android

Hey guys, i'm looking for best android apps to stream videos to chromecast. The problem is that most of them only support mp4 files. I found only one that supports all file formats, it transcodes the file on the fly on your phone and streams directly to chromecast. its called Megacast. Does anyone know anything similar?
I usually just stream from es file explorer
Sent from my Nexus 6P using Tapatalk
BubbleUPNP and Localcast
Sent from my VS985 4G using Tapatalk
Yeah bubbleupnp is q pretty solid app, especially with transcoding for Chromecast.
Sent from my Nexus 6P using Tapatalk
Whats the difference compared to screen mirroring? At least compared with ES Chromecast Player the screen mirroring runs much smoother.
Solid Explorer is IMO by far the best I have used. Plays anything from anywhere. 1080p is laggy, but everything else I throw at it works fine. Streaming from phone, NAS and ftp...
Sent from my Nexus 6P using Tapatalk
I think people are missing the point of the question about transcoding. While there are many good Chromecast-enabled video players on Android (e.g., Avia, AllCast, BubbleUPnP, LocalCast, Plex, AllConnect being just the few that I have on my tablet), mostly they don't support on-the-fly transcoding because phone processors simply aren't up to handling the task smoothly yet, and it would drain battery power at an alarming rate if they could. Some like Plex and BubbleUPnP support transcoding using a remote server. But really it's easier just to transcode all your videos to a common mp4 format that's compatible with everything instead of worrying about on-the-fly transcoding.
DJames1 said:
I think people are missing the point of the question about transcoding. While there are many good Chromecast-enabled video players on Android (e.g., Avia, AllCast, BubbleUPnP, LocalCast, Plex, AllConnect being just the few that I have on my tablet), mostly they don't support on-the-fly transcoding because phone processors simply aren't up to handling the task smoothly yet, and it would drain battery power at an alarming rate if they could. Some like Plex and BubbleUPnP support transcoding using a remote server. But really it's easier just to transcode all your videos to a common mp4 format that's compatible with everything instead of worrying about on-the-fly transcoding.
Click to expand...
Click to collapse
Sometimes, just the audio track of videos must be transcoded (DTS, AC3) and Android devices are powerful enough for this task (which BubbleUPnP can perform locally).
There are lots of chromecast apps available over the web which you can install on your device. But I find an amazing list of best chromecast apps android. Why don't you check it out.
I like this one:
https://play.google.com/store/apps/details?id=com.videostream.Mobile&hl=nl
ViCast HD Google Cast (Chromecast) player
Guys, please try our new app
ViCast is a simple and stable HD Google Cast (Chromecast) player. Can be found on Google Play Market.
Enjoy casting your favourite media to the big screen!
We are working hard to provide you with a great opportunity to seamlessly watch your favourite HD movies. It’s highly optimized for streaming H.264 encoded videos and allows to play incompatible Google Cast media. Moreover, your media content will also be accessible via DLNA server.
SUPPORTED FORMATS:
Video: MP4, MKV, AVI, WEBM, MOV, WMV, MPG, 3GP, M4V.
Audio: MP3, AAC, FLAC, WAV.
Photo: JPG, PNG, BMP, WEBP, GIF.

Categories

Resources