Video recording does not work properly

Forum Forums Visual Components 4.1 General Product Questions Video recording does not work properly

This topic contains 6 replies, has 2 voices, and was last updated by Avatar haroon 1 year, 3 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #6912
    Avatar
    haroon
    Participant

    Hello,

    I am trying to record video of my simulation but it does not record properly. I am using Python API and I connect to Simulink using TCP/IP. The connection is made and it works but the screen is black and you cannot see anything. You can see a little of the coordinate system at the top left corner but rest of the screen where recording is done, is black. When you click stop recording and finish, then a non playable corrupt file is being generated.

    If you stop the connection from Simulink side so then the simulation screen appears and the video starts recording (as the seconds counter starts). But thats of no use, because its not connected. Does anyone have this problem?
    I am writing it here because the support form response is too slow and I need immediate help with some things (apart from this). Thank you.

    Attachments:
    You must be logged in to view attached files.
    #6923
    zesty
    zesty
    Moderator

    Does the screen go black when you run the simulation without recording video?

    Did you try recording with a simulation mode of Real Time?

    Are you doing any camera movements during simulation?

    #6925
    Avatar
    haroon
    Participant

    Does the screen go black when you run the simulation without recording video?
    NO

    Did you try recording with a simulation mode of Real Time?
    YES same result, black screen

    Are you doing any camera movements during simulation?
    YES and NO, no effect in both cases

     

     

    #6930
    zesty
    zesty
    Moderator

    In Simulink, is the simulation running the same time as the simulation in VC? If yes, then what update rate are using and is it bi-directional?

    Have you tested with running Simulink in step-through mode?

    Is the state of connection dependent on if simulation is running? For example, are you establishing the connection in OnRun() event?

    Sorry for the questions. My first guess would be that the there is an issue with the rendering service and compression done for video while the simulation is running.

    If you do not want to waste time, use external tool to record the video until the support ticket is resolved.

    #6938
    Avatar
    haroon
    Participant

    In Simulink the time T is faster than the SimTime of the Simulation
    The Simulation simtime is something like in 0.0001234
    and when the connection to Simulink stops, then the timer on top continues faster by completing 1st second and counting faster furtherly

    Step through mode ???

    Yes its under OnRun() event

    The problem is the whole simulation takes like 20 minutes
    and if I use the external screengrabber
    It becomes bigger than 4gb in like 3 minutes
    So it is also not practical

    The simulation is too slow probably because of the several ray cast sensors used

    #6942
    zesty
    zesty
    Moderator

    Sorry, my friend, I cannot help you.

    Step through is available in Simulink. Sorry, I’ve never used Simulink; more familiar with stepping in LabView to troubleshoot issues.

    https://www.mathworks.com/help/simulink/ug/stepping-through-a-simulation.html

    Establishing a socket connection during the simulation in a Python Script might be something others are more familiar with. It might be as simple as adding some delay() statements in the script.

    If your screengrabber is doing that then what are your settings: 4K at 60fps? I record QHD at 30fps with Camtasia recorder and only ever get into 1GB territory when the video is over 40min. And if you need to record parts of the simulation, the Warm Up simulation setting is useful to quickly get to the needed state.

    If you want, let us see the log file or snippet from them that explains what happens when you start the simulation and the viewport goes dark.

    C:\Users\%username%\AppData\Local\Visual Components\Visual Components Premium 4.1\Logs

    #6948
    Avatar
    haroon
    Participant

    OK thanks for the help 🙂
    I got the proper settings for external screen grabber.
    Step through I misunderstood for something else.
    I will look into the logfile myself now.

    The basic problem I am facing is the slow simulation speed due to the several raycast sensors used.
    I solved the video making process by using an external grabber.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.