On mini2440, the entire porting process is divided into three steps: (1) compile x264; (2) compile ffmpeg; (3) after the porting is successful, test it by using ffmpeg to record the video.
(1) Compile x264
I downloaded the latest x264 from the official website, the address is http://www.videolan.org/developers/x264.html . The file I downloaded is last_x264.tar.bz2.
The decompression command is #tar -jxv -f last_x264.tar.bz2, and the decompressed directory is x264-snapshot-20130313-2245.
Enter the unzipped directory and execute the command ./configure --disable-asm, then config.mak will be generated. Then you need to modify the config.mak file and rewrite ARCH=ARM SYS=LINUX CC=arm-linux-gcc, where CC is written to your own cross-compilation environment location, and the corresponding AR and RANLIB are also written, as shown in the figure below.
I remember that the -m32 option seemed to be deleted in lines 10 and 11. If there are no errors in the subsequent make execution, you don't need to worry about this.
Then execute make
Then execute make install, so x264 has been compiled successfully. There will be a x264.h header file in the /usr/local/include/ directory and a libx264.a library file in the /usr/local/lib/ directory.
(2) Compile ffmpeg
Download FFmpeg 0.8.14 from the official website: http://ffmpeg.org/download.html , unzip it and execute the following command:
./configure --cross-prefix=arm-linux- --enable-cross-compile --target-os=linux --cc=arm-linux-gcc --arch=arm --prefix=/usr/local/ffmpeg --enable-shared --disable-static --enable-gpl --enable-nonfree --enable-ffmpeg --disable-ffplay --enable-ffserver --enable-swscale --enable-pthreads --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-yasm --disable-stripping
ffplay is not used here, you can add it if you need it, refer to http://blog.csdn.net/liaozc/article/details/6025610 which says that you need to use the SDL library, you can try it. Modify --cc --prefix according to your own directory, then make and make install, and then find the lib include folder you want to use under --prefix.
Notice:
[1] After executing the long configure command above, there will be a warning message saying that an arm-linux-ptkconfig cannot be found, and some message like fail. I didn't take a screenshot, but it looks like this warning message. You can ignore it. I changed several files and repeated the above steps, but this warning message still appeared. I wasted a lot of time here.
【2】The process of executing make takes a long time, which requires patience.
【3】After executing make install, a ffmpeg folder will be generated under /usr/local/, as shown in the figure below.
(3) After successful transplantation, test it by using ffmpeg to record the video
Note: Because my mini2440 development board does not have enough free space, I use nfs to start the development board. If there is enough space, it is the same to put the library file directly into the board.
Copy the two library files with suffixes .so and .so.* in the /usr/local/ffmpeg/lib file in the above figure to the development board (if a library is missing, an error will be reported when executing ./ffmpeg later, saying that it cannot be found)
The red box in the above picture only shows some of the library files. They all appear in pairs, but with different suffixes.
Because there is no ffmpeg command in the development board, you need to copy the ffmpeg executable file in the /usr/local/ffmpeg/bin/ directory to the development board, and then increase its executable permissions (chmod +x ffmpeg)
Then execute the command: #./ffmpeg -f video4linux2 -s 320x240 -i /dev/video0 /mnt/test.avi. The execution process is shown in the figure below:
During the recording process, input q to stop the recording. The generated test.avi file is in the /mnt/ directory. We can watch it with a common player.
Previous article:Arm mini2440 video remote monitoring based on v4l2 ffmpeg x264
Next article:Let's learn mini2440 bare metal development (Part 3) -- S3C2440 clock learning
- Popular Resources
- Popular amplifiers
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- The difference between dsp2812 and dsp28335
- Design of intelligent window control system based on single chip microcomputer
- DSP system design - clock and power supply related issues
- Are the salaries for test development positions higher than those for development?
- Sail automatic transmission shifts too late
- Does anyone want to buy the new DY-FFTB6638 Deyan Electronics MSP430 development kit?
- Boost circuit
- What is the difference between the underlying media photons of 50 Hz and 10,000 Hz electromagnetic waves transmitted in a wire?
- MCU Music Score Coding Software
- A young man uses stones to extract silicon to make chips, claiming to "solve" the chip crisis in 99 seconds