[FFmpeg-user] having trouble encoding mov to mp4 H.264 level 3.0 baseline for HTML5 iOS

Antony Peiris acct_reg at fireslug.com
Tue Feb 19 11:01:00 CET 2013


Hello Everyone,

My desired output is an iOS compatible mp4 file, using H.264 Level 3.0 
baseline. I've tried several commands, but always end up with a failure. 
I posted a question in regards to this previously on a thread titled 
'Need help encoding a specific video for HTML5' -- but appears that 
unknowingly I had hijacked another thread by clicking the reply button 
and changing the subject (my apologies, still new to mailing lists). 
Therefore, I decided to start this question all over again, I hope 
that's okay.

As suggested, I have recompiled ffmpeg with the required codecs. My 
source file is as follows:

==

  # ffmpeg -i test.mov

ffmpeg version N-50077-g71ae8d5 Copyright (c) 2000-2013 the FFmpeg developers

   built on Feb 18 2013 08:42:45 with gcc 4.4.6 (GCC) 20120305 (Red Hat 4.4.6-4)

   configuration: --enable-gpl --enable-libmp3lame --enable-libvorbis --enable-libvpx --enable-libx264

   libavutil      52. 17.102 / 52. 17.102

   libavcodec     54. 92.100 / 54. 92.100

   libavformat    54. 63.100 / 54. 63.100

   libavdevice    54.  3.103 / 54.  3.103

   libavfilter     3. 38.103 /  3. 38.103

   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 'test.mov':

   Metadata:

     major_brand     : qt

     minor_version   : 537199360

     compatible_brands: qt

     creation_time   : 2013-02-02 19:09:54

   Duration: 00:26:49.68, start: 0.000000, bitrate: 2960 kb/s

     Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 171 kb/s

     Metadata:

       creation_time   : 2013-02-02 19:09:54

       handler_name    : Apple Alias Data Handler

     Stream #0:1(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 638x476 [SAR 1:1 DAR 319:238], 2800 kb/s, 29.97 fps, 29.97 tbr, 600 tbn, 59.94 tbc

     Metadata:

       creation_time   : 2013-02-02 19:09:54

       handler_name    : Apple Alias Data Handler


==

Based on this input file, what command should I run to get the best 
possible mp4 output with 100% iOS compatibility? Running the following 
command failed:

ffmpeg -i test.mov -s qvga -b:v 384k -vcodec libx264 -r 23.976 -acodec libfaac -ac 2 -ar 44100 -ab 64k -vpre baseline -crf 22 -deinterlace test_new.mp4


Error: File for preset 'baseline' not found

Previously, I had tried:


ffmpeg -y -i in.mov -filter:v scale=640:-1  \

        -c:v libx264-preset:v slow-profile:v baseline \

        -x264opts level=3.0:vbv -maxrate=750:vbv -bufsize=3750:ref=1  \

        -b:v 500k-r:v25/1  -force_fps -movflags faststart \

        -c:a libfaac-b:a 80k-pass x out.mp4


Error: Unrecognized option 'maxrate=750:vbv'

I need help understanding this, what am I doing wrong and how can I get 
it to work? Your advice and help is greatly appreciated, thank you so 
much in advance.

Best Regards,
Tony




More information about the ffmpeg-user mailing list