Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • How to build ffmpeg with android-ndk-r10d in windows

    8 février 2019, par hosseinAmini

    In my application user can selects several images and create movie(mp4) with those images, For this reason i want to use ffmpeg library. i have searched more than 2 days but did not find a good tutorial for build ffmpeg with ndk in windows.

    can any body describe me, how to do that?(if you have any link, please share me)

    i used roman10 tutorial and this is what i do: 1-i have decompressed "ffmpeg-2.6.2" folder into "android-ndk-r10d/sources".

    2-i have created "build_android.sh" file into "ffmpeg-2.6.2" folder and these are my build_android.sh codes:

    #!/bin/bash
    NDK=C:/Users/HAKHASIN/Desktop/android-ndk-r10d
    
    SYSROOT=$NDK/platforms/android-9/arch-arm/
    
    TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/windows-x86_64
    
    function build_one
    
    {
    
    ./configure \
    
    --prefix=$PREFIX \
    
    --enable-shared \
    
    --disable-static \
    
    --disable-doc \
    
    --disable-ffmpeg \
    
    --disable-ffplay \
    
    --disable-ffprobe \
    
    --disable-ffserver \
    
    --disable-avdevice \
    
    --disable-doc \
    
    --disable-symver \
    
    --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
    
    --target-os=linux \
    
    --arch=arm \
    
    --enable-cross-compile \
    
    --sysroot=$SYSROOT \
    
    --extra-cflags="-Os -fpic $ADDI_CFLAGS" \
    
    --extra-ldflags="$ADDI_LDFLAGS" \
    
    $ADDITIONAL_CONFIGURE_FLAG
    
    make clean
    
    make
    
    make install
    
    }
    
    CPU=arm
    
    PREFIX=$(pwd)/android/$CPU 
    
    ADDI_CFLAGS="-marm"
    
    build_one
    

    3- when write "sudo chmod +x build_android.sh" and "./build_android.sh" commands in cygwin, it not work correctly

    enter image description here

  • ffmpeg.exe not found inside project directory

    8 février 2019, par BayLife

    I´m currently working on my first electron / react app, which makes use of ffmpeg. I do have a problem to link the .exe file correctly.

    The prolem I´m facing is that I ffmpeg.exe is not found when trying to link it with a relative path inside my project directory. When using an absolute path it does work.

    The exe files are in the sub-folder of the current directroy.

    It does work when I´m using such path:

    'C:\\Users\\xxx\\Documents\\development\\ytDownloader\\app\\utils\\ffmpeg\\ffprobe.exe'

    But when trying it like this .setFfmpegPath('.\\ffmpeg\\ffmpeg.exe')

    or

    './ffmpeg/ffmpeg.exe'

    it does not working.

    Additionally I would really like to avoid using \\ in my project.

    Does someone have an Idea what I´m doing wrong here?

    I get this error message:

    Error: spawn .\ffmpeg\ffmpeg.exe ENOENT
        at Process.ChildProcess._handle.onexit (internal/child_process.js:229)
        at onErrorNT (internal/child_process.js:406)
        at process._tickCallback (internal/process/next_tick.js:63)
    
  • Extracting frames from a video without a mouse pointer on it using ffmpeg

    8 février 2019, par Sudeep

    I have a video created using ffmpeg, I need to extract frames (screenshots) from the video where the mouse pointer present in the video should not be present in frames extracted from it.

    Sounds silly, but is there a way to do this ?

  • Broadcast webcamer over ffserver and ffmpeg

    8 février 2019, par AkBako

    I setup the ffserver on Ubuntu 16.04 UPU. I did some streami from a .webm video fileы to the site. Now I can’t start streaming from the webcam of my laptop and show it on the website. Please need help.

    Technical info:

    Client-site:Windows 10

    WebCamera: YUV 4:2:2 640x480 fps 30.0

    Server-site: VPS Server Ubuntu 16.04

    ffserver.conf

    HTTPPort 8090
    HTTPBindAddress 0.0.0.0
    MaxHTTPConnections 2000
    MaxClients 1000
    MaxBandwidth 500000
    CustomLog -
    NoDaemon
    RTSPPort 7654
    RTSPBindAddress 0.0.0.0
                   # This is the input feed where FFmpeg will send
       File ./feed1.ffm            # video stream.
       FileMaxSize 1G              # Maximum file size for buffering video
    
    
    
        Feed feed1.ffm
        Format webm
        # Audio settings
        AudioCodec vorbis
        AudioBitRate 64             # Audio bitrate
    
        # Video settings
        VideoCodec libvpx
        VideoSize 640x480          # Video resolution
        VideoFrameRate 30           # Video FPS
        AVOptionVideo flags +global_header  # Parameters passed to encoder
                                           # (same as ffmpeg command-line parameters)
        AVOptionVideo cpu-used 0
        AVOptionVideo qmin 10
        AVOptionVideo qmax 42
        AVOptionVideo quality good
        AVOptionAudio flags +global_header
        PreRoll 15
        StartSendOnKey
        VideoBitRate 400 
    
    
    
      Format status
      # Only allow local people to get the status
      ACL allow localhost
      ACL allow 192.168.0.0 192.168.255.255
    
    
        # Just an URL redirect for index
       # Redirect index.html to the appropriate site
       URL http://XX.XXX.XXX.XXX
    
    

    Run code on Windows:

    ffmpeg -f dshow -i video="USB2.0 HD UVC WebCam" -video_size 640x480 -rtbufsize 702000k -framerate 30 -pixel_format yuyv422 -f mpegts http://XXX.XXX.XX.XX:8090/feed1.ffm
    

    Error message on Windows:

    Input #0, dshow, from 'video=USB2.0 HD UVC WebCam':
      Duration: N/A, start: 5326.566000, bitrate: N/A
        Stream #0:0: Video: mjpeg (Baseline) (MJPG / 0x47504A4D), yuvj422p(pc, bt470bg/unknown/unknown), 1280x720, 30 fps, 30 tbr, 10000k tbn, 10000k tbc
    Stream mapping:
      Stream #0:0 -> #0:0 (mjpeg (native) -> mpeg2video (native))
    Press [q] to stop, [?] for help
    [swscaler @ 06e5a000] deprecated pixel format used, make sure you did set range correctly
    Output #0, mpegts, to 'http://95.183.11.180:8090/feed1.ffm':
      Metadata:
        encoder         : Lavf58.24.101
        Stream #0:0: Video: mpeg2video (4:2:2), yuv422p, 1280x720, q=2-31, 200 kb/s, 30 fps, 90k tbn, 30 tbc
        Metadata:
          encoder         : Lavc58.42.103 mpeg2video
        Side data:
          cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
    av_interleaved_write_frame(): Unknown error
    Error writing trailer of http://95.183.11.180:8090/feed1.ffm: Error number -10054 occurred
    frame=    3 fps=0.0 q=1.6 Lsize=      46kB time=00:00:00.00 bitrate=34318545.5kbits/s speed=9.07e-05x
    video:84kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
    [http @ 06dd5c00] URL read error:  -10054
    Conversion failed!
    

    FFserver log:

    Fri Feb  8 03:14:58 2019 178.88.140.182 - - [POST] "/feed1.ffm HTTP/1.1" 200 4096
    
  • Force ffmpeg to automatically detect the video file

    8 février 2019, par Ramon

    which command can I use to have ffmpeg automatically detect the video file without having to replace "video.mp4"

    ffmpeg -i video.mp4 -vf select='gt(scene\,0.9)' -vsync 0 -an keyframes%03d.jpg