Semi-finished desktop recording program and Production ideas, and semi-finished desktop recording ideas

Source: Internet
Author: User

Semi-finished desktop recording program and Production ideas, and semi-finished desktop recording ideas

I. Source of thinking:

    A few days ago, I saw a TV station in the blog Park and wrote a piece of software that was enough to record videos. His principle was to use a timer control to continuously retrieve the desktop and save it to a folder, then, read the saved image file in sequence and set the interval attribute of the timer to play the image. This will make you feel like playing the video.

Reference: http://www.cnblogs.com/im0330/p/3978798.html

Ii. Your own ideas:

I think this TV station saves a lot of images to a folder. If the video needs to be recorded for a long time, it is inconvenient to store the images in this folder, if you can put all the images in the same file, it looks much better. With this idea, I started to open vs2012, which I have been storing for a long time. I thought like this. There are three buttons on the Interface: "play" and "stop". "Recording": creates a global byte set variable pRecordData to store the number of bytes on the desktop I have obtained.

The procedure for recording a video is as follows:

  • 1. Capture the desktop.
  • 2. Convert the desktop bitmap into a byte array.
  • 3. Convert the length (int) of the byte array on the desktop to a byte array.
  • 4. First, save the length of the desktop byte array (4 bytes array) to pRecordData (easy to read), and then save the desktop byte array data.
  • 5. When the video recording ends, all the bytes in the pRecordData set are directly written to a binary file.

Why do we need to save the length of the desktop byte array?The reason is as follows: I want to save all the data to this file. Of course, I have to consider how to read the data I saved. 4 Fixed bytes (an integer of the int type) are used to store the actual number of Bitmap bytes on the desktop, so that no garbled code is involved when reading the desktop.

To read a video, follow these steps:

  • 1. Read all the bytes from the saved video file and save them to pRecordData. 
  • 2. Extract the four bytes of pRecordData into an integer to obtain the number of bytes of the first bitmap. I subscript plus 4 ,.
  • 3. Read the number of bytes obtained in step 1 from the I + subscripts, so that the first image is read and the I pointer continues to increase.
  • 4. Repeat steps 2 and 3 to read all the bitmap data.

 

I thought this idea should be feasible, so I started to do it ,! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~ (Omitted hours)

Finally, I wrote the code. I was excited to press F5 and click Start recording. Then I made a variety of chaos on the screen (pretending to be recording a video). Wait about one minute, computer sudden Kaka ~~~~~~~~~~~~~~~ It's useless to let me know how to point the mouse. Ah, I thought at the time that the memory may be insufficient and the computer didn't respond. No way, it's so hard, you can only force shutdown. After I turned it off, I opened it again. I tried debugging again. This time I learned how to do it. I inserted a breakpoint in the recording video function and checked it, it is found that the count of the desktop image pRecordData is increased by 4196406 bytes each time. So many times, I set the timer interval to 100 milliseconds, that is, every second is about 10 million bytes, and then ~~~ I thought about it again, so I tried to sentence the death penalty in my heart. It's very late. I want to go to bed and try again the next day.

I went to bed yesterday and had been thinking about how to solve the memory problem. When I got up this morning, I opened this unwilling project and looked at the code. I kept asking myself in my mind, "The program occupies the memory because I store the captured desktop images in the memory every time. The more I store the images, the more I can't wait for the computer to die. Since it cannot be stored in the memory, where should I store it?" In this way, I repeatedly asked myself at the bottom of my heart. Soon, I had a little thought. I wrote the saved bitmap to a temporary file, so that the memory would not be full, the computer is stuck.

3. Ideas after improvement:

  • 1. Create a temporary binary file first.
  • 2. Each time a desktop bitmap is obtained, the bitmap is written to a temporary file.

With this idea, I started to write the code. at noon, I wrote the rough code and started debugging, when the recording time was over 30 seconds, I found that the memory and cpu parameters were still quite normal. When I looked at the disk, it was so bad that it actually occupied 100% of the total, the saved temporary file also has more than 1 GB. After seeing such data, I was again silenced.

Although the attempt ended in failure again, it has improved a lot compared with the previous one. At least three minutes of recording can be used to record instantaneous things. It won't let your computer get stuck.

 There is another improvement,

It means that four bytes are used before each frame of the desktop bitmap to save all the bytes of the bitmap. In fact, it is unnecessary because the bitmap of the same desktop is captured every time, the size is the same and the desktop bitmap captured each time is the same. Therefore, you only need to use the first four bytes of the file to save the length of the bitmap, then, you can read a piece of data in bytes at a fixed length, saving some memory. But it still does not play any major role.

4. Areas to be improved (I don't know if my own ideas are feasible)

  • 1. each time you write data, you can compress each bitmap file and then write it into the file. You can decompress it when reading the file. c # Comes with a class library like this, in this way, the data volume can be reduced from 1 GB to 100 MB, or even less (I did not try it)
  • 2. Do not write or read files frequently. Read more and write more bytes each time. Based on the previous two ideas, we should establish a pRecordData byte set in the program, write the compressed desktop bitmap to pRecordData each time, and then determine whether the data in pRecordData has reached a certain amount, if it reaches the level of writing data to a temporary file, the disk does not need to be read frequently.

These two ideas may solve the problem of file size and disk usage during running.

Iv. Summary

1. This video software cannot record sound information.

2. There are also some areas for improvement. Because this time is still busy with review, I have no time to try again and I will try again later.

3. LearnedBitConverterEnhanced the use of Class LibrariesMemoryStreamUse of the class library. (The main function is to convert the basic data types and byte arrays .)

The following is the key code for converting bitmap to byte and converting byte to bitmap.

/// <Summary> /// convert the bitmap into a memory stream // </summary> /// <param name = "btm"> </param> // <returns> </returns> private byte [] BtmToByte (Bitmap btm) {using (MemoryStream MS = new MemoryStream () {btm. save (MS, System. drawing. imaging. imageFormat. bmp); return ms. toArray ();}} /// <summary> /// generate a bitmap for the byte array /// </summary> /// <param name = "data"> byte array </param> // /<returns> </returns> private Bitmap ByteToBtm (byte [] data) {Bitmap btm; using (MemoryStream MS = new MemoryStream (data) {btm = Image. fromStream (MS) as Bitmap;} return btm ;}

 

 

If a newbie sees this article and wants to share the source code with him, leave a mailbox below and I will send it to you as soon as possible.

If you have read this article, please do not give me any further information (discover my shortcomings or provide a feasible solution). Thank you very much.

 

 


Desktop operation recording software

Desktop Video genie V1.13 [provides recording screens, selection areas, and fixed areas] The Green Special Edition Desktop video genie (Easy Desktop Recorder) is a simple and Easy-to-use screen recording software, this allows you to easily record your screen display and microphone input as AVI video files. Multiple recording modes are provided, including recording the entire screen, recording selection area, and recording fixed area. Recording can include video, audio, actual cursor, and custom cursor, it can also be set to dynamically move the recording area with the cursor. The software has a wide range of audio and video parameter settings and can customize operation hotkeys. The interface is simple, elegant, and easy to operate. It is a green software. = T & T team = shared intelligence = Software Download Page: www.9553.com/soft/1821.htm Adobe Captivate (screen recording) V3.0 special Chinese edition + + Adobe Captivate 3 is a screen recording software. It is easy to use. Anyone without programming knowledge or multimedia skills can quickly create powerful Software demos and training content. It can automatically generate interactive content in Flash format, without the need for users to learn Flash. Quickly create fascinating learning experiences, using Adobe Captivate, anyone without programming knowledge or multimedia skills can quickly create powerful, fascinating simulations, Software demos, and scenario-based training. Based on the industry-leading Adobe Flash Platform, Adobe Captivate automatically generates interactive content in Flash format, without the need for users to learn Flash. Adobe Inc., a software manufacturer, recently launched Adobe Captivate 3, a more advanced FLASH-based software. According to Adobe, the new software can automatically record any action on the screen, create Flash documents, and quickly create interactive training and software tutorials, demos, and simulations. According to odbi, Captivate 2 will generate FLASH interaction content after connecting with e-education professors, trainers, and other persons capable of providing computer guidance, you do not need to have programming knowledge or other multimedia skills. = T & T team = shared intelligence = ++ Adobe Captivate 3 software, anyone without programming knowledge or multimedia skills can quickly create powerful, engaging simulations, Software demos, scenario-based training and quizzes. By using the simple click User Interface and automation functions of the software, professionals, educators, and business and enterprise users who study software can easily record screen operations, add E-Learning interactions, and create complex branch scenarios with feedback options, and contains a wide range of media = T & T team = shared intelligence = use the official English official version + samson Chinese package production, no serial number free activation! Software Download Page: www.newdou.com/soft/34758.html
 
Desktop Video Recording Software

First Domestic gamer baby
It's easy for you to know About Baidu.
Other foreign P software is easy to use and requires money.
I have been exploring for a long time before.
To find the recommended use of the player's baby

No, that's it. I 've been using him to record games, but I haven't recorded any other videos. It's really amazing.

But do you have a self-saved video after recording? Is that okay? Just delete the uploaded video. Why do you have to upload it?

If it doesn't work, use a screen recording expert. Do not use Fraps. Although it is clear, it can occupy memory and there is still a recording time limit.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.