[Gambas-user] Did anyone have a script to record webcame picture in video files

Fabien Bodard gambas.fr at ...626...
Wed Dec 22 12:46:11 CET 2010


i've ubuntu 10.10 ... in fact i use actually a derivated distro : Mint
10 based on the 10.10 Maverick

try to remove the ~/.config/gambas3 directory and run again gambas

2010/12/22 firman <firman.isb at ...626...>:
>
> Thanks Mr. Fabien, I've tried to use that key but nothing change, and still
> nothing menus could show.. maybe i must change my ubuntu to 10.04 again...
>
>
> Fabien Bodard-4 wrote:
>>
>> ctrl+alt+m... to show the menu ?
>>
>> 2010/12/21 firman <firman.isb at ...626...>:
>>>
>>> i'm sorry,,  i've problem with my gambas3, i tried to install it in
>>> ubuntu
>>> 10.10 and any problem there. When i openned gambas3 there was nothing
>>> menus.. but the project can openned. So i use os windows for put the
>>> source
>>> archive using winrar..
>>>
>>> and here's the archive.. so u can extract the rar file first, and open it
>>> in
>>> gambas3.  i'm wating for ur solutions for my project. thanks.
>>> http://old.nabble.com/file/p30510255/TACAMCCTVrev2.rar TACAMCCTVrev2.rar
>>>
>>>
>>>
>>> Jussi Lahtinen wrote:
>>>>
>>>> Project --> Make --> Source archive
>>>> And put the script in that tar ball also.
>>>>
>>>> Jussi
>>>>
>>>>
>>>>
>>>> On Mon, Dec 20, 2010 at 08:32, firman <firman.isb at ...626...> wrote:
>>>>
>>>>>
>>>>> okay i'll send u entire project, but which one do u need, Files project
>>>>> in
>>>>> package program or just All script in main form??
>>>>>
>>>>> thank's
>>>>>
>>>>>
>>>>>
>>>>> Jussi Lahtinen wrote:
>>>>> >
>>>>> > It is easier to help if you send your whole project.
>>>>> > I can't see any handling for CatProcess.
>>>>> >
>>>>> > Jussi
>>>>> >
>>>>> >
>>>>> > On Sat, Dec 18, 2010 at 02:11, firman <firman.isb at ...626...> wrote:
>>>>> >
>>>>> >>
>>>>> >>
>>>>> >> I Almost done my project about monitoring camera using webcam with
>>>>> gambas
>>>>> >> 3... the picture or streaming video can displayed on picturebox but
>>>>> i
>>>>> >> still
>>>>> >> have a problem to record in video file mode r like avi,  mpg or
>>>>> other
>>>>> >> compressed format.. please help me if anyone can solve my problem. i
>>>>> will
>>>>> >> showing u a picture of FMain my project... the record button still
>>>>> >> couldn't
>>>>> >> worked...
>>>>> >>
>>>>> >> i'm using gambas 3 svn... I've wrote the script like this, and
>>>>> worked
>>>>> the
>>>>> >> files created but still 0 KB or nothing recorded....
>>>>> >> this is the script:
>>>>> >>
>>>>> >> 'Proses Menyimpan File record
>>>>> >>
>>>>> >> Public Sub InitCapture()
>>>>> >>
>>>>> >>  If Not CatProcess Then
>>>>> >>    bytesrecorded = 0
>>>>> >>    CatProcess = Exec ["cat", "/dev/video0"] For Read
>>>>> >>    CatProcess = Exec ["cat", "/dev/video1"] For Read
>>>>> >>    CatProcess = Exec ["cat", "/dev/video2"] For Read
>>>>> >>    CatProcess = Exec ["cat", "/dev/video3"] For Read
>>>>> >>
>>>>> >>  Endif
>>>>> >>
>>>>> >>  UpdateBytesLabel()
>>>>> >>
>>>>> >> End
>>>>> >>
>>>>> >> Public Sub Process_Write(data As String)
>>>>> >>
>>>>> >>  If pic1.Picture = $cam1.Image.Picture Then
>>>>> >>   If pic2.Picture = $cam2.Image.Picture Then
>>>>> >>     If pic3.Picture = $cam3.Image.Picture Then
>>>>> >>       If pic4.Picture = $cam4.Image.Picture Then
>>>>> >>       Return
>>>>> >>       Endif
>>>>> >>     Endif
>>>>> >>   Endif
>>>>> >>  Endif
>>>>> >>
>>>>> >>  Try pic1.Picture.send(data)
>>>>> >>  Try pic2.Picture.send(data)
>>>>> >>  Try pic3.Picture.send(data)
>>>>> >>  Try pic4.Picture.send(data)
>>>>> >>  Try saveprocess.send(data)
>>>>> >>
>>>>> >>  bytesrecorded = bytesrecorded + Len(data)
>>>>> >>
>>>>> >> End
>>>>> >>
>>>>> >>
>>>>> >> Public Sub btnRecord_Click()
>>>>> >>
>>>>> >>  If btnRecord.text = "Record" Then
>>>>> >>    bytesrecorded = 0
>>>>> >>    starttime = Now
>>>>> >>    endtime = starttime
>>>>> >>    initcapture()
>>>>> >>    Tmr1_Timer()
>>>>> >>    btnRecord.text = "Stop"
>>>>> >>    SaveProcess = Exec ["bash", "-c", "cat > " & setFilename1()] For
>>>>> Write
>>>>> >>    SaveProcess = Exec ["bash", "-c", "cat > " & setFilename2()] For
>>>>> Write
>>>>> >>    SaveProcess = Exec ["bash", "-c", "cat > " & setFilename3()] For
>>>>> Write
>>>>> >>    SaveProcess = Exec ["bash", "-c", "cat > " & setFilename4()] For
>>>>> Write
>>>>> >>  Else
>>>>> >>    endtime = Now
>>>>> >>
>>>>> >>    Try saveprocess.kill
>>>>> >>    btnRecord.text = "Record"
>>>>> >>    setFilename1()
>>>>> >>    setFilename2()
>>>>> >>    setFilename3()
>>>>> >>    setFilename4()
>>>>> >>  Endif
>>>>> >> End
>>>>> >>
>>>>> >> Public Function setFilename1() As String
>>>>> >>
>>>>> >>  Dim i As Integer
>>>>> >>
>>>>> >>  i = 0
>>>>> >>  'Do While Exist(Application.Path &/ "kamera1" & i & ".mpg")
>>>>> >>  Do While Exist(User.Home &/ "kamera1" & i & ".mpg")
>>>>> >>  i = i + 1
>>>>> >>  Loop
>>>>> >>  'Return Application.Path &/ "kamera1" & Format(i, "000") & ".mpg"
>>>>> >>  Return User.Home &/ "kamera1" & Format(i, "000") & ".mpg"
>>>>> >>
>>>>> >> End
>>>>> >>
>>>>> >>
>>>>> >> Public Function setFilename2() As String
>>>>> >>
>>>>> >>  Dim i As Integer
>>>>> >>  i = 0
>>>>> >>  Do While Exist(User.Home &/ "kamera2" & i & ".mpg")
>>>>> >>    i = i + 1
>>>>> >>  Loop
>>>>> >>  Return User.Home &/ "kamera2" & Format(i, "000") & ".mpg"
>>>>> >>
>>>>> >> End
>>>>> >>
>>>>> >>
>>>>> >> Public Function setFilename3() As String
>>>>> >>
>>>>> >>  Dim i As Integer
>>>>> >>  i = 0
>>>>> >>  Do While Exist(User.Home &/ "kamera3" & i & ".mpg")
>>>>> >>    i = i + 1
>>>>> >>  Loop
>>>>> >>  Return User.Home &/ "kamera3" & Format(i, "000") & ".mpg"
>>>>> >>
>>>>> >> End
>>>>> >>
>>>>> >>
>>>>> >> Public Function setFilename4() As String
>>>>> >>
>>>>> >>  Dim i As Integer
>>>>> >>  i = 0
>>>>> >>  Do While Exist(User.Home &/ "kamera4" & i & ".mpg")
>>>>> >>    i = i + 1
>>>>> >>  Loop
>>>>> >>  Return User.Home &/ "kamera4" & Format(i, "000") & ".mpg"
>>>>> >>
>>>>> >> End
>>>>> >>
>>>>> >> Public Sub UpdateBytesLabel()
>>>>> >>  Dim i As Float
>>>>> >>  If bytesrecorded > 1048576 Then
>>>>> >>    i = Int(bytesrecorded / 100000)
>>>>> >>  Else
>>>>> >>    i = Int(bytesrecorded / 100)
>>>>> >>  Endif
>>>>> >>
>>>>> >> End
>>>>> >>
>>>>> >> Public Sub UpdateTimeLabel()
>>>>> >>
>>>>> >>  If starttime = "00:00:00" Then Return
>>>>> >>  If endtime <> starttime Then Return
>>>>> >>
>>>>> >>  TextDate1.text = Time(CDate(CInt(Now) + (Now - starttime) +
>>>>> >> timezoneadjust))
>>>>> >>
>>>>> >> End
>>>>> >>
>>>>> >> anyone can solve my problem please...?
>>>>> >>
>>>>> >> --
>>>>> >> View this message in context:
>>>>> >>
>>>>> http://old.nabble.com/Did-anyone-have-a-script-to-record-webcame-picture-in-video-files-tp30442622p30442622.html
>>>>> >> Sent from the gambas-user mailing list archive at Nabble.com.
>>>>> >>
>>>>> >>
>>>>> >>
>>>>> >>
>>>>> ------------------------------------------------------------------------------
>>>>> >> Lotusphere 2011
>>>>> >> Register now for Lotusphere 2011 and learn how
>>>>> >> to connect the dots, take your collaborative environment
>>>>> >> to the next level, and enter the era of Social Business.
>>>>> >> http://p.sf.net/sfu/lotusphere-d2d
>>>>> >> _______________________________________________
>>>>> >> Gambas-user mailing list
>>>>> >> Gambas-user at lists.sourceforge.net
>>>>> >> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>>>> >>
>>>>> >
>>>>> ------------------------------------------------------------------------------
>>>>> > Lotusphere 2011
>>>>> > Register now for Lotusphere 2011 and learn how
>>>>> > to connect the dots, take your collaborative environment
>>>>> > to the next level, and enter the era of Social Business.
>>>>> > http://p.sf.net/sfu/lotusphere-d2d
>>>>> > _______________________________________________
>>>>> > Gambas-user mailing list
>>>>> > Gambas-user at lists.sourceforge.net
>>>>> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>>>>> >
>>>>> >
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://old.nabble.com/Did-anyone-have-a-script-to-record-webcame-picture-in-video-files-tp30442622p30496252.html
>>>>> Sent from the gambas-user mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Lotusphere 2011
>>>>> Register now for Lotusphere 2011 and learn how
>>>>> to connect the dots, take your collaborative environment
>>>>> to the next level, and enter the era of Social Business.
>>>>> http://p.sf.net/sfu/lotusphere-d2d
>>>>> _______________________________________________
>>>>> Gambas-user mailing list
>>>>> Gambas-user at lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>>>>
>>>> ------------------------------------------------------------------------------
>>>> Lotusphere 2011
>>>> Register now for Lotusphere 2011 and learn how
>>>> to connect the dots, take your collaborative environment
>>>> to the next level, and enter the era of Social Business.
>>>> http://p.sf.net/sfu/lotusphere-d2d
>>>> _______________________________________________
>>>> Gambas-user mailing list
>>>> Gambas-user at lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Did-anyone-have-a-script-to-record-webcame-picture-in-video-files-tp30442622p30510255.html
>>> Sent from the gambas-user mailing list archive at Nabble.com.
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Forrester recently released a report on the Return on Investment (ROI) of
>>> Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
>>> within 7 months.  Over 3 million businesses have gone Google with Google
>>> Apps:
>>> an online email calendar, and document program that's accessible from
>>> your
>>> browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
>>> _______________________________________________
>>> Gambas-user mailing list
>>> Gambas-user at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>>
>>
>>
>>
>> --
>> Fabien Bodard
>>
>> ------------------------------------------------------------------------------
>> Forrester recently released a report on the Return on Investment (ROI) of
>> Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
>> within 7 months.  Over 3 million businesses have gone Google with Google
>> Apps:
>> an online email calendar, and document program that's accessible from your
>> browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
>> _______________________________________________
>> Gambas-user mailing list
>> Gambas-user at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>>
>
> --
> View this message in context: http://old.nabble.com/Did-anyone-have-a-script-to-record-webcame-picture-in-video-files-tp30442622p30512324.html
> Sent from the gambas-user mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Forrester recently released a report on the Return on Investment (ROI) of
> Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
> within 7 months.  Over 3 million businesses have gone Google with Google Apps:
> an online email calendar, and document program that's accessible from your
> browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



-- 
Fabien Bodard




More information about the User mailing list