Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • How to create video preview from sequence image

    17 février 2017, par diepnt

    I am developing a project create video and animation from sequence image. I have created a video using opencv but it takes a long time. I need to do function transition effects preview without creating video file. After choose image sequence and click button then create preview video with multiple effect. Click and will play immediately with seekbar duration controller. Who can help me to find solutions to this problem. Thanks!

    video preview

  • ffmpeg crops video, but doubles size

    17 février 2017, par Michael Cole

    I rendered an mp4 from kdenlive and it looks great (1920x1080).

    I want to crop the video, and transcode to ogv for browsers.

    I tried this, but the ffmpeg makes a much larger file for the cropped version:

    ffmpeg -i untitled.mp4 -filter:v "crop=1920:760:0:0" masthead.mp4
    ffmpeg -i masthead.mp4 masthead.ogv
    

    This video is background for a web page, so I'm exporting from kdenlive with low quality video settings and no audio.

    Original is untitled.mp4:

    186907 Feb 16 19:17 untitled.mp4
    606241 Feb 16 19:18 masthead.mp4
    434127 Feb 16 19:18 masthead.ogv
    

    The output is here: http://pastebin.com/WYjHAuCC

    untitled.mp4 looks ok (great for it's purpose). masthead.mp4 looks good but it's huge, and masthead.ogv is very pixelated.

    Any suggestions?

  • 'imported-lib - NOTFOUND' in building ffmpeg 3.2 for android studio 2.2

    17 février 2017, par mdang

    I am trying to build and use ffmpeg for Android. My Andoid Studio version is 2.2.2 and ffmpeg is 3.2. Following Android documentation on how to import rebuild library, I think I got the setting right but kept on getting this error

    ninja: error: 'avcodec-NOTFOUND', needed by '../../../../build/intermediates/cmake/debug/obj/armeabi-v7a/...
    

    This is the setting

    add_library( avcodec SHARED IMPORTED )
    add_library( avdevice SHARED IMPORTED )
    add_library( avfilter SHARED IMPORTED )
    add_library( avformat SHARED IMPORTED )
    add_library( avutil SHARED IMPORTED )
    add_library( swscale SHARED IMPORTED )
    
    set_target_properties( avcodec
                            PROPERTIES FFMPEG_LIB_IMPORTED_LOCATION
                            libs/ffmpeg/${ANDROID_ABI}/lib/libavcodec.so
                            )
    set_target_properties(  avdevice
                            PROPERTIES FFMPEG_LIB_IMPORTED_LOCATION
                            libs/ffmpeg/${ANDROID_ABI}/lib/libavdevice.so
                            )
    set_target_properties( avfilter
                            PROPERTIES FFMPEG_LIB_IMPORTED_LOCATION
                            libs/ffmpeg/${ANDROID_ABI}/lib/libavfilter.so
                            )
    set_target_properties( avformat
                            PROPERTIES FFMPEG_LIB_IMPORTED_LOCATION
                            libs/ffmpeg/${ANDROID_ABI}/lib/libavformat.so
                            )
    set_target_properties( avutil
                            PROPERTIES FFMPEG_LIB_IMPORTED_LOCATION
                            libs/ffmpeg/${ANDROID_ABI}/lib/libavutil.so
                            )
    set_target_properties( swscale
                            PROPERTIES FFMPEG_LIB_IMPORTED_LOCATION
                            libs/ffmpeg/${ANDROID_ABI}/lib/libswscale.so
                            )
    
    # Specifies a path to native header files.
    include_directories(
                        libs/ffmpeg/${ANDROID_ABI}/include
                        )
    
    target_link_libraries( # Specifies the target library.
                           native-lib
    
                           # Links the target library to the log library
                           # included in the NDK.
                           avcodec avdevice avfilter avformat avutil swscale
                           ${log-lib}
                            )
    

    If I specify the full library name, libavcodec.so..., the error would go away.

    target_link_libraries( # Specifies the target library.
                           native-lib
    
                           # Links the target library to the log library
                           # included in the NDK.
                           libavcodec.so libavdevice.so libavfilter.so libavformat.so libavutil.so libswscale.so
                           ${log-lib}
                            )
    

    I wonder if anyone encountered similar issue or know why the compilation behaves this way.

  • How to optimize/speed up ffmpeg resizing

    16 février 2017, par ALM

    I am trying to quickly compress mp4 videos and wanted to know if there is a better way than I am currently using.

    ffmpeg -i orig.mp4 -preset ultrafast -vf scale=iw/5:-2 out.mp4
    

    This is currently being run for videos around 2-4 minutes long but I would like to get it as quick as possible. Are there other settings for ffmpeg I should use? This is running on a i7 system with external GPU.

    Thank you

  • ffmpeg video encoding progress bar

    16 février 2017, par Rahul TS

    When I run the conversion in the browser it simply shows the white blank space. Only after the conversion process page will load.

    Please suggest how to implement a progress bar which shows the progress to the user when the video conversion takes place.

    I have this in my php script

    exec("ffmpeg -i filename.flv -sameq -ab 128 -s 640x480 filename.mp4");
    

    so how should I change this script to get the progress details even to a file or directly as ouput in the page. Please can anyone give me a complete script/code to explain it in detail. Because I think I cant get the complete answers and so I am confused on what to do with this