Flex :: API For Speex Codec In Flash
Apr 16, 2010With AIR 2 allowing access to mic data, it's possible to save/process audio locally. Adobe provides a WAVWriter example but is there any API access to the Speex codec?
View 1 RepliesWith AIR 2 allowing access to mic data, it's possible to save/process audio locally. Adobe provides a WAVWriter example but is there any API access to the Speex codec?
View 1 RepliesFrom what I have read, using Speek over Nellymoser is advantageous, but I can't figure out how to use it with a Flex 4 Microphone object. For instance, the last code line:
[Code]...
People have figured out how to use the Google Speech API (Speech-To-Text). I'm trying to get it working with Flash Speex codec, and I just can't figure it out. I've tried inserting frame size byte before each 160 bytes (as some sources say), but this doesn't work. So I post a challenge to somehow translate the flash speex bytes for Google Speech API to understand. Here is basic flex code:
[Code]....
fms live
Codec = speex is too noisy: set noiseSuppressionLevel is no use.
But codec = Nellymoser is ok.
I want to play *.spx files which encoded by Speex on the Web.But I have no knowledge of Flash/Flex or any Flash Audio codec. After Google search for a whole day, I got some solutions, that is:
Do something wrapping Speex files with a FLV container because that the Speex is only playable as the audio codec in a FLV container.Now I can play a SPX-Audio-Only FLV file in Flex, I use netStream.play("audio-only-speex.flv"), But I donot know how to wrap a Spx file with FLV container using ActionScript.I have never heard FMS stuffs before, as well as I'm not sure whether my virtual host can support or not...Convert every Spx files to MP3.
I think the best solution is decoding Spx in AS3, Yes, I'd like to make a Spx Flash Player.So, I downloaded Speex Library from speex.org, installed Adobe Alchemy. After ./configure;make the libspeex, build libspeex/speex.c out a libspeex.swc via Alchemy. then, I donot know how to do next. How can I decode the speex audio with AS3? My libspeex.swc: [url].....
In addtion, should I rewrite the libspeex using Alchemy API before build the libspeex.swc? Although I am not professional in AS, but I have a strong ability to learn.
I am able to record sound from microphone, encode it using SPEEX and write into ByteArray. I want to play it back. If I try using Sound object the audio is messed up. Speex uses 16kHz for encoding and Sound Object needs 44.1kHz for playing audio. How am I supposed to play this encoded sound.
View 1 RepliesI'm implementing a very simple audio-only RTMP server.I have my client code like this:
// get the default mic
var mic:Microphone= Microphone.getMicrophone();
// best quality (picks up all sounds, no transmission interruptions)[code].....
Then on the server, I keep receiving audio packets with size of either 43 bytes or 11 bytes (no other sizes found yet).My questions are:
Why do I get size of either 43 bytes or 11 bytes (from SPEEX encoding?)?
Is the 43 bytes = 1 head byte + 42 data bytes?
What is the size of 11 bytes?
How should I process or convert the SPEEX to raw data, so that my server side app can use this audio data? My current implementation:
I pick up all 43-byte packets (drop all 11-byte packets);
Skip the first 1 byte;
Decode the left 42 bytes using Speex library.
How should I convert the raw data back to SPEEX audio data?
When i am pointing to an FlV it's playing successfully. But when it comes to a speex file. I am getting an error StreamnotFound. How to resolve this issue?
View 2 RepliesAdobe's "SWF File Format Specification v10" says that Speex encoded data can be used for streaming sound (a little clarification of the "streaming sound" definition here: "The SWF file format supports a streaming sound mode where sound data is played and downloaded in tight synchronization with the timeline. In this mode, sound packets are stored with each frame." - this has nothing to do with any FMS streaming, no ActionScript needed - just plain SWF).This should be accomplished by using a single SoundStreamHead2 tag with StreamSoundCompression set to 11 (which means "Speex", as stated in the abovementioned Specification) and then N pairs of ShowFrame and SoundStreamBlock tags. However, this does not work - Flash Player plays no sound when playing the SWF generated by me this way. Please note, that I am capable of generating such SWFs containing streamed MP3 or PCM data, which then play perfectly. Just not Speex...
I strictly conform to the Specification:URL...I tried the streaming sound approach as well as the event sound - both do not work.Moreover, I was not able to find (anywhere on the Internet) any sample SWF with streaming sound (nor event sound) encoded in Speex. Do they even exist? Anyway, Flash CS5.5 is not capable of generating them.I would just like to know whether Speex support for SWF streaming sound can be found anywhere else than in the Specification. (I know that FLV can contain Speex and that Flash Player can stream Speex from a microphone and that FMS can stream Speex to its clients, but this is not what I am asking for)
could you answer whether ScreenVideo codec (ID=3) is supported by latest FlashPlayer for DefineVideoStream/VideoFrame tags?
View 1 RepliesI have tried really hard to find an example showing how to play speex encoded audio in flash. I tried the following code -
var connect_nc:NetConnection = new NetConnection();
connect_nc.connect(null);
var stream_ns:NetStream = new NetStream(connect_nc);
[Code]....
I tested the above code with .flv videos and AAC encoded audio files and it works just fine. But when I try stream_ns.play("sample.spx") I get a stream not found exception.
Am I using the wrong container (.spx) for speex audio. Is playing speex audio from a file supported?
I have tried really hard to find an example showing how to play speex encoded audio in flash. I tried the following code -
var connect_nc:NetConnection = new NetConnection();
connect_nc.connect(null);
var stream_ns:NetStream = new NetStream(connect_nc);
[code].....
I am trying to import a FlashDevelop project into Flash Builder. I simply started an ActionScript project and dragged and dropped files & created packages as needed, selected "Set as Default Application" on the main file .as file and deleted the default application .as file. But when I compile I get the following errors
[Code]...
In my build path I have Flex 4.5.1 and for framework linkage I am doing "Merged into code".
I'm developing some AS3 that will end up in a mac projector (.app). This app will stream 1080p videos from the local disk. What is the best codec for fluid videos? (no hiccups, fast start, etc) Is there any special setting I have to consider in the code or in the publish settings?
View 1 RepliesI am having a wied issue with flash flash is unable to import mx.graphics.codec error 1172 a definition could not be found do I have to download this codec from some place, it seem to me that they must be here
View 3 RepliesI use Red5 server 0.9.1 for live streaming from Adobe Flash player to my RTMP protocol transport.I test it with audio data captured from my microphone using flash application and for now transport recieves and recognizes audio packets. For further audio data listening I need to know what audio codec Flash player uses to send data to the Red5 server.Transport doesn't recieve any metadata packets with detailed information about media codec. All I know for now from "connect" message is that publishing side supports the set of audio and video codecs.
View 3 RepliesI'm using ffmpeg on Windows to create mp4 files for web distribution. As libfaac isn't available, I use libmp3lame to encode the audio tracks. The mp4 are played back with a falsh player (JWPlayer).I was wondering if there were any shortcomings to use mp3 instead of aac on certain devices?
View 1 RepliesRight now I am working on an AIR 3.2 application which lets you stream a video to a Flash Media Server and saves it on a hard drive.This sequence works fine with the standard Sorenson codec but I want to use H.264 for my videos. I found lots example c ode and implemented it in my code, but when I record a video of myself I am unable to re-watch it afterwards.I found how to implement a H.264 encoding in a realeyes blog post here. My code is here.It saves the video as a .f4v file, but my browser (I've tried the latest versions of both Chrome and Firefox, with the latest Flash) and also VLC are unable to load the video. I also used a program called Movie Player which is able to open the file but can only show the first frame and the audio. Neither am I able to upload the video to YouTube because they do not support the file extension.Here is an example video file it saved: H264Test1.f4v.My question is: How do I stream and save the movie with a file extension that I am able to re-watch while using the H.264 codec?
View 1 RepliesDoes the FMS 4 will convert the data from Speex to Nellymoser ?I am publishing the stream to FMS 4 with codec Speex from flash player 10. And trying to access the stream in flash player 9. I am not able to listen the stream.
View 1 RepliesI've been sent a link to an FLV file that plays in the browser and when downloaded plays in Adobe Media Player.
However, when I try to import it into Flash, I get the error message
unsupported audio codec
It'll bring in the video no problem.
I've tried to use Adobe Media Encoder to convert the file but it doesn't see the audio either.
Is this some kind of protection on the audio? What am I missing?
I am using FMS 3.5 and Flash CS3 (though using action script 2 at the mo)What I have is a simple program that records a webcam and saves the result as an FLV. - Note, I am doing all this locally, NOT over the internet or a local server. FMS is on the same PC as the program.
1) The frames per second does not seem to be fixing to 25fps, but instead seems to be around 15fps depending upon which pc I use. I'm using: cam.setMode( 320, 240, 25 ); to set the size and frame rate in flash.
2) When I get the properties for the resulting flv, it says it is using h.263 codec. Is there a way to change the codec that is used (to say h.264)? Or is this dependent on the version of flash used? ie. would creating it in flash 9 using AS3 give a better quality result?
I have used the following properties in the meta data handler for finding the keyframes, but returned nothing:
var kfPoints:Object;
for (var propName:String in metaInfoObj)
{
if (propName == "keyframes")
[Code].....
How can I find keyframes in an mp4 file transcoded with an H264 codec?
I learned from some previous post that the default encoding format used when you publish the camera from a Flash player is Soreson. I'm wondering whether it is possible to select to use other codec such as VP2 or H.264?
View 3 RepliesI'm trying to publish video streaming over internet. I want to use the h264 codec in FMS for that. Is there any in built property or setting to use h264 or have to use library for that. And also want to know among VP6, sorenson and 264 which is better to use.
View 6 RepliesI've embedded a MovieClip symbol with the [Embed] syntax into my AS3 project, which I'm compiling with the Flex 3 SDK. That MovieClip has instances of other clips within it that are placed on stage with instance names. I can't just access them by instance name like I would if I were compiling with the Flash IDE. How can I reference them?
View 1 Repliesi'm using swfloader to load swf file in the middle of the screen using the following command:
<mx:SWFLoader id="game_swf" source="crazy_counting.swf" x="198" y="0" width="721" maxWidth="721" height="531" maxHeight="531" />
now stage of the flash file takes the exact size that i stated by the flash file itself is overlapping the stage with some graphics
From a video on AdobeTV, I tried to play with example empWeb (LiveCycle Data Services).In Flex Builder 3 (FB3) everything works fine. When I tried this on Flash Builder 4.0 Beta (FB4) it doesn't work. When I replaced original xmlns declarations (2009, spark, halo)with declarations from FB3 (2006) it works. Could you explain why?I'm using the default SDKs (Flex 3.2 for FB3 and Flex 4.0 for FB4). I investigated this (please see 3 source code examples). Source #1 works OK in FB3 and FB4, Source #2 gives a FB4 compilation error message: [code]
View 1 RepliesDoes anyone know what criterea Flash uses for discovering the Live Preview class for a Component? Background We are attempting to automate the creation of a SWC that contains a component to be used from Flash. We are able to make it visible to flash by modifying the manifest.xml and wiring up the component definitions. However, the component cannot be dragged onto the stage (or library), presumably because it has no form of LivePreview. To give better clarification of where we are coming from, we've noticed the following in SWCs exported from Flash (using swfdump):
fl.livepreview.LivePreviewParent contains the same mod attribute as the visual component in the manifest.xml file fl.livepreview.LivePreviewParent is exported as a symbol The short-named component (ie. no package, referenced in the components definition in the manifest.xml) is exported as a symbol However, I can see no other differences between that and the SWC from Flex. We can obviously use JSFL to perform the task, but we'd rather not install Flash on the build server.
I did some work that used Flex datagrids previously. It was smooth for the users and developers alike.
In my current project, I have to implement the same grids but not using Flex / Flash.
I have taken a look at extJS and YUI but they don't seem to measure up.
Are there other packages I should be looking at ?
I want to upload directly to an S3 bucket.I know this can be done in AIR,whether it is actually possible in flex in the browser, or will I have to use some code server side to get this going?
View 1 Replies