Newest 'x264' Questions - Stack Overflow

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

Les articles publiés sur le site

  • DirectShow / x264 / AviSynth and Windows Server 2008 SP2

    15 novembre 2011, par Tim

    I'm having a hard time getting AviSynth to open video files on Windows Server 2008 SP2 (32 bit). I'm aware of the sound card issue, right now I'm using Audio=false. I've tried installing the below, but I always get the error "No combination of filters could be found to render the stream". I'm using DirectShowSource, but I don't have to ... I'm open that can open most formats your average Windows 7 machine can handle.

    I've installed:

    • "Desktop Extensions" - which installed Media Player and codecs
    • haali media splitter and ffdshow
    • Windows Media Services (for streaming, this supposedly had the mpeg codecs, but it doesn't) Windows Essentials Media Codec Pack
    • K-Lite Codec Pack Full VLC
    • QuickTime Tried copying mpeg.dll codecs from 32 bit Windows 7 to Server and regsvr32'ing them, but get error
    • Tried copying *.AX filters from 32 bit Windows 7 to server and regsvr32'ing, but still get AVS error

    AVS Script:

    • video0 = DirectShowSource("video0.avi", fps=30, pixel_type="RGB24", Audio=false)
    • video1 = DirectShowSource("video1.avi", fps=30, pixel_type="RGB24", Audio=false)
    • Dissolve(video0, video1, 30)

    Command Line:

    • x264 test.avs -o test.mp4 --bframes 3 --ref 3 --vbv-maxrate 2500 --vbv-bufsize=25000 --level 40 --threads

    AVS Error:

    • avs [error]: "No combination of filters could be found to render the stream"

    Has anyone gotten this working on Windows Server? If so what filters codecs or other setup do I need?

    Thank you for the time.

  • Linking against libx264 does not work (Cygwin)

    11 novembre 2011, par Erik

    I want to use libx264 in one of my projects on windows. I compiled x264 with cygwin including the shared and static library. Everythin works out fine, also the static and dynamic libraries are properly installed in cygwin.

    When trying to compile another project that uses libx264 (gcc ... -lx264) I get an error:

    /cygdrive/c/Users/Erik/workspace/test/Debug/../main.cpp:406: undefined reference to `x264_param_default_preset(x264_param_t*, char const*, char const*)'
    /cygdrive/c/Users/Erik/workspace/test/Debug/../main.cpp:425: undefined reference to `x264_param_apply_profile(x264_param_t*, char const*)'
    

    The linker seems to have problem with my built libraries of libx264, but what is exactly wrong here? How can I correctly link x264?

    The full build output looks like this:

    Build of configuration Debug for project test **

    make all 
    Building target: test.exe
    Invoking: Cygwin C++ Linker
    g++ -L"/cygdrive/c/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/Lib" -L"/cygdrive/c/Program Files (x86)/Microsoft DirectX SDK (June 2010)/Lib/x86" -L/usr/local/lib -o "test.exe"  ./main.o   -lx264.dll -lKernel32 -lUser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -ld3dx9d -ld3d9 -loleaut32 -luuid -lm
    ./main.o: In function `_Z8InitX264ii':
    /cygdrive/c/Users/Erik/workspace/test/Debug/../main.cpp:406: undefined reference to `x264_param_default_preset(x264_param_t*, char const*, char const*)'
    /cygdrive/c/Users/Erik/workspace/test/Debug/../main.cpp:425: undefined reference to `x264_param_apply_profile(x264_param_t*, char const*)'
    collect2: ld returned 1 exit status
    make: *** [test.exe] Error 1
    
    **** Build Finished ****
    

    Thanks for your help!

  • flv reencode to mp4 for iphone/ipod via ffmpeg and x264 (quality issue)

    3 octobre 2011, par zeroasterisk

    There are a lot of questions on this topic, and I've read most of them and most of the google search results I could come up with.

    When I use FFMPEG to convert a FLV to a iphone3 compatble MP4 file, it just doesn't preserver enough of the quality. Yes, I've worked the hell out of -sameq and -b and -bt settings, text just isn't readable.

    Next I tried to split the video out and process it directly, using these instructions: https://sites.google.com/site/linuxencoding/x264-encoding-guide

    The problem is myplayer (via ffmpeg) was not able to determine the duration of the FLV (even though the metadata was set).

    (I assume) Because of that unknown duration, when I create the MP4 file, the resulting x264 file plays through super-fast while the audio plays at the normal rate.

    user@server:/tmp# mplayer -nosound -benchmark -sws 9 -vf dsize=640:480:0,scale=0:0,expand=640:480 -vo yuv4mpeg:file=>(x264 --demuxer y4m --crf 0 --preset slow --threads auto --output output.264 - 2>x264.log) 'input.flv'
    MPlayer 1.0rc4-4.4.5 (C) 2000-2010 MPlayer Team
    mplayer: could not connect to socket
    mplayer: No such file or directory
    Failed to open LIRC support. You will not be able to use your remote control.
    
    Playing input.flv.
    libavformat file format detected.
    [flv @ 0x1202460]Estimating duration from bitrate, this may be inaccurate
    [lavf] stream 0: video (vp6f), -vid 0
    [lavf] stream 1: audio (nellymoser), -aid 0
    VIDEO:  [VP6F]  1680x992  0bpp  1000.000 fps   33.4 kbps ( 4.1 kbyte/s)
    Clip info:
     audiocodecid: 6
     audiodatarate: 86
     audiosamplerate: 44100
     audiosamplesize: 16
     audiosize: 6097005
     canSeekToEnd: true
     datasize: 8609138
     duration: 567
     framerate: 2
     hasAudio: true
     hasCuePoints: false
     hasKeyframes: true
     hasMetadata: true
     hasVideo: true
     height: 992
     lasttimestamp: 567
     metadatacreator: flvtool++ (Facebook, Motion project, dweatherford)
     stereo: false
     totalframes: 1043
     videocodecid: 4
     videodatarate: 33
     videosize: 2316256
     width: 1680
    Using (default) progressive frame mode.Opening video filter: [expand w=640 h=480]
    Expand: 640 x 480, -1 ; -1, osd: 0, aspect: 0.000000, round: 1
    Opening video filter: [scale w=0 h=0]
    Opening video filter: [dsize=640:480:0]
    ==========================================================================
    Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
    Selected video codec: [ffvp6f] vfm: ffmpeg (FFmpeg VP6 Flash)
    ==========================================================================
    Audio: no sound
    Starting playback...
    Movie-Aspect is undefined - no prescaling applied.
    [swscaler @ 0x7f0c738b9620]Lanczos scaler, from yuv420p to yuv420p using MMX2
    VO: [yuv4mpeg] 640x480 => 641x480 Planar YV12
    

    I have also tried specifying FPS, but no change in results

    user@server:/tmp# mplayer -nosound -fps 25-benchmark -sws 9 -vf dsize=640:480:0,scale=0:0,expand=640:480 -vo yuv4mpeg:file=>(x264 --demuxer y4m --fps 25 --crf 0 --preset slow --threads auto --output output.264 - 2>x264.log) 'input.flv'
    

    Can someone tell me how to either:

    1. fix my split A/V processing/timing/duration issues?
    2. improve the quality of the FFMPEG conversion of FLV to iphone3 compatible format?
  • Android : Native Code, libx264

    11 septembre 2011, par NadavRub

    I am working with Android OS, my aim is doing propriotary imgproc and send the result as H264 video stream out of the device, for this, I will need to use a compression tool, I have considered the open source libx264 ( which got compiled on the Android env quite easily ).

    Having that said, does libx264 will know to identify the underling CPU/instruction set, OR, would I need to maintain a specialized binary for each CPU type ( eg. Nvidia/ARM ) ?

    The last thing I want is to maintain a specific version of code/binary for each CPU type...

    Any help would be appreciated.

    ~Nadav

  • Manually feeding x264 with my own motion data ?

    6 septembre 2011, par ldoogy

    I am trying to encode a stream using x264 (by feeding individual images), but what's unusual is that I already have some motion information for my frames. I know exactly which areas have been modified in each frame, and I know where motion has occurred in the frame.

    Is there a way to feed x264 my own motion information? I'd like to give it motion vectors for given areas in the frame, and somehow tell it that certain areas in the frame are guaranteed to not have had any motion in them.

    I think this might significantly improve the performance of the encoding (because I'm allowing the codec to completely skip the motion estimation phase), and should also somewhat increase quality in cases where the encoder's motion estimation algos might have missed the motion that actually occurred.

    Do I need to modify the encoder in order to do this, or is this supported in the existing API?