Shoutcast stream buffering with Adobe AIR without using Flash/Flex player? - javascript

My application is written in Adobe Air & JavaScript and doesn't use Flash/Flex.
Air.Sound() is used to play (shoutcast) audio streams.
I'm looking for a solution (without using external Flash/Flex players, coz) that can preload (buffer) a few second of audio stream to avoid playback lags and keeping memory usage low.

As far as I know Air 2.5 added Audio and Video html5 tags.
For shoutcast and html 5 audio see this question
Edit: Apparently AIR left out the audio/video tags (because they are an alternative to flash and you get flash on AIR - the way adobe looks at it). So I think the answer is you can't do it without flash. Even if it had the audio tag you'd most probably need to tweak the output streams from the server.

Related

how to create a web player with ffmpeg and javascript?

how to create a web player with ffmpeg and javascript if possible the source code for the web player
without using adobe flash player or HTML 5
Using ffmpeg to show videos in HTML 5 is a huge task. ffmpeg is not written in Javascript and you cannot use it for displaying videos in HTML directly.
However, there is a project named Emscripten that convert LLVM to javascript. Another project called Videoconverter.js uses it to convert videos formats in Javascript. But it cannot be used for playing videos.
Even if you can do it, it will not be efficient at all. Browsers that support Video tag use GPU acceleration, Flash uses GPU accelerations too. So the video play smoothly.
execffmpeg.js allows you to execute multiple consecutive ffmpeg commands with file piping in the browser, and then play the output video files in the browser.

Video playback in HTML/JS AIR app

Is it possible to play H.264 HD video in an HTML/Javascript (no Flash) AIR app with hardware acceleration support? I can't seem to find any resources or tutorials.
I've been able to play FLVs using the AIR Javascript API, but with mediocre performance; and I'd rather use H.264 anyway.
Thanks,
Wayne
If I'm not mistaken (I'm having similar problems), AIR simply doesn't support the tag.
You can use the netstream class and mp4 video files

how to find if browser support flash players by coldfusion or javascript?

I want to put one audio player in my website. For that I need to know if user's browser have flash player installed. Otherwise I will use different player to play audio file(.wav).
I will be glad to know its solution by either javascript or coldfusion. Thanks!!
Take a look at Adobe Flash Player Detection Kit. It includes client side detection using javascript.

Video encoding for websites

I am a little new to embedding videos on a website. What is the best way to go about it? I just started reading up on it.
I read that I should use HTML5 and the browser's native player. -- Does anyone know of a javascript library that will use the browser's player and detect if the browser is not using HTML5 to downgrade to a flash player?
As far as encoding what is the best approach? I am planning on writing a little console app to use FFMPEG to convert the videos. But what encoding should I use? I heard H.264 is promising? But
This is what you're looking for: http://videojs.com/
Encoding wise, I think H.264 and WebM is a wise choice. That way you'll satisfy all modern browsers and mobile devices (incl. iOS and Android), and only fall back to Flash for older, pre-HTML5 browsers (and FF 3.6, which only supports Theora.)
The DIY approach would be to use the Video For Everybody embed code. That will lead with HTML5 video and fallback to flash.
Then for video encoding, you can use FFmpeg like you said.
To make your life easier, you should check out VideoJS for your HTML5 video player. It handles a lot of cross browser issues and some extra features that browsers don't support yet.
For video encoding, if you're planning to use FFmpeg specifically for automating encoding, you should check out Zencoder's video encoding API. It could save you some set up time and compatibility issues.
For codecs, #1 priority should be h.264, specifically using the baseline profile so it will work on smartphones. After that, ogg and webm are both good choices. WebM is higher quality for file size, but Ogg can be viewed by way more users because older version of Firefox support it. And just to note, if you only do h.264, the Video For Everybody code won't fallback to Flash in Firefox and Opera (that don't support h.264) so you'll need to use a player like VideoJS.
Use Handbrake for video encoding, especially for HTML 5 support.
HTML 5 is an awesome way of embedding video, however it hasn't been standardized yet. You definitely want to use it if you're supporting iOS devices, as they of course don't support Flash which is the most mainstream way of embedding video.
HTML5 is pretty awesome because this is how simple it is:
<video src="video.m4v" />
Here is a fantastic link you will find useful:
http://www.robwalshonline.com/posts/tutorial-serving-html5-video-cross-browser-including-ipad/
I read that I should use HTML5 and the
browser's native player
Which idiot told you that? Given that you will loose out on a significant portion of the client population you either run a monoculture of HTML 5 browsers, of whoever said that should be serving burgers at McDonalds, not give advice to people. HTML 5 and the integrated player are nice, but not there yet for the general public. In a couple of years, yes. Now - if I hire a web company for putting videos on a website and they do that, they get sued for gross neglect and incompetence.
Today, playback is mostly flash - that has a high penetration. A flash video player is also what sites like youtube currently use. If you go for less (penetration), Silverlight is very good and has the complete backend infrastructure.
I heard H.264 is promising?
So what? FIRST you need to fix the playback side, then you use whatever format is most efficient given your playback decision.

Is there a way to play a video without Flash Player?

Is there a way to play video on a webpage with javascript without Flash Player ?
HTML5 will support video playback via the <video/> element. See here for more details, and here for implementation details.
You can always embed Windows Media, Real Player or QuickTime directly into your page. There's also Silverlight, if you're simply looking to avoid Flash. If you don't care how it looks, you can build a low quality player in Java. On some browsers, there's the HTML 5 video tag, but there's no real standardization on CODEC just yet.
There's always the poor man's alternative of just loading a bajillion individual frames as .gif/jpg/png and having javascript display them in sequence. It would be absolutely horrible for bandwidth and memory usage, and of course no audio, but it would (somewhat) simulate video being played.
Of course, on Windows platforms, you could use ActiveX and/or embed media player and play avi/wmv files as well, without ever touching flash.

Categories

Resources