Newest 'x264' Questions - Stack Overflow

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

Les articles publiés sur le site

  • How to use ffmpeg / x264 2-Pass encoding for multiple bitrate output files

    2 décembre 2014, par Jonesy

    While performing a 2-Pass encode to multiple output files I was receiving the error

    ratecontrol_init: can't open stats file 1 ffmpeg2pass-2.log
    

    My setup is to do a single first pass and then multiple second pass encodes to output files with different target bitrates using the same first pass results.

    ffmpeg -y -i $INPUT_FILE -an -vcodec libx264 -pass 1 -b:v 700k -f rawvideo /dev/null
    
    ffmpeg -y -i $INPUT_FILE -i out-aud.mp4 \
    $AUDIO_OPTIONS_P2 -vcodec libx264 -pass 2 -b:v 250k -f mp4 out-250.mp4 \
    $AUDIO_OPTIONS_P2 -vcodec libx264 -pass 2 -b:v 500k -f mp4 out-500.mp4 \
    $AUDIO_OPTIONS_P2 -vcodec libx264 -pass 2 -b:v 700k -f mp4 out-700.mp4
    

    This sequence resulted in the error listed above. What I discovered thru code-inspection is that ffmpeg/x264 looks for a different set of first-pass files for each second-pass encoding path. The first encoding path uses the set of files originally created

    ffmpeg2pass-0.log
    ffmpeg2pass-0.log.mbtree
    

    The second encoding path requires first-pass files with the names

    ffmpeg2pass-2.log
    ffmpeg2pass-2.log.mbtree
    

    The third encoding path requires first-pass files with the names starting with ffmpeg2pass-4*, etc.

    My solution was to create soft-links to the originally created set of files with the new names that were required for each pass before running the second-pass command.

    ln -s ffmpeg2pass-0.log ffmpeg2pass-2.log
    ln -s ffmpeg2pass-0.log.mbtree ffmpeg2pass-2.log.mbtree
    ln -s ffmpeg2pass-0.log ffmpeg2pass-4.log
    ln -s ffmpeg2pass-0.log.mbtree ffmpeg2pass-4.log.mbtree
    

    This seems to work as it results in the output encodes that I needed. However, I don't know if this method is legitimate. Am I getting sub-optimal encoding results by using a first-pass output for one bitrate (700k) as the input to second-pass encodings for other bitrates?

  • x264 : Encoded videos need lots of CPU to play

    30 novembre 2014, par LTR

    My computer (Intel Core 2 Duo T9300, 2.5GHz) can usually play any Full HD file, and Blu-Rays perfectly.

    However, when I encode a Full HD file myself, the CPU is struggling and frames are dropped.

    Here's my command line:

    ffmpeg.exe -r 24 -f concat -i list_of_png_files.txt -i w:\audio.wav -acodec copy -c:v libx264 -preset medium -b:v 10000k -shortest output.avi

    I tried adding -maxrate 13000k after "-preset medium". However, x264 doesn't seem to honor this - the framerate still reaches 20MBit at parts.

    How can I encode videos in such a way as to reduce CPU usage during decoding?

  • Compiling x264 on a Mac : "No working C compiler found" and "arm-linux-androideabi-gcc : command not found"

    29 novembre 2014, par Xavi Gil

    I am trying to compile the x264 library for Android, following this post.

    I have cloned the x264 project git clone git://git.videolan.org/x264.git and tried to compile with the following configuration:

    NDK=~/development/android-ndk-r10c    
    TOOLCHAIN=$NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64
    PLATFORM=$NDK/platforms/android-21/arch-arm
    
    ./configure \
    --cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi- \
    --sysroot=$PLATFORM \
    --host=arm-linux \
    --enable-pic \
    --enable-static \
    --disable-cli
    

    The problem is that I get a No working C compiler found. error.

    The conftest.log output:

    $ cat conftest.log 
    ./configure: line 153: arm-linux-androideabi-gcc: command not found
    

    But the arm-linux-androideabi-gcc is the toolchain's bin folder!!

    Looking at this other question it looks like for some reason, even though the file exists, since it is a 64bit Mac, it won't execute the arm-linux-androideabi-gcc file and will return this weird error and log.


    I am in a Mac OS X 10.10 and I have installed the XCode Command Line Tools:

    $ xcode-select -p
    /Applications/Xcode.app/Contents/Developer
    

    GCC version:

    $ gcc --version
    Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
    Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
    Target: x86_64-apple-darwin14.0.0
    Thread model: posix
    

    Can anyone tell me how to fix this please?

  • License terms for H.264 using x264 [closed]

    22 novembre 2014, par user3027650

    H.264 is standard for video compression and uses a lot of patents. So if anybody want to use the standard he has to pay a fee to MPEGLA.

    x264 is a free software library (GNU GPL) which implements (parts of) H.264.

    Why is it possible that x264 is free, if it implements H.264 it violates the patents or doesn't it? This means I can distribute my application which uses x264 and consequently H.264 commercially without paying MPEGLA?

  • yasm is installed in my system but in some other folder

    22 octobre 2014, par janpal

    I am trying to install ffmpeg and x264. For this to install I have followed the instructions given in "https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide". I have installed yasm and checked by using the command yasm --version it showing the successfully installed version. But when I try to install ffmpeg its throwing an error like yasm not found. I have referred some sites its intend me to check the path. yasm default path is /usr/local/bin but in my system its showing as /home/janpal/bin/yasm. I tried it as a root user also. Can somebody help me to install this in the correct path. I am using ubuntu 10.04