9 Replies Latest reply: Feb 15, 2013 8:01 PM by Cyber Axe
Cyber Axe Level 1 Level 1 (0 points)

I'm attempting to get Videos to work on the iPhone but no matter what I do at best all I can get is Quicktime to pop up and say "Operation could not be completed"

 

As stated in the topic they work fine on other iOS devices but not the iPhone (and presumably iPod Touch)

 

I'm using FFMPEG to encode them to Baseline Level 3 format no larger than 640x480 and with a bitrate no greater than 512k (I've tried it several different ways)

 

I've also implemented the Byte-Range request into my code so that the iPhone can grab segments of the file but that did not fix the problem either.

 

In the past I also tried playing an encoded video on the iPhone not from the website but straight our of Dropbox and that worked if I remember correctly.

 

http://garyrobinson.me/test/ is a page I created with a single source to the iPhone verison.

 

One of the main problems I have is I do not have a Mac myself so cannot debug the iOS Browsers such as Safari and Chrome.

 

I've also tried running the videos through qt-faststart and MP4Box to no avail.

 

The behaviour happens in both iOS Chrome and Safari, both just show video box with a playbutton and a line throught it, in the event I get it to not show the line through it it attempts to load QuickTime and fails with "Operation could not be completed".

 

The current command i'm using to encode with FFMPEG: (%FFMPEG% = Path to FFMPEG) (%INPUT% = Input File) (%OUTPUT% = Output File) (%ABR% = Audio Bitrate) (%VBR% = Video Bitrate)

 

%FFMPEG% -y -i %INPUT% -metadata title="%FILENAME%" -c:v libx264 -skip_threshold 0 -vf "yadif=0:-1:0, scale=min(%RES%\, trunc(iw/16)*16):trunc(ow/a/16)*16" -threads 0 -preset slow -vprofile baseline -level 3 -b:v %VBR%k -maxrate 512000 -bufsize 3000000 -mbd 2 -movflags faststart -flags +mv4+aic -trellis 2 -pass 1 "%OUTPUT%\%FILENAME%\%FILENAME%.temp.mp4"

 

%FFMPEG% -y -i %INPUT% -metadata title="%FILENAME%" -c:v libx264 -skip_threshold 0 -vf "yadif=0:-1:0, scale=min(%RES%\, trunc(iw/16)*16):trunc(ow/a/16)*16" -threads 0 -preset slow -vprofile baseline -level 3 -b:v %VBR%k -maxrate 512000 -bufsize 3000000 -mbd 2 -movflags faststart -flags +mv4+aic -trellis 2 -pass 2 -c:a aac -strict -2 -ac 2 -ar 44100 -b:a %ABR%k -f mp4 -async 1 "%OUTPUT%\%FILENAME%\%FILENAME%.temp.mp4"

 

 

Output of CURL on Video File: curl -I http://garyrobinson.me/test/intro.mp4

HTTP/1.1 200 OK

Date: Wed, 13 Feb 2013 19:22:21 GMT

Server: Apache

Content-Disposition: inline

Expires: Wed, 13 Feb 2013 19:27:22 GMT

X-XSS-Protection: 1; mode=block

Pragma: public

Cache-Control: public

Accept-Ranges: bytes

Etag: "f048f1b53984c4f020819f5bb470a3bd"

Last-Modified: Wed, 13 Feb 2013 10:35:52 GMT

Content-Range: bytes 0-6381407/6381408

Content-Length: 6381408

Content-Type: video/mp4

Content-Language: en-GB

 

 

Output of CURL on Video File Range Request: curl -I -r 200-300 http://garyrobinson.me/test/intro.mp4

HTTP/1.1 206 Partial Content

Date: Wed, 13 Feb 2013 19:21:17 GMT

Server: Apache

Content-Disposition: inline

Expires: Wed, 13 Feb 2013 19:26:17 GMT

X-XSS-Protection: 1; mode=block

Pragma: public

Cache-Control: public

Accept-Ranges: bytes

Etag: "f048f1b53984c4f020819f5bb470a3bd"

Last-Modified: Wed, 13 Feb 2013 10:35:52 GMT

Content-Range: bytes 200-300/6381408

Content-Length: 101

Content-Type: video/mp4

Content-Language: en-GB

 

Output of FFMPEG for iPhone Encoding

ffmpeg version N-49844-g1ac0fa5 Copyright (c) 2000-2013 the FFmpeg developers

  built on Feb 12 2013 17:48:08 with gcc 4.7.2 (GCC)

  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av

isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab

le-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libg

sm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --e

nable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --e

nable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-

libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable

-libx264 --enable-libxavs --enable-libxvid --enable-zlib

  libavutil      52. 17.101 / 52. 17.101

  libavcodec     54. 91.103 / 54. 91.103

  libavformat    54. 63.100 / 54. 63.100

  libavdevice    54.  3.103 / 54.  3.103

  libavfilter     3. 37.101 /  3. 37.101

  libswscale      2.  2.100 /  2.  2.100

  libswresample   0. 17.102 /  0. 17.102

  libpostproc    52.  2.100 / 52.  2.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'G:\Video Conversion\intro.mp4':

  Metadata:

    major_brand     : mp42

    minor_version   : 1

    compatible_brands: mp42mp41

    creation_time   : 2012-10-30 12:51:38

  Duration: 00:01:24.12, start: 0.000000, bitrate: 10314 kb/s

    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x1080

, 10060 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc

    Metadata:

      creation_time   : 2012-10-30 12:51:38

      handler_name    : Apple Video Media Handler

    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 25

1 kb/s

    Metadata:

      creation_time   : 2012-10-30 12:51:38

      handler_name    : Apple Sound Media Handler

[libx264 @ 000000000237eea0] using cpu capabilities: MMX2 SSE2Fast FastShuffle S

SEMisalign LZCNT

[libx264 @ 000000000237eea0] profile Constrained Baseline, level 3.0

[libx264 @ 000000000237eea0] 264 - core 129 r2245 bc13772 - H.264/MPEG-4 AVC codec - Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=1:0:0 analyse=0x1:0 me=dia subme=2 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=25 0 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 rc=cbr mbtree=1 bitrate=512 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=512 vbv_bufsize=3000 nal_hrd=none ip_ratio=1.40 aq=1:1.00 Output #0, mp4, to 'G:\Video Conversion\intro\intro.temp.mp4':

  Metadata:

    major_brand     : mp42

    minor_version   : 1

    compatible_brands: mp42mp41

    title           : intro

    encoder         : Lavf54.63.100

    Stream #0:0(eng): Video: h264 (hq) ([33][0][0][0] / 0x0021), yuv420p, 640x352, q=-1--1, pass 1, 512 kb/s, 12800 tbn, 25 tbc

    Metadata:

      creation_time   : 2012-10-30 12:51:38

      handler_name    : Apple Video Media Handler

    Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, s16

, 128 kb/s

    Metadata:

      creation_time   : 2012-10-30 12:51:38

      handler_name    : Apple Sound Media Handler

Stream mapping:

  Stream #0:0 -> #0:0 (h264 -> libx264)

  Stream #0:1 -> #0:1 (aac -> libvo_aacenc)