Newest 'ffmpeg' Questions - Stack Overflow

http://stackoverflow.com/questions/tagged/ffmpeg

Les articles publiés sur le site

  • Android and ffmpeg libb - can't build

    15 décembre 2011, par nmnir

    I'm trying to build my native app with ffmpeg. the ndk-build output is $ ../../../ndk-build Prebuilt : libffmpeg.so <= cp: omitting directory/cygdrive/c/android2/android-ndk-r6/samples/native-audio/jni' make: * [/cygdrive/c/android2/android-ndk-r6/samples/native-audio/obj/local/armeabi/libffmpeg.so] Error 1

    Here is my Android.mk:

    LOCAL_PATH := $(call my-dir) 
    #declare the prebuilt library 
    include $(CLEAR_VARS) 
    LOCAL_MODULE := ffmpeg-prebuilt 
    LOCAL_SRC_FILES := ffmpeg/android/armv7-a/libffmpeg.so 
    LOCAL_EXPORT_C_INCLUDES := ffmpeg/android/armv7-a/include 
    LOCAL_EXPORT_LDLIBS := ffmpeg/android/armv7-a/libffmpeg.so 
    LOCAL_PRELINK_MODULE := true 
    include $(PREBUILT_SHARED_LIBRARY) 
    
    include $(CLEAR_VARS) 
    LOCAL_ALLOW_UNDEFINED_SYMBOLS=false 
    LOCAL_MODULE := native-audio-jni 
    LOCAL_SRC_FILES := native-audio-jni.cpp 
    LOCAL_C_INCLUDES := $(LOCAL_PATH)/ffmpeg/android/armv7-a/include 
    LOCAL_SHARED_LIBRARY := ffmpeg-prebuilt 
    LOCAL_LDLIBS    := -lOpenSLES -landroid -llog -ljnigraphics -lz -lm $(LOCAL_PATH)/ffmpeg/android/armv7-a/libffmpeg.so 
    LOCAL_STATIC_LIBRARY := stdc++
    include $(BUILD_SHARED_LIBRARY)
    
  • Building native app with ffmpeg lib

    15 décembre 2011, par nmnir

    I have created libffmpeg.so using the android build system. Now I'm trying to use in my app. Pls help me with following questions:

    1. How do I add ffmpeg to my includes directory?
    2. How do I link to ffmpeg.so?

    Thanks, Nahum


    Well I did at written, getting the following error: 1.7.9(0.237/5/3) Prebuilt : libffmpeg.so <= cp: omitting directory/cygdrive/c/android2/android-ndk-r6/samples/native-audio /jni' make: * [/cygdrive/c/android2/android-ndk-r6/samples/native-audio/obj/local/ar meabi/libffmpeg.so] Error 1`

    Please advice. Thanks, Nahum

  • Creating a pipe between C# and Ffmpeg

    15 décembre 2011, par John Oliver

    I have a C# program that creates a video and saves it to the disk in real-time. Instead of doing that, I want it to write it directly in a pipe connected with ffmpeg...

    The function that keeps saving the video in the disk, which I can not control, receives an IntPtr with a reference to the file.

    So, I need to create a pipe or something like that with ffmpeg, get a pointer to that, and use that pointer in the function, so that it streams the file to ffmpeg and not the disk...

    Regards, John Oliver

  • How to encode video using ffmpeg-java on Android from Bitmaps ?

    15 décembre 2011, par gtcompscientist

    I am using ffmpeg-java compiled for Android to encode/decode video for my application.

    The problem that I've run into is that I am currently getting each frame as a Bitmap (just a plain android.graphics.Bitmap) and I can't figure out how to stuff that into the encoder.

    Here is the code that I am using to instantiate all the ffmpeg libraries:

        AVCodecLibrary cLibrary = AVCodecLibrary.INSTANCE;
        cLibrary.avcodec_register_all();
        cLibrary.avcodec_init();
    
        AVFormatLibrary fLibrary = AVFormatLibrary.INSTANCE;
        fLibrary.av_register_all();
    
        //AVUtilLibrary uLibrary = AVUtilLibrary.INSTANCE;
        //uLibrary.av_malloc();
    
        AVCodec pCodec = cLibrary.avcodec_find_encoder(AVCodecLibrary.CODEC_ID_H263);
        if (pCodec == null)
        {
            Logging.Log("Unable to find codec.");
            return;
        }
        Logging.Log("Found codec.");
    
    
        AVCodecContext codecCtx = cLibrary.avcodec_alloc_context();
        codecCtx.bit_rate = 64000;
        codecCtx.coded_width = VIDEO_WIDTH;
        codecCtx.coded_height = VIDEO_HEIGHT;
        codecCtx.time_base = new AVRational(1, VIDEO_FPS);
        codecCtx.pix_fmt = AVCodecLibrary.PIX_FMT_YUV420P;
        codecCtx.codec_id = AVCodecLibrary.CODEC_ID_H263;
        //codecCtx.codec_type = AVMEDIA_TYPE_VIDEO;
    
        if (cLibrary.avcodec_open(codecCtx, pCodec) < 0)
        {
            Logging.Log("Unable to open codec.");
            return;
        }
        Logging.Log("Codec opened.");
    

    This is what I want to be able to execute next:

    cLibrary.avcodec_encode_video(codecCtx, pPointer, pFrame.size(), pFrame);
    

    But, as of now, I don't know how to put the Bitmap into the right piece or if I have that setup correctly.

    A few notes about the code: - VIDEO_WIDTH = 352 - VIDEO_HEIGHT = 288 - VIDEO_FPS = 30; - I'm unsure about how pPointer and pFrame are handled.

  • Anybody has any idea how this site works ? www.ivipid.com [closed]

    14 décembre 2011, par Aamir Siddique

    I am a website developer (php) and i have been given a task to develop a similar website:

    http://ivipid.com/

    I need to make an identical website and i am trying to figure out how this can be done.

    Any ideas would be highly appreciated, please advice.

    Thanks!