• Hi Kyle,

    Thanks for a great plugin! I only just found it a few weeks ago, I had no idea something as great as this existed for WordPress.
    I am using the latest version of FFMPEG, 5th December 2013. The H264 and AAC all convert fine, and the OGG and WEBM if I need them.
    I did get some stream errors earlier on some files while trying to convert, but seems ok for now.
    My only question is, I make an HD version H264 and also a 480p version in H264 for mobile devices. It all works fine on all browsers and my HTC One droid, but when I checked with my old iPhone 3G, the videos don’t play on it. Possible they also don’t play on other iPhones.
    I don’t have a newer iPhone, so I can’t check.
    Since we have to keep the Apple lovers happy as they make up a load of viewers do you know the solution for this?. I am using the Video.js player, it just spins on the iPhone, only plays two videos I uploaded that were small in size to begin with, so I am thinking, maybe the javacode isn’t switching to the 480p version of the file, due to something conflicting. I also have qt-faststart enabled to fix the H264 streaming headers while encoding videos.

    Here is the FFMPEG sample H.264 encode command:

    /var/www/ffmpeg -y -i “http://www.jasondolan.co.uk/wp-content/plugins/video-embed-thumbnail-generator/images/sample-video-h264.mp4” -acodec libvo_aacenc -b:a 160k -s 640×360 -vcodec libx264 -profile:v baseline -pix_fmt yuv420p -level:v 30 -crf 23 -threads 0 “/var/www/wp-content/uploads/2013/12/sample-video-h264-480p.mp4”

    Here is the FFMPEG test output::

    ffmpeg version N-58748-gbe99054 Copyright (c) 2000-2013 the FFmpeg developers
    built on Dec 5 2013 05:34:44 with gcc 4.6 (Debian 4.6.3-1)
    configuration: –prefix=/root/ffmpeg-static/64bit –extra-cflags=’-I/root/ffmpeg-static/64bit/include -static’ –extra-ldflags=’-L/root/ffmpeg-static/64bit/lib -static’ –extra-libs=’-lxml2 -lexpat -lfreetype’ –enable-static –disable-shared –disable-ffserver –disable-doc –enable-bzlib –enable-zlib –enable-postproc –enable-runtime-cpudetect –enable-libx264 –enable-gpl –enable-libtheora –enable-libvorbis –enable-libmp3lame –enable-gray –enable-libass –enable-libfreetype –enable-libopenjpeg –enable-libspeex –enable-libvo-aacenc –enable-libvo-amrwbenc –enable-version3 –enable-libvpx
    libavutil 52. 56.100 / 52. 56.100
    libavcodec 55. 45.100 / 55. 45.100
    libavformat 55. 22.100 / 55. 22.100
    libavdevice 55. 5.102 / 55. 5.102
    libavfilter 3. 91.100 / 3. 91.100
    libswscale 2. 5.101 / 2. 5.101
    libswresample 0. 17.104 / 0. 17.104
    libpostproc 52. 3.100 / 52. 3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ‘http://www.jasondolan.co.uk/wp-content/plugins/video-embed-thumbnail-generator/images/sample-video-h264.mp4’:
    Metadata:
    major_brand : qt
    minor_version : 537199360
    compatible_brands: qt
    creation_time : 2013-02-05 17:28:13
    timecode : 01:00:00:00
    Duration: 00:00:01.00, start: 0.000000, bitrate: 91 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709), 960×540, 66 kb/s, 23.98 fps, 23.98 tbr, 2997 tbn, 5994 tbc (default)
    Metadata:
    creation_time : 2013-02-05 17:28:13
    handler_name : Apple Video Media Handler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 2 kb/s (default)
    Metadata:
    creation_time : 2013-02-05 17:28:13
    handler_name : Apple Sound Media Handler
    Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
    creation_time : 2013-02-05 17:28:13
    handler_name : Time Code Media Handler
    timecode : 01:00:00:00
    [libx264 @ 0x3bb13c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
    [libx264 @ 0x3bb13c0] profile Constrained Baseline, level 3.0
    [libx264 @ 0x3bb13c0] 264 – core 129 r2230 1cffe9f – H.264/MPEG-4 AVC codec – Copyleft 2003-2012 – 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=12 lookahead_threads=2 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 ‘/var/www/wp-content/uploads/2013/12/sample-video-h264-480p.mp4’:
    Metadata:
    major_brand : qt
    minor_version : 537199360
    compatible_brands: qt
    timecode : 01:00:00:00
    encoder : Lavf55.22.100
    Stream #0:0(eng): Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 640×360, q=-1–1, 11988 tbn, 23.98 tbc (default)
    Metadata:
    creation_time : 2013-02-05 17:28:13
    handler_name : Apple Video Media Handler
    Stream #0:1(eng): Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 160 kb/s (default)
    Metadata:
    creation_time : 2013-02-05 17:28:13
    handler_name : Apple Sound Media Handler
    Stream mapping:
    Stream #0:0 -> #0:0 (h264 -> libx264)
    Stream #0:1 -> #0:1 (aac -> libvo_aacenc)
    Press [q] to stop, [?] for help
    frame= 24 fps=0.0 q=-1.0 Lsize= 26kB time=00:00:01.01 bitrate= 210.1kbits/s
    video:4kB audio:20kB subtitle:0 global headers:0kB muxing overhead 7.155238%
    [libx264 @ 0x3bb13c0] frame I:1 Avg QP:18.41 size: 2862
    [libx264 @ 0x3bb13c0] frame P:23 Avg QP:11.47 size: 16
    [libx264 @ 0x3bb13c0] mb I I16..4: 94.3% 0.0% 5.7%
    [libx264 @ 0x3bb13c0] 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 @ 0x3bb13c0] coded y,uvDC,uvAC intra: 3.5% 0.0% 0.0% inter: 0.0% 0.0% 0.0%
    [libx264 @ 0x3bb13c0] i16 v,h,dc,p: 95% 1% 5% 0%
    [libx264 @ 0x3bb13c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 18% 27% 3% 3% 7% 4% 6% 3%
    [libx264 @ 0x3bb13c0] i8c dc,h,v,p: 100% 0% 0% 0%
    [libx264 @ 0x3bb13c0] kb/s:25.85
    Fixing moov atom for streaming
    /var/www/qt-faststart /var/www/wp-content/uploads/2013/12/sample-video-h264-480p.mp4 /var/www/wp-content/uploads/2013/12/sample-video-h264-480p-faststart.mp4

    http://wordpress.org/plugins/video-embed-thumbnail-generator/

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

    (@kylegilman)

    Hi Jason, I’m glad you’re enjoying the plugin, but I’m not willing to put in the work to support a 5-year-old cell phone. In my experience it works fine on iPhones 4 and up.

    Thread Starter Jason

    (@jasondolan)

    Hi Kyle,

    It’s actually an iPhone 3GS. So not as old as 5 years yet. 2010 model.
    I can play any video, it’s just if the original is HD and I convert original to H264 it won’t play on it, even with 480p.

    I am able to play with Wowza on the same phone, so probably some code.
    but when I looked into the specs, baseline, 3.0 but the audio must be 64K.
    Could be that.

    Anyway, I’ve been experimenting a bit, If I upload a 5.1 surround sound video file, it always fails to encode.
    I would probably need to add more commands maybe?.

    Here is the log:

    ffmpeg version N-59015-g3efe5e3 Copyright (c) 2000-2013 the FFmpeg developers
      built on Dec 12 2013 05:35:53 with gcc 4.6 (Debian 4.6.3-1)
      configuration: --prefix=/root/ffmpeg-static/64bit --extra-cflags='-I/root/ffmpeg-static/64bit/include -static' --extra-ldflags='-L/root/ffmpeg-static/64bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
      libavutil      52. 58.100 / 52. 58.100
      libavcodec     55. 45.101 / 55. 45.101
      libavformat    55. 22.100 / 55. 22.100
      libavdevice    55.  5.102 / 55.  5.102
      libavfilter     3. 92.100 /  3. 92.100
      libswscale      2.  5.101 /  2.  5.101
      libswresample   0. 17.104 /  0. 17.104
      libpostproc    52.  3.100 / 52.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/var/www/wp-content/uploads/2013/12/channelcheck-large.mp4':
      Metadata:
        major_brand     : dby1
        minor_version   : 0
        compatible_brands: isommp42dby1
        creation_time   : 2011-09-22 00:28:51
        encoder         : Audio: Dolby Digital Plus Encoder 2.2.2 Video: Dolby Impact H.264 Encoder 2.4.7.26 (win64)
      Duration: 00:01:21.95, start: 0.000000, bitrate: 2753 kb/s
        Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv), 1280x720 [SAR 1:1 DAR 16:9], 2533 kb/s, 29.97 fps, 29.97 tbr, 29970 tbn, 59.94 tbc (default)
        Metadata:
          creation_time   : 2011-09-22 00:28:51
          handler_name    : video handler
        Stream #0:1(und): Audio: eac3 (ec-3 / 0x332D6365), 48000 Hz, 5.1(side), fltp, 224 kb/s (default)
        Metadata:
          creation_time   : 2011-09-22 00:28:51
          handler_name    : ilst handler
    [libx264 @ 0x24f09a0] using SAR=1/1
    [libx264 @ 0x24f09a0] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
    [libx264 @ 0x24f09a0] profile Constrained Baseline, level 3.0
    [libx264 @ 0x24f09a0] 264 - core 129 r2230 1cffe9f - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - 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=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 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
    [libvo_aacenc @ 0x24f19e0] Unable to set encoding parameters
    Output #0, mp4, to '/var/www/wp-content/uploads/2013/12/channelcheck-large-480.mp4':
      Metadata:
        major_brand     : dby1
        minor_version   : 0
        compatible_brands: isommp42dby1
        encoder         : Audio: Dolby Digital Plus Encoder 2.2.2 Video: Dolby Impact H.264 Encoder 2.4.7.26 (win64)
        Stream #0:0(und): Video: h264 (libx264), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 90k tbn, 29.97 tbc (default)
        Metadata:
          creation_time   : 2011-09-22 00:28:51
          handler_name    : video handler
        Stream #0:1(und): Audio: aac, 48000 Hz, 5.1(side), s16, 160 kb/s (default)
        Metadata:
          creation_time   : 2011-09-22 00:28:51
          handler_name    : ilst handler
    Stream mapping:
      Stream #0:0 -> #0:0 (h264 -> libx264)
      Stream #0:1 -> #0:1 (eac3 -> libvo_aacenc)
    Error while opening encoder for output stream #0:1 - maybe incorrect parameters such as bit_rate, rate, width or height

    [Moderator Note: Please post log files between backticks or use the code button.]

    I hope you keep updates now and then when you have time, it’s a really good plugin. I can’t find any other WordPress plugin that has these features.

    Thanks,
    Jason.

    Plugin Author Kyle Gilman

    (@kylegilman)

    I think you might be running into this problem with multiple H.264 sources:
    https://github.com/videojs/video.js/issues/662 Do you have the same problem if you switch my plugin’s video player to the WordPress Default player?

    According to the FFMPEG AAC Encoding Guide libvo_aacenc only supports 2 channel audio. If you configure FFMPEG with libfdk_aac you might have better luck. I would worry about device compatibility with any 5.1 file though.

    Hi Jason did you solve the problem? I have the same issue

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘H264 480p videos won't play on my iPhone 3G’ is closed to new replies.