FFmpeg porting S3C2440

Publisher:SerendipityGlowLatest update time:2024-06-25 Source: elecfansKeywords:FFmpeg Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.


Keywords:FFmpeg Reference address:FFmpeg porting S3C2440

Previous article:ARM port of x264 encoding
Next article:The first use of MaxWit and its g-bios on mini2440

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号