Click here to Skip to main content
15,887,083 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi, i want to record video from ip camera in mp4 format, i am able to record it in avi but when the files goes above 400 mb the video get stuck in forwarding.

if i convert the same avi file to mp4 using some coverter software it works fine without any stuck.

so either i have to record it in mp4 format or i should be able to convert my avi to mp4 format.

please assist me

What I have tried:

Imports CameraSdk

Public Function saveVideoFile(ByVal StrFileName As String) As Boolean

    If m_iPlayhandle <= 0 Then
        Return False
    End If

    If Me.m_bRecord = True Then
        If Camera.H264_DVR_StopLocalRecord(m_iPlayhandle) = True Then
            m_bRecord = False
        End If
    Else

        If Camera.H264_DVR_StartLocalRecord(m_iPlayhandle, StrFileName, MEDIA_FILE_TYPE.MEDIA_FILE_AVI) Then
            m_bRecord = True
        Else
            MsgBox("Record fail")
        End If
    End If
    Return m_bRecord
End Function
Posted
Updated 17-Dec-17 3:02am

If you have an ONVIF compliant camera you can try this CodeProject solution: How to Create a Video Recording Application (NVR/DVR software) for an ONVIF IP Camera using C#.NET[^]
A word of warning: first read the Comments section !
 
Share this answer
 
What you do depends on the library you're using, whatever that "Camera" object is.

Consult the documentation on the library you're using to see if it's possible or what your options are.

With a quick look, I'd probably start by looking at that MEDIA_FILE_TYPE enum and seeing what other options are in it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900