ffmpeg, Debugging Android FFmpeg (1)

Source: Internet
Author: User
<span id="Label3"></p><p><p>Target issues</p></p> <ol> <ol> <li><p>For JPEG encoding why not use LIBJPEG instead of MPEG (right is this movie antique Format) code?</p><p>Actually found even WMV and so on some usually do not need to break things, are and MPEG antique common use a set of Code. Does JPEG have anything to do with mpeg? Overhead Not much?</p></li> <li><p>Why is MJPEG (that is, continuous JPEG) encoded output, when encoding the n+1 sub-graph to really output the JPEG encoding results of the nth image?</p></li> <li><p>Each get a copy of the original input data, then the memory seems to be copied to new memory, and then discarded, huge picture of the time, this copy is a waste of cpu, how to let him not copy but directly with Raw memory. anyway, a picture is not anxious, why copy it.</p></li> </ol> </ol><p><p><br></p></p><p><p>first, a ffmpeg command line for android, to debug version, The key is configure when added</p></p><pre><pre>--enable-debug--disable-stripping</pre></pre><p><p>For example:</p></p><p><p>Prepare a standard GCC tool chain from the NDK for subsequent cross-platform Compilation.</p></p><pre>echo ---------------make standard gcc tool chain from android  NDK--------------------ls -d ./std_toolchain && { echo ./std_toolchain  already exist; exit 0; }printenv android_ndk_root > /dev/null  | |  { echo please export android_ndk_root=root_dir_of_your_android_ndk; exit 1 ;  }platform=$ (basename $ (ls -d  $ANDROID _ndk_root/platforms/android-8));  test -z   $PLATFORM  && exit 1toolchain=$ (basename $ (ls -d  $ANDROID _ndk_root/ toolchains/arm-linux-androideabi-[4-5].* | tail -n 1)); test -z  $TOOLCHAIN  && exit 1work_system=$ (basename $ (ls -d  $ANDROID _ndk_root/toolchains/ arm-linux-androideabi-[4-5].*/prebuilt/* | tail -n 1)); test -z  $WORK _ System &&&nbsP;exit 1$android_ndk_root/build/tools/make-standalone-toolchain.sh --install-dir=./std_toolchain  --platform= $PLATFORM  --toolchain= $TOOLCHAIN  --system= $WORK _system --arch=arm -- verboseecho  ""; echo ok; echo  "" export path= "$PWD/std_toolchain/bin: $PATH" Export  cc=arm-linux-androideabi-gcc</pre><p><p>And then go to Ffmpeg's Source to execute the Configure.</p></p><pre><pre>./configure--enable-cross-compile--cross-prefix=arm-linux-androideabi---target-os=linux--arch=armv7--cpu= Armv7-a--disable-doc--disable-ffplay--disable-ffprobe--disable-ffserver--disable-symver--enable-debug--disable -stripping--disable-everything--enable-static--enable-protocol=pipe--enable-filter=scale--enable-filter=cro P--enable-filter=transpose--enable-demuxer=rawvideo--enable-decoder=rawvideo--enable-muxer=image2--enable-muxe R=image2pipe--enable-muxer=mjpeg--enable-encoder=mjpeg</pre></pre><p><p>Just an example, leaving only support for the Rawvideo input format and the MJPEG output format.</p></p><p><p>Then make, get Ffmpeg.</p></p><p><p>Uploaded to Android/data/local/tmp/.</p></p><p><p><span style="line-height: 22.5px;">(some More specific preparatory steps refer to</span> Android native debug: manual use of gdbserver Remote Debug C code <span style="line-height: 22.5px;">)</span></p></p><p><p>then, Start gdbserver,</p></p><p><p>Cond.<br></p></p><p><p><br></p></p><p><p>ffmpeg, Debugging Android FFmpeg (1)</p></p></span>

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.