• Resolved ngsilver

    (@ngsilver)


    I keep getting an error no matter if I’m using libav or ffmpeg. I am using a Windows host and when I try the test scripts they output files no issue. I have also added both libav and ffmpeg to my path.

    Error I see from encoder queue: encode error

    ffmpeg test:

    /ffmpeg/bin/ffmpeg -y -i “C:\inetpub\wwwroot\wp-content\plugins\video-embed-thumbnail-generator/images/sample-video-h264.mp4” -acodec aac -strict experimental -b:a 160k -s 640×360 -vcodec libx264 -movflags faststart -profile:v baseline -pix_fmt yuv420p -level:v 30 -crf 23 -threads 1 “C:\inetpub\wwwroot/wp-content/uploads/2016/11/sample-video-h264-360.mp4”

    ffmpeg outpu:

    ffmpeg version 3.2 Copyright (c) 2000-2016 the FFmpeg developers
    built with gcc 5.4.0 (GCC)
    configuration: –enable-gpl –enable-version3 –disable-w32threads –enable-dxva2 –enable-libmfx –enable-nvenc –enable-avisynth –enable-bzlib –enable-libebur128 –enable-fontconfig –enable-frei0r –enable-gnutls –enable-iconv –enable-libass –enable-libbluray –enable-libbs2b –enable-libcaca –enable-libfreetype –enable-libgme –enable-libgsm –enable-libilbc –enable-libmodplug –enable-libmp3lame –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-libopenh264 –enable-libopenjpeg –enable-libopus –enable-librtmp –enable-libschroedinger –enable-libsnappy –enable-libsoxr –enable-libspeex –enable-libtheora –enable-libtwolame –enable-libvidstab –enable-libvo-amrwbenc –enable-libvorbis –enable-libvpx –enable-libwavpack –enable-libwebp –enable-libx264 –enable-libx265 –enable-libxavs –enable-libxvid –enable-libzimg –enable-lzma –enable-decklink –enable-zlib
    libavutil 55. 34.100 / 55. 34.100
    libavcodec 57. 64.100 / 57. 64.100
    libavformat 57. 56.100 / 57. 56.100
    libavdevice 57. 1.100 / 57. 1.100
    libavfilter 6. 65.100 / 6. 65.100
    libswscale 4. 2.100 / 4. 2.100
    libswresample 2. 3.100 / 2. 3.100
    libpostproc 54. 1.100 / 54. 1.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ‘C:\inetpub\wwwroot\wp-content\plugins\video-embed-thumbnail-generator/images/sample-video-h264.mp4’:
    Metadata:
    major_brand : isom
    minor_version : 512
    compatible_brands: isomiso2avc1mp41
    encoder : Lavf55.33.100
    Duration: 00:00:01.02, start: 0.000000, bitrate: 123 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1920×1080 [SAR 1:1 DAR 16:9], 109 kb/s, 23.98 fps, 23.98 tbr, 11988 tbn, 47.95 tbc (default)
    Metadata:
    handler_name : VideoHandler
    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 2 kb/s (default)
    Metadata:
    handler_name : SoundHandler
    [libx264 @ 00000000008bab60] using SAR=1/1
    [libx264 @ 00000000008bab60] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
    [libx264 @ 00000000008bab60] profile Constrained Baseline, level 3.0
    [libx264 @ 00000000008bab60] 264 – core 148 r2721 72d53ab – H.264/MPEG-4 AVC codec – Copyleft 2003-2016 – http://www.videolan.org/x264.html – options: cabac=0 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=23 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
    Output #0, mp4, to ‘C:\inetpub\wwwroot/wp-content/uploads/2016/11/sample-video-h264-360.mp4’:
    Metadata:
    major_brand : isom
    minor_version : 512
    compatible_brands: isomiso2avc1mp41
    encoder : Lavf57.56.100
    Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 640×360 [SAR 1:1 DAR 16:9], q=-1–1, 23.98 fps, 11988 tbn, 23.98 tbc (default)
    Metadata:
    handler_name : VideoHandler
    encoder : Lavc57.64.100 libx264
    Side data:
    cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
    Stream #0:1(eng): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 160 kb/s (default)
    Metadata:
    handler_name : SoundHandler
    encoder : Lavc57.64.100 aac
    Stream mapping:
    Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
    Stream #0:1 -> #0:1 (aac (native) -> aac (native))
    Press [q] to stop, [?] for help
    [mp4 @ 00000000009d3760] Starting second pass: moving the moov atom to the beginning of the file
    frame= 24 fps=0.0 q=28.0 Lsize= 6kB time=00:00:01.00 bitrate= 48.3kbits/s speed=7.12x
    video:4kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 43.487545%
    [libx264 @ 00000000008bab60] frame I:1 Avg QP:11.82 size: 2894
    [libx264 @ 00000000008bab60] frame P:23 Avg QP:11.50 size: 17
    [libx264 @ 00000000008bab60] mb I I16..4: 94.3% 0.0% 5.7%
    [libx264 @ 00000000008bab60] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.1% 0.0% 0.0% 0.0% 0.0% skip:99.9%
    [libx264 @ 00000000008bab60] coded y,uvDC,uvAC intra: 3.3% 0.0% 0.0% inter: 0.0% 0.0% 0.0%
    [libx264 @ 00000000008bab60] i16 v,h,dc,p: 94% 1% 5% 0%
    [libx264 @ 00000000008bab60] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 18% 25% 3% 3% 7% 3% 5% 3%
    [libx264 @ 00000000008bab60] i8c dc,h,v,p: 100% 0% 0% 0%
    [libx264 @ 00000000008bab60] kb/s:26.23
    [aac @ 000000000099a8a0] Qavg: 65536.000

    libav test:

    /libav/usr/bin/avconv -y -i “C:\inetpub\wwwroot\wp-content\plugins\video-embed-thumbnail-generator/images/sample-video-h264.mp4” -acodec aac -strict experimental -b:a 160k -s 1920×1080 -vcodec libx264 -movflags faststart -profile:v baseline -pix_fmt yuv420p -level:v 30 -crf 23 -threads 1 “C:\inetpub\wwwroot/wp-content/uploads/2016/11/sample-video-h264-1080.mp4”

    libav output:

    avconv version v11.7, Copyright (c) 2000-2016 the Libav developers
    built on Jun 1 2016 09:33:55 with gcc 4.8.3 (Gentoo 4.8.3 p1.1, pie-0.5.9)
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ‘C:\inetpub\wwwroot\wp-content\plugins\video-embed-thumbnail-generator/images/sample-video-h264.mp4’:
    Metadata:
    major_brand : isom
    minor_version : 512
    compatible_brands: isomiso2avc1mp41
    encoder : Lavf55.33.100
    Duration: 00:00:01.02, start: 0.021333, bitrate: 123 kb/s
    Stream #0.0(eng): Video: h264 (Constrained Baseline), yuv420p, 1920×1080 [PAR 1:1 DAR 16:9], 109 kb/s, 23.98 fps, 11988 tbn, 47.95 tbc (default)
    Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, fltp, 2 kb/s (default)
    [libx264 @ 0000000000d2e6a0] using SAR=1/1
    [libx264 @ 0000000000d2e6a0] frame MB size (120×68) > level limit (1620)
    [libx264 @ 0000000000d2e6a0] DPB size (3 frames, 24480 mbs) > level limit (0 frames, 8100 mbs)
    [libx264 @ 0000000000d2e6a0] MB rate (195644) > level limit (40500)
    [libx264 @ 0000000000d2e6a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
    [libx264 @ 0000000000d2e6a0] profile Constrained Baseline, level 3.0
    [libx264 @ 0000000000d2e6a0] 264 – core 142 – H.264/MPEG-4 AVC codec – Copyleft 2003-2014 – http://www.videolan.org/x264.html – options: cabac=0 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=23 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
    Output #0, mp4, to ‘C:\inetpub\wwwroot/wp-content/uploads/2016/11/sample-video-h264-1080.mp4’:
    Metadata:
    major_brand : isom
    minor_version : 512
    compatible_brands: isomiso2avc1mp41
    encoder : Lavf56.1.0
    Stream #0.0(eng): Video: libx264, yuv420p, 1920×1080 [PAR 1:1 DAR 16:9], q=-1–1, 23.98 fps, 24k tbn, 23.98 tbc (default)
    Metadata:
    encoder : Lavc56.1.0 libx264
    Stream #0.1(eng): Audio: libvo_aacenc, 48000 Hz, stereo, fltp, 160 kb/s (default)
    Metadata:
    encoder : Lavc56.1.0 aac
    Stream mapping:
    Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
    Stream #0:1 -> #0:1 (aac (native) -> aac (native))
    Press ctrl-c to stop encoding
    [mp4 @ 0000000000d2e140] Starting second pass: moving the moov atom to the beginning of the file
    frame= 24 fps= 0 q=28.0 Lsize= 15kB time=1.00 bitrate= 126.4kbits/s
    video:13kB audio:0kB other streams:0kB global headers:0kB muxing overhead: 13.763843%
    [libx264 @ 0000000000d2e6a0] frame I:1 Avg QP:11.37 size: 12192
    [libx264 @ 0000000000d2e6a0] frame P:23 Avg QP:13.85 size: 34
    [libx264 @ 0000000000d2e6a0] mb I I16..4: 97.7% 0.0% 2.3%
    [libx264 @ 0000000000d2e6a0] 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%
    [libx264 @ 0000000000d2e6a0] coded y,uvDC,uvAC intra: 1.2% 0.0% 0.0% inter: 0.0% 0.0% 0.0%
    [libx264 @ 0000000000d2e6a0] i16 v,h,dc,p: 98% 0% 2% 0%
    [libx264 @ 0000000000d2e6a0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 38% 16% 22% 6% 2% 6% 2% 6% 2%
    [libx264 @ 0000000000d2e6a0] i8c dc,h,v,p: 100% 0% 0% 0%
    [libx264 @ 0000000000d2e6a0] ref P L0: 81.0% 15.9% 3.2%
    [libx264 @ 0000000000d2e6a0] kb/s:103.78

    I will say that libav seems to work faster and lighter on my system so I’d prefer to use that option if able. Just not sure why I keep getting the error upon encoding from the queue. If I could pull the queue command I’d love to see it and test that to see if there is some formatting issue.

    I have the plugins installed to: C:\ffmpeg\bin and c:\libav\usr\bin
    I have each configured as: /ffmpeg/bin and /libav/usr/bin

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Kyle Gilman

    (@kylegilman)

    Thanks for the detailed info. Once we get this working it shouldn’t matter if you use FFMPEG or LIBAV. The plugin should work with either one the same. I don’t have a Windows system to test this on so I rely on users to point out when there’s a problem and looking at the FFMPEG/LIBAV test function now it seems like I’m not testing the full Windows command. When encoding videos, in order to avoid locking up PHP waiting for execution to finish, FFMPEG is loaded using start /B and I suspect I’m not enclosing something in quotes correctly because Windows is interpreting the /ffmpeg which comes right after start /B as a flag rather than a command. Does it work if you change the plugin setting to C:/libav/usr/bin instead of a forward slash? You could also experiment with a regular Windows path C:\libav\usr\bin

    Thread Starter ngsilver

    (@ngsilver)

    After switching to C:/ rather then / it seems to have fixed the issue at this time. Overlooked that as an option during configuration. Thanks.

    Plugin Author Kyle Gilman

    (@kylegilman)

    Great! And I’ll try to find a way of escaping the command in Windows if the path starts with a forward slash.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘FFMPEG & LIBAV Encode Error’ is closed to new replies.