Newest 'libx264' Questions - Stack Overflow

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

Les articles publiés sur le site

  • QuTip Example 'bloch-sphere-animation' - video renders blank

    15 juillet 2018, par damien murphy.

    On MacOSX Using Python3 running the following example code provided without modification: https://github.com/qutip/qutip-notebooks/blob/master/examples/bloch-sphere-animation.ipynb

    I get a blank video and no errors.

    I have installed libav and ffmpeg so I am not sure what else is missing with any error.

    What codec did you install on mac when running these samples?

    Looking at the source of qutip I can see what it is using to render the video: https://github.com/qutip/qutip/blob/master/qutip/ipynbtools.py#L392

    anim.save(name + '.mp4', fps=10, writer="avconv", codec="libx264")
    

    I have avconv on the command line working without errors

    This is the debug outout of matploylib.animation

    INFO:matplotlib.animation:Animation.save using DEBUG:matplotlib.animation:frame size in pixels is 576 x 576 INFO:matplotlib.animation:MovieWriter.run: running command: ['avconv', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '576x576', '-pix_fmt', 'rgba', '-r', '10', '-i', 'pipe:', '-vcodec', 'libx264', '-y', 'movie.mp4'] DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter.grab_frame: Grabbing frame. DEBUG:matplotlib.animation:MovieWriter -- Command stdout: b'' DEBUG:matplotlib.animation:MovieWriter -- Command stderr: b"avconv version 12.3, Copyright (c) 2000-2018 the Libav developers\n built on Feb 13 2018 11:17:07 with Apple LLVM version 9.0.0 (clang-900.0.39.2)\n[rawvideo @ 0x7f963c000000] Estimating duration from bitrate, this may be inaccurate\nInput #0, rawvideo, from 'pipe:':\n Duration: N/A, start: 0.000000, bitrate: N/A\n Stream

    0:0: Video: rawvideo\n rgba, 576x576\n 10 fps, 10 tbn\nStream mapping:\n Stream #0:0 -> #0:0 (rawvideo (native) -> h264

    (libx264))\nPress ctrl-c to stop encoding\n[libx264 @ 0x7f963e001800] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX\n[libx264 @ 0x7f963e001800] profile High, level 2.2\n[libx264 @ 0x7f963e001800] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=10 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00\nOutput #0, mp4, to 'movie.mp4':\n Metadata:\n encoder
    : Lavf57.7.2\n Stream #0:0: Video: h264 [[33][0][0][0] / 0x0021]\n yuv420p, 576x576, q=2-31\n 10 fps, 10 tbn\n Metadata:\n
    encoder : Lavc57.25.0 libx264\n Side data:\n cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1\nframe= 6 fps= 0 q=0.0 size= 0kB time=10000000000.00 bitrate=
    0.0kbits/s \rframe= 10 fps= 8 q=0.0 size= 0kB time=10000000000.00 bitrate= 0.0kbits/s \rframe= 13 fps= 7 q=0.0 size= 0kB time=10000000000.00 bitrate= 0.0kbits/s
    \rframe= 16 fps= 7 q=0.0 size= 0kB time=10000000000.00 bitrate= 0.0kbits/s \rframe= 19 fps= 6 q=0.0 size= 0kB time=10000000000.00 bitrate= 0.0kbits/s \rframe= 22 fps= 6 q=0.0 size= 0kB time=10000000000.00 bitrate= 0.0kbits/s
    \rframe= 26 fps= 6 q=0.0 size= 0kB time=10000000000.00 bitrate= 0.0kbits/s \rframe= 30 fps= 6 q=0.0 size= 0kB time=10000000000.00 bitrate= 0.0kbits/s \rframe= 33 fps= 6 q=0.0 size= 0kB time=10000000000.00 bitrate= 0.0kbits/s
    \rframe= 36 fps= 6 q=0.0 size= 0kB time=10000000000.00 bitrate= 0.0kbits/s \rframe= 39 fps= 6 q=0.0 size= 0kB time=10000000000.00 bitrate= 0.0kbits/s \rframe= 42 fps= 6 q=0.0 size= 0kB time=10000000000.00 bitrate= 0.0kbits/s
    \rframe= 45 fps= 6 q=0.0 size= 0kB time=10000000000.00 bitrate= 0.0kbits/s \rframe= 48 fps= 6 q=0.0 size= 0kB time=10000000000.00 bitrate= 0.0kbits/s \rframe= 51 fps= 6 q=0.0 size= 0kB time=10000000000.00 bitrate= 0.0kbits/s
    \rframe= 55 fps= 6 q=0.0 size= 0kB time=10000000000.00 bitrate= 0.0kbits/s \rframe= 59 fps= 6 q=25.0 size= 1kB time=10000000000.00 bitrate= 0.0kbits/s \rframe= 63 fps= 6 q=25.0 size= 1kB time=0.40 bitrate= 19.8kbits/s \rframe=
    67 fps= 6 q=25.0 size= 1kB time=0.80 bitrate= 10.9kbits/s
    \rframe= 71 fps= 6 q=25.0 size= 1kB time=1.20 bitrate=
    7.9kbits/s \rframe= 75 fps= 6 q=25.0 size= 1kB time=1.60 bitrate= 6.4kbits/s \rframe= 79 fps= 6 q=25.0 size= 1kB time=2.00 bitrate= 5.5kbits/s \rframe= 82 fps= 6 q=25.0 size= 1kB time=2.30 bitrate= 5.0kbits/s \rframe= 86 fps= 6 q=25.0 size= 2kB time=2.70 bitrate= 4.6kbits/s \rframe= 90 fps= 6 q=25.0 size= 2kB time=3.10 bitrate= 4.2kbits/s \rframe=
    93 fps= 6 q=25.0 size= 2kB time=3.40 bitrate= 4.0kbits/s
    \rframe= 97 fps= 6 q=25.0 size= 2kB time=3.80 bitrate=
    3.8kbits/s \rframe= 101 fps= 6 q=25.0 size= 2kB time=4.20 bitrate= 3.6kbits/s \rframe= 105 fps= 6 q=25.0 size= 2kB time=4.60 bitrate= 3.4kbits/s \rframe= 109 fps= 6 q=25.0 size= 2kB time=5.00 bitrate= 3.3kbits/s \rframe= 112 fps= 6 q=25.0 size= 2kB time=5.30 bitrate= 3.2kbits/s \rframe= 116 fps= 6 q=25.0 size= 2kB time=5.70 bitrate= 3.2kbits/s \rframe= 120 fps= 6 q=25.0 size= 2kB time=6.10 bitrate= 3.1kbits/s
    \rframe= 123 fps= 6 q=25.0 size= 2kB time=6.40 bitrate=
    3.0kbits/s \rframe= 126 fps= 6 q=25.0 size= 2kB time=6.70 bitrate= 3.0kbits/s \rframe= 129 fps= 6 q=25.0 size= 2kB time=7.00 bitrate= 2.9kbits/s \rframe= 132 fps= 6 q=25.0 size= 3kB time=7.30 bitrate= 2.9kbits/s \rframe= 135 fps= 6 q=25.0 size= 3kB time=7.60 bitrate= 2.8kbits/s \rframe= 138 fps= 6 q=25.0 size= 3kB time=7.90 bitrate= 2.8kbits/s \rframe= 141 fps= 6 q=25.0 size= 3kB time=8.20 bitrate= 2.8kbits/s
    \rframe= 144 fps= 6 q=25.0 size= 3kB time=8.50 bitrate=
    2.7kbits/s \rframe= 148 fps= 6 q=25.0 size= 3kB time=8.90 bitrate= 2.7kbits/s \rframe= 150 fps= 6 q=-1.0 Lsize= 7kB time=14.70 bitrate= 4.1kbits/s \r\nvideo:4kB audio:0kB other streams:0kB global headers:0kB muxing overhead: 74.948143%\n[libx264 @ 0x7f963e001800] frame I:1 Avg QP: 6.00 size: 112\n[libx264 @ 0x7f963e001800] frame P:38 Avg QP: 6.21 size: 30\n[libx264 @ 0x7f963e001800] frame B:111 Avg QP: 9.67 size: 22\n[libx264 @ 0x7f963e001800] consecutive B-frames: 1.3% 0.0% 0.0% 98.7%\n[libx264 @ 0x7f963e001800] mb I I16..4: 100.0% 0.0% 0.0%\n[libx264 @ 0x7f963e001800] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip:100.0%\n[libx264 @ 0x7f963e001800] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.0% 0.0% 0.0% direct: 0.0% skip:100.0%\n[libx264 @ 0x7f963e001800] 8x8 transform intra:0.0%\n[libx264 @ 0x7f963e001800] coded y,uvDC,uvAC intra: 0.0% 0.0% 0.0% inter: 0.0% 0.0% 0.0%\n[libx264 @ 0x7f963e001800] i16 v,h,dc,p: 97% 0% 3% 0%\n[libx264 @ 0x7f963e001800] i8c dc,h,v,p: 100% 0% 0% 0%\n[libx264 @ 0x7f963e001800] Weighted P-Frames: Y:0.0% UV:0.0%\n[libx264 @ 0x7f963e001800] kb/s:1.95\n"

  • "Unknown Encoder 'libx264'" error while using FFMPEG

    9 juillet 2018, par newuser

    I have followed the guide given here @ traq.ffmpeg. And everything goes smoothly. But when I try to run a command with FFMPEG to convert something to h.264, I get the error:

    Unknown Encoder 'libx264'

    I'm using Ubuntu 16.04 LTS.

  • Unknown Encoder error when using libx264 with FFMPEG

    9 juillet 2018, par newuser

    I have followed the guide given here. And everything goes smoothly. But when I try to run a command with FFMPEG to convert to H.264. I get the error: Unknown Encoder 'libx264' I'm on Ubuntu 16.04 LTS.

  • Unknown encoder 'libx264' error in AWS EC2

    6 juillet 2018, par Krzysztof Pastorczyk

    I installed ffmpeg using the following config file:

    packages:
      yum:
        ImageMagick: []
        ImageMagick-devel: []
    commands:
      01-wget:
        command: "wget -O /tmp/ffmpeg.tar.xz https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz"
      02-mkdir:
        command: "if [ ! -d /opt/ffmpeg ] ; then mkdir -p /opt/ffmpeg; fi"
      03-tar:
        command: "tar xvf /tmp/ffmpeg.tar.xz -C /opt/ffmpeg --strip 1"
      04-ln:
        command: "if [[ ! -f /usr/bin/ffmpeg ]] ; then ln -sf /opt/ffmpeg/ffmpeg /usr/bin/ffmpeg; fi"
      05-ln:
        command: "if [[ ! -f /usr/bin/ffprobe ]] ; then ln -sf /opt/ffmpeg/ffprobe /usr/bin/ffprobe; fi"
      06-pecl:
        command: "if [ `pecl list | grep imagick` ] ; then pecl install -f imagick; fi"
    


    Unfortunatelly during the encode process from carrierwave-video I get the following error:

    Unknown encoder 'libx264'
     (FFMPEG::Error)
        from gems/streamio-ffmpeg-3.0.2/lib/ffmpeg/transcoder.rb:45:in `run'
        from gems/streamio-ffmpeg-3.0.2/lib/ffmpeg/movie.rb:200:in `transcode'
        from gems/carrierwave-video-0.6.0/lib/carrierwave/video.rb:68:in `block in encode_video'
        from gems/carrierwave-video-0.6.0/lib/carrierwave/video.rb:81:in `with_trancoding_callbacks'
        from gems/carrierwave-video-0.6.0/lib/carrierwave/video.rb:62:in `encode_video'
        from app/uploaders/file_uploader.rb:21:in `encode'
    


    I guess I'll need to install 'libx264'. Do you know how can I do this on Elastic beanstalk?


    Problem solved. I used different codec.

    encode_video(:mp4, resolution: :same, custom: %w(-vcodec mpeg4) )
    
  • FFmpeg version 4.0.1 cannot find h264 encoder

    3 juillet 2018, par Cristiano

    Today I updated FFmpeg to version 4.0.1 and my existing project cannot compile anymore. In particular avcodec_find_encoder(AV_CODEC_ID_H264) always returns null. I tried to reinstall the libx264 but nothing changed. I also tried to call avcodec_find_encoder_by_name("libx264") and it works, but avcodec_open2() returns error.