Record from webcam to f4v on FMS
I'm trying to build / modify an application to record from webcam and microphone, in a web browser and save it to an FMS 5.4.2 server to stream via web and iOS
recording as a flv file works fine and it plays back just fine in firefox / any browser
I can steam f4v files over http as filename.f4v.m3u8 and that works fine with the samples that come with FMS from my record folder (/opt/adobe/fms/applications/record/streams/)
My flash web application can record to the FMS server, the file it records has the .f4v file extension, has content (i see the file size), and has time in quicktime (4 or 5 seconds - just a test) but it doesn't play - the screen is black and never starts.
I know i'm right on the edge of figuring this out, I just don't know what I'm missing or whats wrong (i'm a php programmer, not action script)
any ideas ?
here is the code i'm working with:
package com
import fl.controls.ProgressBar;
import fl.controls.ProgressBarMode;
import flash.display.MovieClip;
import flash.events.Event;
import com.NetConnector
import flash.events.MouseEvent;
import flash.events.TimerEvent;
import flash.media.Camera;
import flash.media.Microphone;
import flash.media.Video;
import flash.net.navigateToURL;
import flash.net.NetConnection;
import flash.net.NetStream;
import flash.net.URLLoader;
import flash.net.URLLoaderDataFormat;
import flash.net.URLRequest;
import flash.net.URLRequestMethod;
import flash.net.URLVariables;
import flash.text.TextField;
import flash.utils.setTimeout;
import flash.utils.Timer;
import flash.media.H264Level;
import flash.media.H264Profile;
import flash.media.H264VideoStreamSettings;
import flash.media.VideoCodec;
* @author Alexander (flash2you) < >
public class Recorder extends MovieClip
private var dataHolder:DataHolder = DataHolder.getInstance()
public var layer:MovieClip
public var activityLevel_pb:ProgressBar
public var aguja:MovieClip
public var aguja2:MovieClip
public var publishButton:MovieClip
public var timer_txt:TextField
public var recordStatus:MovieClip
public var recordBtn:MovieClip
private var netStream:NetStream
private var microphone:Microphone = Microphone.getMicrophone()
private var camera:Camera = Camera.getCamera()
public var video:Video
private var timer:Timer = new Timer(100)
private var clockTimer:Timer = new Timer(1000)
public var published:Boolean = false
private var isRecording:Boolean = false
private var minutero = 0;
private var crono = 0;
private var records = 0;
public var settings_mc:MovieClip
public static var recorder:Recorder
public var settings_icon:MovieClip
private var limitTimer:Timer
public function Recorder()
Recorder.recorder = this;
timer.addEventListener(TimerEvent.TIMER, on$timer)
clockTimer.addEventListener(TimerEvent.TIMER, on$clockTimer)
//visible = false
recordBtn.buttonMode = true
recordBtn.addEventListener(MouseEvent.CLICK , recordBtn$click)
recordBtn.addEventListener(MouseEvent.MOUSE_OVER, recordBtn$over)
recordBtn.addEventListener(MouseEvent.MOUSE_OUT, recordBtn$out)
addEventListener(Event.ADDED_TO_STAGE, onAddedToStage)
limitTimer = new Timer(dataHolder.timelimit * 1000);
limitTimer.addEventListener(TimerEvent.TIMER, onLimitTimerHandler)
private function onLimitTimerHandler(e:TimerEvent):void
stopPublish()
* when we comes to second frame
private function onAddedToStage(e:Event):void
removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
init()
* function for set up camera from settings module
public function setCamera(_camera:Camera) {
camera = _camera
addCameraSettings()
video.width = 1280;
video.height = 720;
video.attachCamera(camera)
if (netStream){
netStream.attachCamera(camera)
public function setMicrophone(mic:Microphone) {
microphone = mic;
if (netStream){
netStream.attachAudio(microphone)
addMicSettings()
private function addMicSettings() {
microphone.setUseEchoSuppression(true);
microphone.setSilenceLevel(1)
private function addCameraSettings():void
camera.setMode(1280, 720, 25);
camera.setLoopback(true);
camera.setQuality(0, 100);
public function init() {
startConnect()
* main function for connection
private function startConnect() {
visible = true
timer_txt.htmlText = "<b>00:00</b>";
initCamera()
initMicropone()
var nc:NetConnection = new NetConnection()
nc.connect(null)
netStream = new NetStream(nc)
netStream.attachAudio(microphone)
video.attachCamera(camera)
layer.visible = false
publishButton.gotoAndStop(1);
activityLevel_pb.mode = ProgressBarMode.MANUAL;
recordStatus.gotoAndStop("noRecord")
timer.start()
connection.addEventListener(NetConnector.CONNECTED, connectionComplete)
connection.startConnection()
public function get connection():NetConnector {
return dataHolder.connection
private function on$timer(e:TimerEvent) {
activityLevel_pb.setProgress(microphone.activityLevel, 100)
* when connection to your stream server done
private function connectionComplete(e:Event = null) {
netStream = new NetStream(connection)
netStream.attachAudio(microphone)
netStream.attachCamera(camera)
* add 0 if less then 10secs
private function addLeading(nbr) {
if (nbr<10) {
return ("0"+Math.floor(nbr));
} else {
return (Math.floor(nbr).toString());
* update visible clock, rotate arrows
private function updateTimer() {
timer_txt.htmlText = "<b>"+addLeading(crono/60)+":"+addLeading(crono%60)+"</b>";
aguja.rotation = aguja.rotation+6;
if (addLeading(crono/60)>minutero) {
aguja2.rotation = aguja2.rotation+6;
++minutero;
// end if
++crono;
private function on$clockTimer(e:TimerEvent):void
updateTimer()
private function startClockTimer() {
clockTimer.start()
* update graphics and start recording
private function recordBtn$click(e:MouseEvent):void
if (!isRecording) {
startRecording()
recordStatus.gotoAndStop("record")
recordBtn.visible = false
private function recordBtn$over(e:MouseEvent):void
if (!isRecording) {
this.gotoAndPlay(65);
private function recordBtn$out(e:MouseEvent):void
if (!isRecording) {
this.gotoAndPlay(61);
private function startRecording() {
if (connection.connected){
netStream.publish("mp4:" + dataHolder.filename + ".f4v", "record");
isRecording = true
startClockTimer()
publishButton.gotoAndPlay(2)
publishButton.buttonMode = true
publishButton.addEventListener(MouseEvent.CLICK, publishButton$click);
limitTimer.start()
* redirect to finishURL that was passed via flashvars
private function publishButton$click(e:MouseEvent):void
stopPublish()
var request:URLRequest = new URLRequest(dataHolder.finishURL)
navigateToURL(request, "_self")
private function stopPublish():void
netStream.close();
connection.close();
limitTimer.stop();
clockTimer.stop();
isRecording = false
recordStatus.gotoAndStop("recordEnd")
updateTimer();
* init microphone
private function initMicropone():void
microphone = Microphone.getMicrophone()
addMicSettings()
* init camera
private function initCamera():void
camera = Camera.getCamera()
addCameraSettings()
Hi,
Thanks for the details
First, the quality of the feed we get to the flash player and FMS is highly limited by the capabilities of the webcam that the users have beyond which we cannot improve the quality.
Next, flash player can encode good quality and hence you should probably find more stuff related to how best you can ingest video from a webcam on to the flash player.
- Does recording from server side with asc script will increase the quality ?
No, FMS does not do any type of transcoding/re-encoding stuff. All it does is to 'transmit' and in your case, to flush bits to the disk. So, unless FMS recieves 'Quality', it cannot do much.
- what configurations files on the server can i adjust to increase the recording quality ?
From above, it flows that, there are no configurations on the server that can make your quality grow. The configurations are more to do with delivery. It can be tweaked to improve streaming, reduce latency, quick start and more.
- is there a way to cache locally the stream if the bandwith is not high enough, and when the user stops recording, upload it to the server (it doesn't have to be live or broadcast).
I don't think flash player can do this.
Thank you !
Similar Messages
-
Hello:
I need to show on the stage the video from my HD webcam in a local PC and save the video into a file.
Do you know a way to record the video and save it to mpg or mov, flv, mp4 video file?
any Xtras, ActiveX or other ways?
Thank you very muchI know you can control webcams in Director - via the flash asset
have a play with valentins old script demos here:-
http://valentin.dasdeck.com/lingo/flash_camera/ -
Recording from webcam into fcp
Can you record video from a web cam directly into FCP?
Final Cut doesn't capture from USB sources. If you're referring to a built-in iSight, then it's a USB camera. Quicktime Player can record video from it, though.
-
Hi!
I was wondering if I am able to record the images of a webcam in Flex. Is it possible, and if so, how can I make it?
I'm using MJPEG images (ByteArray stream), so can it be a possible way to paste/add images to a Movie (or sg like that) object, and then save it?
Jus a thought, but any solution interests.
Thanks a lot
MiloDo they allow me to track the mouse easily across the whole
screen or is it just for pieces?
I probably should have explained better earlier but I am
looking to somehow record all their movements across the
application to get a better idea of how the user is interacting and
thinking about the experience. I am not really sure what I am
looking for here but it is my guess that these listeners just check
for moving x amount of pixels one way or another. Do these allow a
more robust method of capture?
Sorry I cannot go any more detailed than that since I am not
really sure what I am looking for yet - I'm just trying to see what
is out there and what others might be doing.
Thanks for your suggestions,
-Dan -
Problem : Recording video & audio from webcam
Hi all
I want to record myself to see the expression on my face on average through the USB webcam .
I use mencoder for recording from USB webcam .
mencoder tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0:forceaudio:adevice=/dev/dsp -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -fps 16.2 -o test16.2.avi
The problem is that the audio is not synchronized with the video
what can i do ? help!
Last edited by remstereo (2010-11-17 08:16:45)up
-
OnLocation fails to record from Microsoft LifeCam Studio 1080p HD Webcam
Hi,
I finally installed and configured OnLocation on my laptop, and I was looking forward to shooting 1080p footage in my car. Imagine my disappointment when it turned out that OnLocation refuses to record from the camera! I know the camera works because other software can use it (alas, at 720p). Why is it I am not having any luck with this? All the other forums suggested that OnLocation is the ultimate tool for mobile recording to disk, and now I can't even get it to show me the live footage. What gives?
-- MKVirtualDub works. But there are a few hoops to jump through. http://www.youtube.com/watch?v=QakF9eWBh7A. I realize that it has been a while since your question was posted so if you have found something better than this, do let me know.
-
Video stream recording (not webcam) help required
I am making a media player / recorder type web application in flex 4.
The application plays video streams streamed from my red5 server.
I want to give users the ability to make / record clips of the video they are viewing.
I know that netstream.publish is used to record/save video on the server.
All the help i've found on google so far just give examples to save video from webcam.
But i want to save video from a video being streamed from red5 server and being played
on VideoPlayer control in flex.
All help is greatly appreciated.
Thanks.Thanks for the reply but i think u misunderstood my problem.
I am not receiving any RTP Stream but RTMP stream.RTMP is a proprietary protocol of Adobe For Streaming Flash video from Flash Media Server (FMS).
I again state the problem.
I am getting an RTMP Stream now i want to convert it into an RTP Stream so that i can process or transmit it further.I want to convert this RTMP Stream to RTP format.
Anyone plz help me out.I am stuck into this for past 2 days and it is very critical for my project. :-( -
How to record from the video in or S-video Ports on Qosmio G40?
Can anyone tell me how to record from the video in or S-video ports, because i've tried the Ulead DVD factory program and the only capture device it could see was the webcam, and it did capture from it
After that i've downloaded the update file that was provided by the support website
The devices that the program could see are the TV tuner and the webcam (which it couldn't access anymore for some reason)
After that i've downloaded a newer update which simply is the same as the last update and seems that someone in the support website directed the link of the new update which they don't have to the file of the previous update which doesn't really do anything.Hi
There are 2 s-video ports; s-video out port is not designed to capture the signals from any external source. The name of this port says everything; its an OUT port!
The s-video-in port must be placed at the right side of the notebook. Dont mix the both ports. But note; this port receives only the video signals. To hear the sounds, use a video cable to connect the sound terminals of the audio device and your computer.
Red: sound right channel
White: sound left channel
The Ulead DVD Movie factory can be used to capture this signal. -
how to publish live video feed from webcam in h.264 format non VP6 format with FMS 3.5.2
without using Flash Media Live Encoder, and how to set all parameters
to have a good quality and smooth video without interruption,
i have a server with 50Mbit bandwidth output enough for a publisher and 10 clients
please help me
understand this thing's been months since I try but the quality ugly
grazie a tutti!nobody can help me
-
How to check at what time the extractor has picked records from r3 tables
Hi experts ,
If we want to know exactly at what time the Extractor has picked up the records from r/3 tables .
or if we want to know the time stamp of extractor picking the records from r3 tables after r3 entries
Regards ,
Subash BalakrishnanHi,
The following are few function modules which will give you the information you need based upon the area you are working in.
SD Billing: LOG_CONTENT_BILLING
Delivery: LOG_CONTENT_DELIVERY
Purchasing: LOG_CONTENT_PURCHASING etc...
See if the above FMs help you in any way... -
Can not delete record from the master block ,frm-40202 field must be entere
hi ,
i have built a form which contain master and details blocks
the problem is
when i try to delete a record from the master block it gives me new serial for the transaction and when i try to save it, it says
>frm-40202 field must be entered
where this field is required and i cant save it
although in another form when i delete from the master it gives me the previous record and it works properly
if any one has any ideas pls help me
thank u
------- the master block has a trigger when-create-recoder
Declare>v_dummy number;
Begin
Select nvl(max(ERNT_NO),0) + 1 >Into v_dummy
From LM_RENT_EXPNMST >Where cmp_no = :LM_RENT_EXPNMST.cmp_no
And brn_no = :LM_RENT_EXPNMST.brn_no>and fiscal_yr = :LM_RENT_EXPNMST.fiscal_yr;
>:LM_RENT_EXPNMST.ERNT_NO := v_dummy;
END;
IF :PARAMETER.RNT_NO IS NOT NULL THEN
:LM_RENT_EXPNMST.RNT_NO:=:PARAMETER.RNT_NO;
:LM_RENT_EXPNMST.RNT_YR:=:PARAMETER.RNT_YR;
:LM_RENT_EXPNMST.CUST_DESC:=:PARAMETER.RNT_ADESC;
END IF;Edited by: ayadsufyan on May 8, 2013 2:03 PMIf this is a FORMS question you should mark this one ANSWERED and repost your question in the FORMS forum
Forms -
Unable to capture video from webcam in JMF in xlet
hi
I am unable to capture video from webcam in an Xlet. I am using Xletview to run Xlet. The method CaptureDeviceManager.getDeviceList(vidformat) returns empty array. Which videoformat should I use and why do I get empty array?
Thanks
RajeshMHP and OCAP only use JMF 1.0, which does not include support for capturing video. You will not be able to do this in any current MHP/OCAP imlementation that I know of.
Steve. -
Unable to capture video from webcam in JMF
hi
I am unable to capture video from webcam in an Xlet. I am using Xletview to run Xlet. The method CaptureDeviceManager.getDeviceList(vidformat) returns empty array. Which videoformat should I use and why do I get empty array?MHP and OCAP only use JMF 1.0, which does not include support for capturing video. You will not be able to do this in any current MHP/OCAP imlementation that I know of.
Steve. -
Return records from Stored Procedure to Callable Statement
Hi All,
I am createing a web application to display a students score card.
I have written a stored procedure in oracle that accepts the student roll number as input and returns a set of records as output containing the students scoring back to the JSP page where it has to be put into a table format.
how do i register the output type of "records" from the stored function in oracle in the "registerOutParameter" method of the "callable" statement in the JSP page.
if not by this way is there any method using which a "stored function/procedure" returning "record(s)" to the jsp page called using "callable" statement be retrieved to be used in the page. let me know any method other that writing a query for the database in the JSP page itself.I have a question for you:
If the stored procedure is doing nothing more than generating a set of results why are you even using one?
You could create a view or write a simple query like you mentioned.
If you're intent on going the stored procedure route, then I have a suggestion. Part of the JDBC 2.0 spec allows you to basically return an object from a CallableStatement. Its a little involved but can be done. An article that I ran across a while back really helped me to figure out how to do this. There URL to it is as follows:
http://www.fawcette.com/archives/premier/mgznarch/javapro/2000/03mar00/bs0003/bs0003.asp
Pay close attention to the last section of the article: Persistence of Structured Types.
Here's some important snippets of code:
String UDT_NAME = "SCHEMA_NAME.PRODUCT_TYPE_OBJ";
cstmt.setLong(1, value1);
cstmt.setLong(2, value2);
cstmt.setLong(3, value3);
// By updating the type map in the connection object
// the Driver will be able to convert the array being returned
// into an array of LikeProductsInfo[] objects.
java.util.Map map = cstmt.getConnection().getTypeMap();
map.put(UDT_NAME, ProductTypeObject.class);
super.cstmt.registerOutParameter(4, java.sql.Types.STRUCT, UDT_NAME);
* This is the class that is being mapped to the oracle object.
* There are two methods in the SQLData interface.
public class ProductTypeObject implements java.sql.SQLData, java.io.Serializable
* Implementation of method declared in the SQLData interface. This method
* is called by the JDBC driver when mapping the UDT, SCHEMA_NAME.Product_Type_Obj,
* to this class.
* The object being returned contains a slew of objects defined as tables,
* these are retrieved as java.sql.Array objects.
public void readSQL(SQLInput stream, String typeName) throws SQLException
String[] value1 = (String[])stream.readArray().getArray();
String[] value2 = (String[])stream.readArray().getArray();
public void writeSQL(SQLOutput stream) throws SQLException
}You'll also need to create Oracles Object. The specification for mine follows:
TYPE Detail_Type IS TABLE OF VARCHAR2(1024);
TYPE Product_Type_Obj AS OBJECT (
value1 Detail_Type,
value2 Detail_Type,
value3 Detail_Type,
value4 Detail_Type,
value5 Detail_Type,
value6 Detail_Type,
value7 Detail_Type,
value8 Detail_Type);Hope this helps,
Zac -
Display all records from 4 select list
Hi,
trying to associate 4 select list where i could display all records from a list linked to an other list.
1./ Created an item for each select list
P1_employee_name
P1_departments
P1_employee_type
P1_locations
2./Set both null and default values to '-1' for each item
3./Associated these items to source columns in the Region:
where employee_name=:P1_employee_name
or :P1_employee_name ='-1'
and departments=:P1_departments
or :P1_departments ='-1'
and ......
When running the report, couldn't display all records from a given list associated to an other list.
e.g: Display all emp and type of emp for sales dept in Paris.
Thks for your helpI believe the issue is that you need to group your predicates such as:
where (employee_name=:P1_employee_name
or :P1_employee_name ='-1')
and
(departments=:P1_departments
or :P1_departments ='-1')
Also, if you are not already using the "select list with submit" type items, these work great for this case as the page will be submitted when the user changes the value of employeenam and the report will then reflect this change.
Maybe you are looking for
-
Bringing dvd footage into FCP - progressive scan
I occasionally have clients that need me to bring footage into their projects from a dvd or vhs. I'm looking into getting something that can do both NTSC & PAL and I've come across this product: Sharp DV-NC80 6-Head Hi-Fi Stereo VHS/S-VHS VCR & DVD,
-
PO free of charge indicator table
Hi all, can someone telll me which table stores the free of charge indicator in PO? Thanks!
-
HTML select tag on irpt page - update database from options
Hi all, I have an irpt page with two selects. It is the traditional move stuff from one select to the other, then set the order of the options in the configured select. (Admin page to specify an ordered list of items) After the user gets the list h
-
Can anyone explain why I get incorrect information when I go into mail? I have a number of filters set up which place my mail into various folders. When I go into mail bold type tells me that I have a number of new mails in a given folder, but when I
-
So, call me ridiculous, but I use 64 bit software whenever possible because I have a 64 bit OS with 64 bit CPU cores. Naturally, then, I use a 64 bit web browser: Firefox (nightly). This means I need a 64 bit version of flash which is still in a horr