Newest 'ffmpeg' Questions - Stack Overflow

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

Les articles publiés sur le site

  • Theatrical quality ffmpeg/x264 encoding of a high-motion 1080p video

    2 décembre 2011, par Ian

    I've been struggling with encoding videos using FFMPEG and x264. The output stutters when played back in Quicktime, while in VLC it shows a lot of compression artifacts at the same places Quicktime stutters. So it seems like Quicktime is stuttering because it's trying to suppress the corruption/artifacts.

    The videos have a lot of random motion in them, including frames where 75% of the pixels will change at a random interval (the video is software generated so it's truly pseudo-random). The compression seems to be choking in these places where it's likely detecting a "scene cut" incorrectly. It also seems to choke at regular intervals where I guess it's doing a keyframe.

    I've based my encoding preset off of the x264-hq preset that comes with FFMPEG. I've tried turning off scene cut detection, and playing with the keyint/g and keyint_min options. Setting g to 1 makes it work, but blows out the filesize. I've tried the lossless presets, but they won't playback at all in Quicktime. Oddly, I haven't had any problems when working with a lower-resolution test video (1440x810).

    Here's the preset I have right now, which works, but yields a file that's approximately 60% larger than the (non-working) hq preset yields. Is there any way to improve upon this? The filesize doesn't matter much, I just want something that will playback anywhere and be very high quality.

    coder=1
    flags=+loop
    cmp=+chroma
    partitions=+parti8x8+parti4x4+partp8x8+partp4x4+partb8x8
    me_method=umh
    subq=8
    me_range=16
    g=1
    keyint_min=1
    sc_threshold=0
    i_qfactor=0.71
    b_strategy=1crf=20
    qcomp=0.6
    qmin=20
    qmax=51
    qdiff=4
    bf=16
    refs=4
    trellis=1
    flags2=+dct8x8+wpred+bpyramid+mixed_refs
    wpredp=2
    

    Here's the command:

    ffmpeg \
      -r 60 -i "frame-%06d.tiff" \
      -vcodec libx264 -vpre my_preset \
      -threads 0 \
      -r 60 -an -f out.mp4
    
  • Android NDK : How to link FFMPEG libraries with CPP files ?

    2 décembre 2011, par Alex

    I'm building with Android NDK as follows:

    I have a CPP file in which I have something like

    extern "C" { #include }

    CMyClass::MyFunc() { av_register_all(); }

    I link it with static FFMPEG libraries which I've built separately using the procedure described elsewhere.

    It gives me undefined reference av_register_all() error.

    When in the same file I have, instead, something like

    extern "C" void func() {
       av_register_all();
    }
    

    everything links and works fine.

    So, how do I link FFMPEG libs with cpp files in Android?

  • Which FFmpeg codec should be used for video streams with single byte pixel format ?

    2 décembre 2011, par Gearoid Murphy

    I've got a black and white video stream coming off a Firewire astronomy camera, I'd like to use FFmpeg to compress the video stream but it will not accept single byte pixel formats for the MPEG1VIDEO codecs. I've been trying random codecs for the last hour without much success, could anyone give me some sage advise on how to achieve my goal? :) thx

  • Starting multiple ffmpeg instances

    2 décembre 2011, par Julian Gardner

    New to linux and having problems.

    I am trying to setup a system that will allow me to start multiple ffmpegs to convert live TV so I can archive certain programs. The source is a few TV cards which means I can encode multiple streams at the same time. The PC is an i7 8 core.

    I have tried to write a program that uses threads to start multiple ffmpegs and capture all the ffmpeg messages so I can watch the time elapsed, and when this hits a predetermined time stops the task and ffmpeg and then waits for the next scheduled recording, but I'm stuck on the capture of the ffmpeg output.

  • ffmpeg multiple instances

    2 décembre 2011, par Julian Gardner

    New to linux and having problems.

    I am trying to setup a system that will allow me to start multiple ffmpegs to convert live tv so I can archive certain programs. The source is a few tv cards which means I can encode multiple streams at the same time, pc is an i7 8 core.

    I have tried to write a program that uses threads to start multiple ffmpegs and capture all the ffmpeg messages so I can watch the time elapsed, and when this hits a predetermined time stops the task and ffmpeg and then waits for the next scheduled recording, but I'm stuck on the capture of the ffmpeg output.