Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • How can I use ffmpeg or vlc to sample audio frequency and volume(DB value)

    26 février 2014, par poc

    I want to capture the audio's frequency and volume from RTSP streaming.

    I want to sample it every second, But can not find how to get it via vlc or ffmpeg

    When executing the following line, it only shows the video bit rate information and nothing about audio.

    ffmpeg -i rtsp://172.19.1.40/live.sdp -acodec copy -vcodec copy lala.avi
    
  • ffmpeg and php - generating thumbnail

    25 février 2014, par stinkysGTI

    I've never used ffmpeg before, but it seemed rather straight forward. I already have a script that handles the uploaded file and stores all of the relative data into the database, but I'm not able to generate a thumbnail. I don't get an error either, I even checked the error_log on the server and there was nothing. The command I'm trying to use is:

    shell_exec("/usr/bin/ffmpeg -i files/clipcanvas_14348_offline.mp4 -r 1 -s 1024x576 -f image2 -vframes 1 files/thumb_test.jpg");
    

    I will change the static file names with variables once I get it working because the videos that will be thumbnailed are uploaded through a form.

    I tried using the solution from this page:

    ffmpeg Getting image or thumbnail from video error

    But I'm not having any luck. Could it somehow be possible it's because it's on a sub domain?

  • ffmpeg 2nd pass segfault

    25 février 2014, par Mike Flynn

    I'm trying to get an old transcoding server up and running in a new environment and I'm experiencing some issues getting the well tested ffmpeg commands to work in the new environment.

    It's a 2 pass encoding strategy, and the first pass runs just fine every time, the 2nd pass consistently fails with the following:

    [libx264 @ 0x3925fc0] 2nd pass has more frames than 1st pass (1478)
    [libx264 @ 0x3925fc0] continuing anyway, at constant QP=14
    [libx264 @ 0x3925fc0] disabling adaptive B-frames
    [libx264 @ 0x3925fc0] specified frame type is not compatible with max B-frames
    Segmentation fault
    

    Here is the command we're using for each pass:

    Pass 1:

    ffmpeg -y -i input.mp4 -pass 1 -b 774000 -ab 128000 -s 640x360 -passlogfile ffmpeglog -vcodec libx264 -g 90 -bf 3 -refs 1 -b_strategy 1 -coder 1 -qmin 10 -qmax 51 -sc_threshold 40 -flags +loop -cmp chroma -me_range 16 -me_method dia -subq 2 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -direct-pred 3 -trellis 0 -partitions -parti8x8-parti4x4-partp8x8-partb8x8 -r 30 -keyint_min 25 -wpredp 2 -rc_lookahead 50 -acodec libfaac -ar 44100 pass1.mp4
    

    Pass 2:

    ffmpeg -y -i pass1.mp4 -pass 2 -b 774000 -ab 128000 -s 640x360 -passlogfile ffmpeglog -vcodec libx264 -g 90 -bf 3 -refs 8 -b_strategy 1 -coder 1 -qmin 10 -qmax 51 -sc_threshold 40 -flags +loop -cmp chroma -me_range 16 -me_method umh -subq 9 -i_qfactor 0.71 -qcomp 0.6 -qdiff 4 -direct-pred 3 -trellis 2 -partitions +parti8x8+parti4x4+partp8x8+partp4x4+partb8x8 -r 30 -keyint_min 25 -wpredp 2 -rc_lookahead 60 -acodec libfaac -ar 44100 pass2.mp4
    

    ...and here is my ffmpeg configuration:

    ffmpeg version 2.1.4 Copyright (c) 2000-2014 the FFmpeg developers
      built on Feb 25 2014 19:23:21 with gcc 4.6.3 (GCC) 20120306 (Red Hat 4.6.3-2)
      configuration: --enable-gpl --enable-libmp3lame --enable-libtheora --enable-libvo-aacenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-version3 --enable-libfaac --enable-nonfree
      libavutil      52. 48.101 / 52. 48.101
      libavcodec     55. 39.101 / 55. 39.101
      libavformat    55. 19.104 / 55. 19.104
      libavdevice    55.  5.100 / 55.  5.100
      libavfilter     3. 90.100 /  3. 90.100
      libswscale      2.  5.101 /  2.  5.101
      libswresample   0. 17.104 /  0. 17.104
      libpostproc    52.  3.100 / 52.  3.100
    Hyper fast Audio and Video encoder
    usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
    

    Any ideas would be greatly appreciated!

  • Android - ffmpeg best approach

    25 février 2014, par rohit

    I am trying to build ffmpeg for android. I want to achieve two things with it. 1. Rotate video 2. Join two or more videos.

    There are two approaches for having ffmpeg in my application. 1. Having ffmpeg executable, copying it to /data/package/ and executing ffmpeg commands. 2. Build ffmpeg library .so file with ndk and write jni code etc.

    Which approach is best according to my needs? And can I have some code snippets that follows those approaches?

  • How to add particular ffmpeg sources into config ?

    25 février 2014, par user620297

    I have my ffmpeg confix. For example:

    ./configure \
    --target-os=darwin \
    --arch=armv7s \
    --cc='xcrun -sdk iphoneos clang' \
    --extra-cflags='-arch armv7s -mios-version-min=7.0' \
    --extra-cxxflags='-arch armv7s -mios-version-min=7.0' \
    --extra-ldflags='-arch armv7s -mios-version-min=7.0' \
    --prefix=armv7s \
    --enable-cross-compile \
    --disable-doc \
    --disable-shared \
    --disable-everything \
    --enable-static \
    --enable-pic \
    --disable-muxers \
    --enable-muxer=flv \
    --disable-demuxers \
    --enable-demuxer=h264 \
    --disable-parsers \
    --enable-parser=h264 \
    

    But in addition I need to use also other code from ffmpeg library like #include "libavcodec/golomb.h". How to add these particular sources to the config or where can I find which sources can I include with which config setting?