FFmpeg porting process:
FFmpeg is an open source, free, cross-platform video and audio streaming solution. It is free software and uses the LGPL or GPL license. Its porting also follows the LGPL or GPL porting method: configure, make, make install.
1. Download the ffmpeg open source library (ffmpeg-0.5.tar.bz2) and put it in the corresponding folder.
#tar jxvf ffmpeg-0.5.tar.bz2
#cd ffmpeg-0.5
2. Configure compilation options
#./configure --cross-prefix=/usr/local/arm/3.4.1/bin/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 --enable-ffplay --enable-ffserver --enable-swscale --disable-vhook --enable-pthreads --disable-network --disable-ipv6 --enable-libamr-nb --enable-libamr-wb --enable-libfaac --enable-libfaad --enable-libmp3lame --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-yasm --disable-stripping --disable-optimizations --extra-cflags=-I/usr/local/ffextra/include --extra-ldflags=-L/usr/local/ffextra/lib
Cross compiler: arm-linux-gcc3.4.1
--cflags: ffmpeg third-party library header file declaration
--extra-ldflags: third-party library file path
3.
#make
4.
#make install
Copy the compiled library to the 2440 development board and configure the environment variables.
Compilation process error:
1:libavcodec/arm/dsputil_arm_s.S
libavcodec/arm/dsputil_arm_s.S: Assembler messages:
libavcodec/arm/dsputil_arm_s.S:25: Error: unknown pseudo-op: `.eabi_attribute'
libavcodec/arm/dsputil_arm_s.S:641: Error: bad instruction `push {r4-r10}'
libavcodec/arm/dsputil_arm_s.S:724: Error: bad instruction `pop {r4-r10}'
make: *** [libavcodec/arm/dsputil_arm_s.o] 错误 1
Solution: When making, some asm instructions cannot be found in
ffmpeg-0.5/libavcodec/arm/asm.S.
Line 24: .eabi_attribute 24, /val is changed to @.eabi_attribute 24, /val.
Line 28: .eabi_attribute 25, /val is changed to @.eabi_attribute 25, /val.
ffmpeg-0.5/libavcodec/arm/dsputil_arm_s.S
Line 641: push {r4-r10} is changed to stmfd sp!, {r4-r10} @ push {r4-r10}
Line 724: pop {r4-r10} is changed to ldmfd sp!, {r4-r10} @ pop {r4-r10}
2:/home/liao/ffmpeg-0.5/libavcodec/libavcodec.so: undefined reference to `dlerror'
/home/liao/ffmpeg-0.5/libavcodec/libavcodec.so: undefined reference to `dlclose'
/home/liao/ffmpeg-0.5/libavcodec/libavcodec.so: undefined reference to `dlopen'
/home/liao/ffmpeg-0.5/libavcodec/libavcodec.so: undefined reference to `dlsym'
Solution: The libdl library file is missing. Add the library file in the Makefile file.
Line 68: ffserver_g$(EXESUF): FF_LDFLAGS += $(FFSERVERLDFLAGS) followed by FF_LDFLAGS += -ldl
At this point, ffmpeg can be compiled successfully! !
Notice:
ffplay in ffmpeg requires SDL support. To compile ffplay, you need to follow the steps below:
Compile SDL and copy its include and lib files to the third-party library path (/usr/local/ffextra)
Modify line 2042 of the configure file before configuring:
SDL_CONFIG="${cross_prefix}sdl-config"改为SDL_CINFIG="/usr/local/sdl/bin/sdl-config"
ffmpeg decodes mp3 and wma audio formats into floating point types, which makes it difficult to run smoothly on arm.
Previous article:ARM port of x264 encoding
Next article:The first use of MaxWit and its g-bios on mini2440
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- FPGA Advanced Timing Synthesis Tutorial.pdf
- [GD32L233C-START Review] 6. Fingerprint Management System (2) - Added brightness adjustment
- [Sipeed LicheeRV 86 Panel Review] 15. lvgl calendar control and weather display
- Can RTthread be ported to nrf51822?
- A bug solution for CH548/CH549 ADC routine
- [Project source code] BMP2mif file software, convenient for using ROM to store image data and display
- I want to control the on and off of NMOS through a 3.3V microcontroller
- Domestic FPGA brand Anlu
- The load is a 3000W heating plate, controlled by two 16A relays
- "Detailed Explanation of Embedded Linux System Development Technology--Based on ARM (Full Version)" e-book free