use ffmpeg to setup streaming server on android

ffmpeg is a powerful media library. It provides ffserver tool that can be used to setup a streaming server.
Here is how to compile ffmpeg for android, using CodeSourcery's cross compiler.

1. Download and extract ffmpeg source code.
2. Use below commands to compile ffmpeg
./configure --arch=arm --cross-prefix=arm-none-linux-gnueabi- --extra-ldflags=-static      # --extra-cflags=-static
make
3. Run file ffserver && readelf ffserver -d  or  arm-none-linux-gnueabi-objdump ffserver -x | grep NEEDED commands  to make sure ffserver is statically linked
4. Transfer ffserver tool, ffserver.conf file (defines what media files will be served by ffserver) and media files  to android with adb push command
5. Start streaming server with ./ffserver -f ffserver.conf on andoird command shell
posted @ 2011-01-07 20:27  与时俱进  阅读(683)  评论(0编辑  收藏  举报
友情链接:同里老宅院民居客栈