Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Getting exception while loading ffmpeg library
16 septembre 2012, par user1662334I am using ffmpeg library in one of my sample project.I have compiled it successfully,but while loading the library,i am getting the exception that this library is not found.
This is the Android.mk code:
LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := ffmpegutils LOCAL_SRC_FILES := native.c LOCAL_C_INCLUDES := $(LOCAL_PATH)/include LOCAL_LDLIBS := -L$(NDK_PLATFORMS_ROOT)/$(TARGET_PLATFORM)/arch-arm/usr/lib -L$(LOCAL_PATH) -lavformat -lavcodec -lavdevice -lavfilter -lavcore -lavutil -lswscale -llog -ljnigraphics -lz -ldl -lgcc include $(BUILD_SHARED_LIBRARY)
This is the code:
public class MainActivity extends Activity { private static native void openFile(); private static native void drawFrame(Bitmap bitmap); private static native void drawFrameAt(Bitmap bitmap, int secs); private Bitmap mBitmap; private int mSecs = 0; static { System.loadLibrary("ffmpegutils"); } /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //setContentView(new VideoView(this)); setContentView(R.layout.main); mBitmap = Bitmap.createBitmap(320, 240, Bitmap.Config.ARGB_8888); openFile(); Button btn = (Button)findViewById(R.id.frame_adv); btn.setOnClickListener(new OnClickListener() { public void onClick(View v) { drawFrame(mBitmap); ImageView i = (ImageView)findViewById(R.id.frame); i.setImageBitmap(mBitmap); } }); Button btn_fwd = (Button)findViewById(R.id.frame_fwd); btn_fwd.setOnClickListener(new OnClickListener() { public void onClick(View v) { mSecs += 5; drawFrameAt(mBitmap, mSecs); ImageView i = (ImageView)findViewById(R.id.frame); i.setImageBitmap(mBitmap); } }); Button btn_back = (Button)findViewById(R.id.frame_back); btn_back.setOnClickListener(new OnClickListener() { public void onClick(View v) { mSecs -= 5; drawFrameAt(mBitmap, mSecs); ImageView i = (ImageView)findViewById(R.id.frame); i.setImageBitmap(mBitmap); } }); } }
This is the exception:
09-16 15:00:06.272: E/AndroidRuntime(392): Uncaught handler: thread main exiting due to uncaught exception 09-16 15:00:06.291: E/AndroidRuntime(392): java.lang.ExceptionInInitializerError 09-16 15:00:06.291: E/AndroidRuntime(392): at java.lang.Class.newInstanceImpl(Native Method) 09-16 15:00:06.291: E/AndroidRuntime(392): at java.lang.Class.newInstance(Class.java:1479) 09-16 15:00:06.291: E/AndroidRuntime(392): at android.app.Instrumentation.newActivity(Instrumentation.java:1021) 09-16 15:00:06.291: E/AndroidRuntime(392): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2409) 09-16 15:00:06.291: E/AndroidRuntime(392): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512) 09-16 15:00:06.291: E/AndroidRuntime(392): at android.app.ActivityThread.access$2200(ActivityThread.java:119) 09-16 15:00:06.291: E/AndroidRuntime(392): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863) 09-16 15:00:06.291: E/AndroidRuntime(392): at android.os.Handler.dispatchMessage(Handler.java:99) 09-16 15:00:06.291: E/AndroidRuntime(392): at android.os.Looper.loop(Looper.java:123) 09-16 15:00:06.291: E/AndroidRuntime(392): at android.app.ActivityThread.main(ActivityThread.java:4363) 09-16 15:00:06.291: E/AndroidRuntime(392): at java.lang.reflect.Method.invokeNative(Native Method) 09-16 15:00:06.291: E/AndroidRuntime(392): at java.lang.reflect.Method.invoke(Method.java:521) 09-16 15:00:06.291: E/AndroidRuntime(392): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) 09-16 15:00:06.291: E/AndroidRuntime(392): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 09-16 15:00:06.291: E/AndroidRuntime(392): at dalvik.system.NativeStart.main(Native Method) 09-16 15:00:06.291: E/AndroidRuntime(392): Caused by: java.lang.UnsatisfiedLinkError: Library ffmpegutils not found 09-16 15:00:06.291: E/AndroidRuntime(392): at java.lang.Runtime.loadLibrary(Runtime.java:489) 09-16 15:00:06.291: E/AndroidRuntime(392): at java.lang.System.loadLibrary(System.java:557) 09-16 15:00:06.291: E/AndroidRuntime(392): at com.churnlabs.ffmpegsample.MainActivity.
(MainActivity.java:36) Please help me.Thanks in advance.
-
What are the differences between FFmpeg and Libav ? [closed]
16 septembre 2012, par KenAccording to the first comment for this question, and i quote
"Libraries with this name are provided from both the FFmpeg project and the Libav project, but they are mutually incompatible". So I think the answer depends on which libavcodec do you want to use.
What are the differences that exist between this 2 projects ?
I'm interested in video and audio encoding to H/X264, Mp3 and AAC with Mp4/Mkv containers; but more importantly i would like to start with a reliable and up to date library with a permissive license and widely supported on as many platforms as possible.
-
Is it possible to use dex2jar converted jar file into your project
15 septembre 2012, par swapnil adsurei want to use ffmpeg decoder for my android project but i am having lots of error and config problem to compile it. but today i read about apk recompiling by dex2jar. so My question is " it is possible to use that dex2jar.jar file into your project ?. Like is it possible for me to use ffmpeg decoder into my project by importing that jar file into my project?. and same case with vitamio plugin . so if it is possible than i just need to add that plugin jar into my project and link with code and user dont need to download extra plugin. waiting for reply
thank you
-
FFMPEG with PHP does not execute ?
15 septembre 2012, par ConorAfter reading about a gazillion questions here on SO related to FFMPEG with PHP I have gotten together a small snippet or what-not, but it does not seem to do anything - not even throw errors.
My PHP is as follows:
function get_video_thumbnail($file) { define('ALL_PLACE_WIDTH', 250); define('ALL_PLACE_HEIGHT', 200); $ffmpeg = "ffmpeg"; // where ffmpeg is $image_source_path = $file; // where the video is $image_cmd = " -r 1 -ss 00:00:10 -t 00:00:01 -s ".ALL_PLACE_WIDTH."x".ALL_PLACE_HEIGHT." -f image2 "; // command $dest_image_path = "cdn/thumbnails"; // destination of thumbnail $str_command = $ffmpeg ." -i " . $image_source_path . $image_cmd .$dest_image_path; shell_exec($str_command); }
in the root folder there's a folder "ffmpeg" in what there's "ffmpeg.exe", "ffplay.exe" and "pthreadGC2.dll". So I'm wondering, is there anything I'm missing? I'm trying to generate a thumbnail from a video/mp4 file.
-
xuggler on debain compiling error [closed]
14 septembre 2012, par Marcel ColombI try to install xuggler on a debian server. If I run:
ant run-tests
I get following Error:
[exec] libavutil/../subdir.mak:96: warning: overriding commands for target `libavutil/' [exec] libavutil/../subdir.mak:26: warning: ignoring old commands for target `libavutil/' [exec] libavutil/../subdir.mak:96: warning: overriding commands for target `libavutil/' [exec] libavutil/../subdir.mak:96: warning: ignoring old commands for target `libavutil/' [exec] Makefile:239: /tests/fate.mak: No such file or directory [exec] Makefile:240: /tests/fate2.mak: No such file or directory [exec] Makefile:242: /tests/fate/aac.mak: No such file or directory [exec] Makefile:243: /tests/fate/als.mak: No such file or directory [exec] Makefile:244: /tests/fate/fft.mak: No such file or directory [exec] Makefile:245: /tests/fate/h264.mak: No such file or directory [exec] Makefile:246: /tests/fate/mp3.mak: No such file or directory [exec] Makefile:247: /tests/fate/vorbis.mak: No such file or directory [exec] Makefile:248: /tests/fate/vp8.mak: No such file or directory [exec] make[3]: *** No rule to make target `/tests/fate/vp8.mak'. Stop. [exec] make[2]: *** [all-local] Error 2 [exec] make[1]: *** [all-recursive] Error 1 [exec] make: *** [all-recursive] Error 1 [exec] make[3]: Leaving directory `/usr/local/xuggle-xuggler/build/native/x86_64-unknown-linux-gnu/captive/ffmpeg/csrc' [exec] make[2]: Leaving directory `/usr/local/xuggle-xuggler/build/native/x86_64-unknown-linux-gnu/captive/ffmpeg' [exec] make[1]: Leaving directory `/usr/local/xuggle-xuggler/build/native/x86_64-unknown-linux-gnu/captive'
Is someone having the same issue and solved it? Thank you