netstream

Playing AAC (ADTS) file with Netstream Appendbytes

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-13 07:20:52
问题 I want to know if it's really possible to play an AAC (ADTS header) file with Netstream.appendbytes. I'm talking about files that end .aac not AAC audio inside M4A or MP4 containers. I'm aware Netstream can't parse ADTS headers etc so I already have a class for parsing the data and gives back correct info such as channels, bitrates, framelengths etc. Putting this together gives silence: Make FLV header (+ append) ->> Make audio tag header (+ append) ->> now append with raw/headerless AAC

How does NetworkStream work in two directions?

一笑奈何 提交于 2019-12-31 02:55:10
问题 I've read an example of a Tcp Echo Server and some things are unclear to me. TcpClient client = null; NetworkStream netStream = null; try { client = listener.AcceptTcpClient(); netStream = client.GetStream(); int totalBytesEchoed = 0; while ((bytesRcvd = netStream.Read(rcvBuffer, 0, rcvBuffer.Length)) > 0) { netStream.Write(rcvBuffer, 0, bytesRcvd); totalBytesEchoed += bytesRcvd; } netStream.Close(); client.Close(); } catch { netStream.Close(); } When the server receives a packet (the while

onSeekPoint weirdness

牧云@^-^@ 提交于 2019-12-24 14:53:09
问题 I have a NetStream which is put into data generation mode properly... everything works fine and I get onSeekPoint() events when I do something like the following: EXAMPLE 1 public function setupStream() { netStream.client = {}; netStream.client.onSeekPoint = this.onSeekPoint; netStream.client.onMetaData = this.onMetaData; } public function onSeekPoint(... args) {...} public function onMetaData(... args) {...} However, instead of keeping it all in that parent class, I need to create a new

AS3: Is it possible to capture stage elements or bitmap data into a netstream?

大城市里の小女人 提交于 2019-12-23 17:27:28
问题 I'm looking at the netstream documentation. but can't really glean if appendBytes() can really take arbitrary data. Could I really just take arbitrary bitmap data (as a byte array) and append the frame to stream (presumably before sending it to a FMS to save a file)? I think I am wrong: it's only useful for dynamic streaming. I know that it is possible to grab a webcam feed and directly encode video via FMS. But say I wanted to add some overlays before encoding, is that even possible in Flash

AAC/MP4 not working in ActionScript 3's NetStream

拥有回忆 提交于 2019-12-23 12:09:48
问题 I'm trying to play a remote AAC file in ActionScript 3 in Flash CS3 and am currently using this code: var url:String = " http://a1.phobos.apple.com/us/r1000/020/Music/d4/50/94/mzm.kjjofihr.aac.p.m4a "; var connect_nc:NetConnection = new NetConnection(); connect_nc.connect(null); var stream_ns:NetStream = new NetStream(connect_nc); stream_ns.play(url); (This is based on: http://www.adobe.com/devnet/flashplayer/articles/hd_video_flash_player_03.html) No errors are thrown, but no sound is played

AS3 NetStream AppendBytes Seek issue

眉间皱痕 提交于 2019-12-17 20:23:23
问题 I'm having trouble with NetStream in AS3. The project I am working on allows users to browse a video (locally) and play it back. The issue I am having is that netStream.seek(0); from what I can tell it doesn't do anything, although I get inside a NetStatusEvent function and NetStream.Seek.Notify is triggered. I'm using NativeProcess and the following function is this makes any difference. public function ProgressEventOutputHandler(e:ProgressEvent):void { videoByteArray = new ByteArray();

Getting Bitmap from Video decoded with Nestream AppendBytes (AS3)?

守給你的承諾、 提交于 2019-12-13 23:01:21
问题 I am wondering if someone who has handled NetStream.appendBytes in Flash knows how to get the bitmapData from a decoded video frame? I have already looked at this question but that is from 3 years ago and the more recent comment/answer seems to be gone. In 2014 has anyone managed to turn those bytes into a bitmap? I am working with Flash Player 11.8 and this is not a desktop/AIR app. In the image below I can do steps 1) and 2) but there's a brick wall at step 3) The problem is that simply

flex4 - NetStream.soundtransform.volume doesn't change

烂漫一生 提交于 2019-12-13 22:25:44
问题 I have problem with receive netstream sound volume changing <![CDATA[ import mx.events.FlexEvent; import flash.events.Event; import flash.events.MouseEvent; import flash.events.NetStatusEvent; import flash.media.Camera; import flash.media.Microphone; import flash.media.Video; import flash.net.NetConnection; import flash.net.NetStream; import flash.media.SoundTransform; private const SERVER:String = 'rtmfp://p2p.rtmfp.net/'; private const DEVKEY:String = 'my dev key'; private const REG:String

Can NetStream.seek move the playhead of an MP3?

微笑、不失礼 提交于 2019-12-13 01:55:18
问题 I create a custom SWF to play MP3s that use RTMP and <NetStream> . I was able to connect to the server, play and pause the mp3, and adjust the volume using <SoundTransform> . But I still can't retrieve metadata from the <NetStream> to make a seek bar. Can <NetStream.seek> move the playhead of an streaming mp3 file? 回答1: To make a seek bar, you have to know the length (duration) of your mp3. To get that, you can use the getStreamLength server side function which you can call after been

Netstream and step() or seek()?

此生再无相见时 提交于 2019-12-12 16:17:06
问题 I'm on an AS3 project, playing a video (H264). I want, for some special reasons, to go to a certain position. a) I try it with NetStream.seek(). There it only goes to keyframes. In my current setting, this means, i can find a position every 1 second. (for a better resolution, i'd have to encode the movie with as many keyframes as possible, aka every frame a keyframe) this is definetly not my favourite way, because I don't want to reencode all the vids. b) I try it with NetStream.step(). This