Compile and run jm18.6 in visual stdio 2012

Source: Internet
Author: User

JM is the official implementation of H.264 encoding. Compared with the open-source implementation of x264, JM is complete and the code is more standardized. It also provides the encoding and decoding processes for comparative analysis. However, the biggest drawback of JM is that its efficiency is lower than that of x264. Therefore, many applications are based on x264. However, if we want to study it, JM should be more keyi.

Jm18.6 supports multiple Linux, UNIX, and Windows platforms. Later versions of JM also provide support for vc6.0, but the latest version does not seem to support it any more, because many materials on the Internet refer to "TMl. DSW "file, apparently this is the project file of vc6.0, but this file is not in the file directory. However, jm18.6 also supports different versions of vs for Windows platforms, such as "jm_vc8.sln", "jm_vc9.sln", and "jm_vc10.sln". If vs2012 is used, select "jm_vc10sln ", then let vs automatically update it.


Figure 1 jm18.6 original file list


Decompress jm18.6 and open the file directory, as shown in List 1.

Double-click "jm_vc10.sln". The following dialog box may appear. This is because JM cannot keep running with Microsoft's vs version, and it is not necessary. Therefore, only vs2010 is supported here. In fact, you can only click Update to automatically update to vs2012.


Figure 2 update the VC ++ Library

After the update, you can see the following four subfolders in the Resource Manager interface. The functions are h264/AVC encoding, decoding, RTP packet content analysis, and simulation of RTP packet loss tests.



Figure 3 four modules in solution Manager

Click the "use local Windows Debugger" Debugger in the menu bar, and you will be prompted to update the debugger. Click Update. This process is long and will update all the old databases and generate the latest executable files.

A series of configuration files and test files suffixed with. cfg.

After the code is completed, press Ctrl + F5 to execute the encoding program. The following form is displayed.



Figure 4 encoding configuration file not found

The configuration file "encoder. cfg. Solution: Right-click lencod in the resource manager and choose Properties> Configuration Properties> debugging> command line parameters ", enter the complete path of an encoding configuration file in the bin folder of your JM project in the command line parameters, but remember, first Add "-d" (-D must be followed by a space between the path) and then enter the path. For example, my name is "-d F:/JM/bin/encoder_baseline.cfg ".

Then compile lencod to find that the program can be executed:


Figure 5 unable to find the YUV file to be encoded

By default, this program encodes the "foreman_part_qcif.yuv" file under Bin into a "test.264" file. If this file is not in your bin path, or the generated time is not your current time, the preceding dialog box is displayed, indicating that the program does not encode the file foreman_part_qcif.yuv.

The solution is to open the "encoder_baseline.cfg" file using a common text compiler, locate the following two locations, and set them to the absolute path of the file respectively.


Figure 6 modify the encoder. cfg file

For example, I set the two paths:

Inputfile = "F:/JM/bin/foreman_part_qcif.yuv" # input sequence

Outputfile = "F:/JM/bin/test.264" # bitstream

 

Run the command again, and then you can see the generated test.264 file in the bin directory. Use the streameye player to check the file:


Figure 7 result of Code Execution

 


Compile and run jm18.6 in visual stdio 2012

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.