Mp3 livestream with flash.media.Sound
Is it possible to listen via rtmp a live audio stream with the Sound class?
If yes, do you have some examples?
Or do I need to use NetConnection/NetStream?
Because this is a relatively minor issue, it's unlikely that we would prioritize it in a way that would give you a quick fix. It would end up behind a lot of higher-priority stuff.
If the issue is specific to this file, it's probably related to an encoding issue. It would be much faster to simply transcode it.
Similar Messages
-
Flash::media::Sound pthread problem
When i start these two thread together the application freeze.
Each thread on its own works !
#include <pthread.h>
#include <Flash++.h>
using namespace AS3::ui;
pthread_t audiothread;
pthread_t tickThread;
static var sampleDataEventListener(void *arg, var as3Args)
flash::events::SampleDataEvent event = var(as3Args[0]);
flash::utils::ByteArray data = event->data;
printf("info: sampleDataEventListener write zero---\n");
for ( unsigned int c = 0; c < 8192; c++ )
data->writeFloat(0.0f);
return internal::_undefined;
static void *sampleDataThreadProc(void *arg)
printf("Create sound object\n");
flash::media::Sound sound = flash::media::Sound::_new(internal::_null, internal::_null);
sound->addEventListener(flash::events::SampleDataEvent::SAMPLE_DATA, Function::_new(sampleDataEventListener, NULL), false, 0, false);
sound->play(0, 0, internal::_null);
AS3_GoAsync();
printf("Error: GoAsync returned!\n");
return NULL;
** Tick thread
void *tickThreadProc(void *colorArg) {
printf("TickThread start\n");
int i = 0;
while(i < 20)
usleep(80*1000);
printf("tick\n");
i++;
printf("TickThread done!!\n");
return NULL;
** main method
int main()
printf("init console\n");
pthread_create(&audiothread, NULL, sampleDataThreadProc, NULL);
pthread_create(&tickThread, NULL, tickThreadProc, NULL);
AS3_GoAsync();
return 0;
The application freeze with the output:
init console
Create sound object
TickThread start
tick
tick
tick
My build call is:
"$(FLASCC)/usr/bin/g++" $(BASE_CFLAGS) flash++ui.cpp -lAS3++ -lFlash++ -symbol-abc=Console.abc -pthread -O1 -swf-size=500x500 -emit-swf -o flashui.swf
My console.as can be found here: http://pastebin.com/ngkbcdYC
I tried to init the console in both ways (CModule.startAsync(this) and CModule.startBackground(this, new <String>[], new <String>[])) which doesn't make a diffrence.
I also tried to set the -swf-version=18 parameter, but it doesn't make a difference, too.
Anyone has an idea what is wrong ?
Thanks !It may be that the calls to printf() are causing the problem. The printf() function may or may not be thread-safe or reentrant, depending on the system. Perhaps you might enable printf in only one of the threads, run it, and then enable it only in the other thread, and see what happens (easy test to make). If you are more ambitious, you could wrap the printf calls in a mutex. Generally, some folks recommend doing an explicit flush...
-
Wowza with Flash Media Live Encoder
Video Quality Problem: Action Script netStream X Flash Media Encoder
Hi,
We're running Wowza to stream a live webcam from a Flex web application (using ActionScript 3 netStream method) for a 1 to 1 video chat.
We are able to stream it properly, but the quality does not look good at all (320 x 240, 300 Kbps, 15 fps).
We tried tweaking the paramenters (quality x bandwidth), but the quality is still surprisingly poor for a H.264 video.
Just out of curiosity, we decided to use Flash Media Encoder 3 to generate a live stream from the very same computer, with the very same webcam, at the very same video specs. The quality is much, much better than the one using the ActionScript 3 netstream approach. The difference is amazing!
So this leads us to believe that the problem is in the "encoder"; the Flash Media Encoder seems to be much for efficient in generating a high quality video stream, compared to ActionScript 3.
My question to you guys is: are we missing something? Are there any parameters on ActionScript 3 or even on Wowza that can increase the quality of video?
Installing Flash Media Encoder on each end user machine is impossible, so we really need this to work on the browser, via Action Script.
In other words: how can I make the quality of the video generated by ActionScript 3 be similar to the one we're able to achieve (remember: under the very same specs) on Flash Media Encoder?
Thanks in advance,
Julio Costa
[email protected]Hi,
That may not be possible with Flash Media Live Encoder directly. But you can use softwares like WebCamMax on Windows and CamTwist on Mac to add video affects while broadcasting with Flash Media Live Encoder.
You could refer to this post http://forums.adobe.com/message/2711776#2711776 .
For further help on Flash Media Live Encoder, you could post on http://forums.adobe.com/community/flash/flash_media_live_encoder .
Regards
Mamata -
Flash MX with Flash Media Server 2.0.1
Hello
I would like to know if I can use Flash MX with Flash Media
Server 2.0.1 ?
Thank youquote:
Originally posted by:
JayCharles
Yes.. you can.
But my old version of Flash MX show me an error message when
I try to open "CommunicationComponents.fla" which contain the
components of Flash Media Server 2.0.1.
My old version of Flash MX can't read this file and say
something like "Unexpected file format". -
Flash acces with flash media serwer
there is any sample/manual how to connect flash access with flash media serwer ?
Currently, there is no document explaining Flash Access interaction with FMS. Also, FMS and FAXS do not communicate. The client communicates with both.
For Video-On-Demand (VOD) assets, they are encrypted with a license and policy. The player connects to FMS to start streaming the file, once the player starts the playback, the policy kicks in, and then the player contacts FAXS using the licensing info in the file. So the player communicates with both FMS and FAXS – the servers don’t communicate with each other.
So FAXS (and FMRMS, which is what version 1.x was called) only worked for the VOD case. Now with FAXS 2.0 for Protected Streaming you can use DRM for both Live and VOD HTTP streaming cases – but not for Live RTMP streaming. Here’s the link for the Protected Streaming docs: http://www.adobe.com/support/flashaccess/pdfs/FAXS_3_0_ProtectedStreaming.pdf
Now with FMS 4.5, there is protected HTTP Streaming for Flash (PHDS) and iOS (PHLS). To configure PHDS/PHLS, you provide the DRM protection (w/SWF Verification support) without requiring the license server:
Read this document.
Let me know if you have any more questions. -
Need help with Flash media server
I am using XAMPP. Now i want to intall Flash media server. How can i configure my apache server to work with flash media server? I dont want to install the apache server coming along with flash media
Hi,
What excactly is the usecase you are trying here? Are using your external Apache to proxy your http traffic from FMS to it or do you want to use http streaming feature of FMS?
If you want to proxy it then use the following document : http://help.adobe.com/en_US/FlashMediaServer/3.5_AdminGuide/WSE2A5A7B9-E118-496f-92F9-E295 038DB7DB.html
Refer Configure HTTP proxying topic in the document. -
How to test streaming bandwidth on localhost with Flash Media Server ?
Hello,
I'm trying to debbug my code on Client side (Action Script 3) that works with Flash Media Server 4 on localhost. Everything seems fine up to that point.
However, when I'm trying to test my player with other remote streaming servers, I notice bugs because of lower bandwith transmission between the server and the player.
Is there a simple way to simulate lower bandwith with FMS4 on localhost (by config, application.xml, programmation...) ?
Thanks
Seb EthierThank you zarihs Rawna
Indeed, i have been with Server-Side ActionScript (SSAS) way. it's more simple, i think.
Well, here the step what i did :
Step 1 :
Make a file "main.asc" et copy & paste the code below.
- more info : http://www.peachpit.com/articles/article.aspx?p=31217
*main.asc*
var bandwidth;
application.allowDebug = true;
// Application callback functions
application.onConnect = function(client, user) {
//12800 = 100 Kbps
//64000 = 500 Kbps
//131072 = 1Mbps
//327680 = 2.5 Mbps
//983040 = 7.5 Mbps
//1966080 = 15 Mbps
//3932160 = 30 Mbps
//6553600 = 50 Mbps
//15728640 = 120 Mbps
bandwidth = 64000;
client.setBandwidthLimit(bandwidth, bandwidth);
trace("clientToServer = " + client.getBandwidthLimit(0) + " serverToClient="+ client.getBandwidthLimit(1));
application.acceptConnection(client);
trace("TEST");
Step 2 : Save the file under the folder underneath FMS's applications directory
Example : FMS\application\dyn
More info : http://www.flashcomguru.com/articles/fms2_basics.cfm
Step 3: Start the FMS server. If there is a problem, check the log file
Example : FMS\logs\_defaultVHost_\dyn\_definst_\application.00.log
Step 4 : (optional) Change the value of the variable bandwidth for your test. I put in comment some common internet connection speed converted in bytes.
That's all,
regards,
sethier -
Create a very simple mp3 player with flash
newbie with flash...
with the FLVPlayback component i can get a nice looking basic player for .flv files easily...
Q: is there some way to set up the same functions to create a very simple mp3 player with flash?Search Google for "Flash MP3 tutorial" and if you know which version of actionscript you plan to use, try substituting that for "Flash"
-
Image logo with Flash media Live Encoder
Hello, I am using Flash media live encoder 3.1 to broadcast to flash media server.
Its is possible place a image logo with the media live encoder??? How i can do this?? I like that my broadcaste have a image logo.Hi,
That may not be possible with Flash Media Live Encoder directly. But you can use softwares like WebCamMax on Windows and CamTwist on Mac to add video affects while broadcasting with Flash Media Live Encoder.
You could refer to this post http://forums.adobe.com/message/2711776#2711776 .
For further help on Flash Media Live Encoder, you could post on http://forums.adobe.com/community/flash/flash_media_live_encoder .
Regards
Mamata -
Playing mp3 over RTMP (Flash Media Server)
I've got some mp3 files that are served from a Flash Media Server. I want to write a Flex application to play them. Do I need to use NetConnection/NetStream or can I do it with just the Sound class? I've got a sample app that can connect to the stream with NetConnection/NetStream but I don't know how to connect the netstream data to something that will actually play the sound.
Will I be able to read the id3 data of the files with this?I actually got it working , let me know if that helps
Create NetStream and attach it to Video Control, then play();
@return void
private function connectStream():void {
// Assign a new Netstream Connection
if(_nsStream == null){
nsStream = new NetStream(ncConnection);
nsStream.addEventListener(NetStatusEvent.NETSTATUS, netStatusHandler);
nsStream.addEventListener( AsyncErrorEvent.ASYNCERROR,
handleCatchAllErrors );
nsStream.addEventListener( IOErrorEvent.IOERROR, handleCatchAllErrors );
_nsStream.client = {onMetaData:handleMetaData, close:handleCloseStream};
_nsStream.bufferTime = _videoData.buffer;
// Assign a new ID3 Netstream Connection
if( id3ns == null && _videoData.mediaType=="mp3") {
id3ns = new NetStream(_ncConnection);
id3ns.addEventListener( AsyncErrorEvent.ASYNC_ERROR,
handleCatchAllErrors );
id3ns.addEventListener( IOErrorEvent.IO_ERROR, handleCatchAllErrors );
id3ns.addEventListener( NetStatusEvent.NET_STATUS, netStatusHandler );
//HACK: we are required to pass in static duration via XML till we get
server-side actionscript working
metadata.duration=videoData.duration;
id3ns.play(_id3_path);
id3ns.client = {onId3:handleOnId3};
_id3Field = new TextField();
_id3Field.width = _video.width;
_id3Field.wordWrap = true;
_id3Field.multiline = true;
_id3Field.antiAliasType = flash.text.AntiAliasType.ADVANCED;
//_id3Field.defaultTextFormat = _ccTextFormat;
_id3Field.selectable = false;
this.addChild(_id3Field);
_video.smoothing = _playerData.smoothing;
video.attachNetStream(nsStream);
nsStream.play(videoData.file);
_isPlaying = true;
createSoundObject();
this.addEventListener(Event.ENTER_FRAME, onEnterFrame);
trace("[MEDIA FILE] "+_videoData.file);
Get MP3 data from ID3 tag
@return void
private function handleOnId3( obj:Object ):void{
if(obj["artist"] != undefined){
_id3Field.text = "by: "obj["artist"].toString() + "\n";
if(obj["songtitle"] != undefined){
_id3Field.text = "title: "obj["songtitle"].toString();
//if we wan to inject media with other data, add it here
for( var b:String in obj ) {
//_id3Field.text += b + ": " + obj[ b ];
//trace(b + ": " + obj[ b ]); -
Domain issues with Flash Media Server
I have a webcam streaming to Flash Media Server via the Media
Encoder. I have published the .swf file with the flash player and
rtmp://99.999.999.999:1935/live/livestream address to my website on
a hosted webserver.
When I am on another internet source, the player on my
webpage loads and works fine. However when I load the webpage in a
browser on the same network that has the Media Server and Webcam on
it, the browser freezes up.
I need some help with a solution that will cause the rtmp://
address to switch to a local host address. Any suggestions.quote:
Originally posted by:
JayCharles
Yes.. you can.
But my old version of Flash MX show me an error message when
I try to open "CommunicationComponents.fla" which contain the
components of Flash Media Server 2.0.1.
My old version of Flash MX can't read this file and say
something like "Unexpected file format". -
Bad audio with Flash Media Live Encoder (FMLE)
Video is good, but audio is intermittant, 2 seconds on, 2 seconds off.
Using:
15" Macbook Pro, 2013
OS X version 10.8.5
Blackmagic UltraStudio Mini Recorder
Flash Media Live Encoder 3.2
CPU usage is below 50%
Dropped the sampling rate down to 8000 Hz.
Put bitrate down to 48 kbps
Intermittant audio persists.
Above hardware works great with Livestream's Procaster.
Adobe Help suggests ensuring that the buffer length on the subscribing computer is set to a non-zero value. Where can this be done?"The audio preview in FMLE indicates there IS audio being input"
How do you know this?
are you "Saving to file"? how is the audio in the saved file?
Adninjastrator -
JMF mp3 compatible with Flash?
Hi,
I am trying to convert some wav files to mp3 on the fly so as to allow streaming of the mp3 files using a flash player. However, I have noticed that the converted mp3 don't seem to be compatible with flash. Some of the essential details are as follows:
Input wav format: LINEAR, 8000.0 Hz, 16-bit, Mono, BigEndian, Signed
Output mp3 format: MPEGAUDIO, 22050.0 Hz, 16-bit, Stereo, BigEndian, Signed
Apart from the above mp3 format, I've also tried all the tweaking the sample rate, channels etc but none of the formats seem to be playing on the flash player. For conversion, I have tried using both the Transcode.java sample code as well as the JMStudio application provided with JMF installer. The mp3 files play out fine on other media players such as windows media player and on JMStudio as well.
When I try to use Audacity to convert the wav file to the same mp3 format as above, there is a difference of about 2kb in the size of the files converted using Audacity and JMF, the earlier being the larger one. The version of flash player that I am using is WIN 9,0,124,0.
Can someone please give an insight into what might be happening here. Thank you.The MP3 plugin contains a decoder only. JMF does not support MP3 encoding.
-
Archival services with Flash Media Server
I work for a broadcasting company and we do live telecast of
various events, mostly related to professional sports. We currently
have a Windows Media Encoder 9 setup with Windows Media Server,
etc. I have a custom written application that archives all of our
broadcasts. This was accomplished with the M$ media SDKs. Archival
means we record each one of our daily live feeds for review and
archival purposes (game footage for coaches, stuff like that).
We are currently looking at h.264 capable setups, or
something equivalent. We have been playing around with Adobe's
encoders, media server, and all that. We are impressed with the
quality. Switching to this right now has some logistical
complications, mostly related to an operational requirement based
on our current business model. Simply switching to h.264 overnight
isn't going to be possible; we will need to prepare.
So, with that in mind, I have a question relative to SDKs and
Flash. My current application (the archiver) can archive up to 120
events simultaneously on a single, reasonably fast machine on a
fast network. I have to be able to record at least 60 on a given
night, the 120 was discovered during testing and its faltering is
relative to network collisions and getting ethernet up to 40%
utilization more than not having enough CPU to process the streams.
I would need something similar for Adobe. I have the spec (at least
the public domain version) for the tunnelling protocol so reverse
engineering this isn't going to be a big deal. What I'm mosly
interested in is an SDK with functionality that allows me to record
a lot of streams in software for archival purposes. This SDK has to
be smart enough to deal with Disk I/O VERY intelligently because
clearly anything more than 8-12 realtime stream records to a disk
in a linear fashion is going to overload the hard drive.
Before anyone starts spouting off about DRM and piracy, we
are recording the broadcasts we own. This is for archival and this
archival process has to be automated (the app isn't JUST a
recorder, there's a whole process shielded from the operators of
this thing for defining stream locations, where to save the files,
and all that). I realize all this code that automates this process
for our company would still need to be written. What I'm interested
in specifically are readers and writers for flash streams,
especially relative to network reading and disk writing
(intelligent disk writing; I've written custom implementations of
MMS, HTTP, etc that mash the hard drive).
In a nutshell, is there an equivalent SDK for Adobe's
technology as the Windows Media Format SDK is for WMV files? This
is currently the only hurdle in implementing Adobe's h264
technology in lieu of our current setup (which is 100's of encoders
and locations at the current time, all over North America.
Thank you for your time.Take a look at On2's Flix SDK for Live. That uses the VP6 and
any day now, the h264 codec for FLV. -
Problem with Flash Media Encoder
We're having problems trying to use Flash Media Encoder in
conjunction with an Opsrey 230 card. The device shows up in the
Encoding Options panel but when we try to change any settings we
get the following error "Problem with video capture device. Please
verify that it is working correctly and is not already in use"
The card works fine with Windows Media Encoder. Viewcast
support suggested trying it again with SimulStream enabled, but
still no joy.
Can anyone help?
System - Windows XP Pro 2002 SP 2
Thanks
PhilDoesn't look like any of your capture cards are on the
confirmed compatibility list... I wish there was a confirmed
INcompatible list (add three from above).
http://www.adobe.com/support/documentation/en/flashmediaencoder/FME_DeviceMatrix.pdf
Maybe you are looking for
-
I miss my calendar sync , outlook 2007 to iphone 4 - ISyncInvalidRecordException
I miss my calendar sync , outlook 2007 to iphone 4 - ISyncInvalidRecordException. attached part of the record of itunes: [4832 @ Wed May 23 19:28:30 2012] [_ISDVLog AppleMobileSync.exe] com.apple.MobileSync.8d0b9af1fd44aee05905f7ff661ab607cb0da9b0:
-
Upscaled dv for anamorphic and want to know about adjusting gamma etc.
I took my dv ntsc 4:3 (3:2 really shot on dvcam on the dvx100a) timeline and nested it in an anamorphic sequence to render out a quicktime with the 1:85 matte on it and to apply an rgb limiter as when it upscales some of my broadcast safe get hot aga
-
Error in cache refresh Dear all expert I have created one BPM scenario after when execute that scenario then problem come in cache Before that scenario my Pi working fine now. I have delete communication channel of BPM scenario but still facing probl
-
ADOBE form design in webdynpro JAVA
Hi, I am very new in ADOBE. Someone can send the step by step method for developing the application in webdynpro java.? Thanks, Kundan Kumar
-
Since I installed Snow Leopard, emptying the trash takes forever. Does anyone know if this is normal? No matter if it's 1 file or 800. It takes sometimes hours. Please gives us your thoughts. Thanks