How to extract 16-bit PNG frame from lossless x264 video - image-processing

I encoded a series of 16-bit grayscale PNGs to a lossless video with the following command:
ffmpeg -i image%04d.png -crf 0 -c:v libx264 -preset veryslow output.mp4
I am now trying to verify that the conversion to video was truly lossless by pulling out the PNGs at the same quality. The command I'm using:
ffmpeg -i output.mp4 image%04d.png
However, this is outputting 8-bit PNGs. I've tried various options I've read about such as -vcodec png and -qscale 0 but so far nothing appears to make it output 16-bit PNGs.
How do I extract all frames from the video at the same quality as they were going in? Or did I make a mistake in creating the lossless video in the first place?
Edit: I get this error message when trying to use -pix_fmt gray16be.
[swscaler # 0x7fef1a8f0800] deprecated pixel format used, make sure
you did set range correctly
Full output:
ffmpeg -i output.mp4 -pix_fmt gray16be image%04d.png
ffmpeg version 3.3.1 Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.3.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --disable-lzma --enable-vda
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.71.100
Duration: 00:00:09.76, start: 0.000000, bitrate: 1337 kb/s
Stream #0:0(und): Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661), yuvj444p(pc), 512x512, 1336 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> png (native))
Press [q] to stop, [?] for help
[swscaler # 0x7fef1a8f0800] deprecated pixel format used, make sure you did set range correctly
Output #0, image2, to 'image%04d.png':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.71.100
Stream #0:0(und): Video: png, gray16be, 512x512, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc57.89.100 png
frame= 244 fps=0.0 q=-0.0 Lsize=N/A time=00:00:09.76 bitrate=N/A speed= 21x
video:4038kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
I'm happy to use a non-ffmpeg solution if there is one.

Your lossless video is 8-bit, as that's what x264 has encoded to. And in any case, x264 does not go above 10-bit (for which you would need a standalone encoder, or a different ffmpeg binary).
-c:v ffv1 is lossless and can encode to 16-bit gray (gray16le) or 16-bit RGB (e.g. rgb48le)
That swscaler line is a warning, not an error. FFmpeg does report the output as 16-bit per channel,
Stream #0:0(und): Video: png, gray16be, 512x512 ...
but you've already lost fidelity with the downgrade of the bit depth when you encoded to H.264.
I'm unclear on what the pixel format of the input PNGs is - RGB with no hint of hue, or a monochannel encoding? I suspect the former, in which case, use
ffmpeg -i image%04d.png -c:v ffv1 output.nut
Then you can do a compare with
ffmpeg -i output.nut -i image%04d.png -filter_complex ssim -f null -
A readout of
SSIM R:1.000000 (inf) G:1.000000 (inf) B:1.000000 (inf) All:1.000000 (inf)
indicates full fidelity.

Related

ffmpeg incorrect duration when converting video to HLS

I'm facing an issue using ffmpeg to convert video, precisely mp4 video => Http Live Streaming (HLS)
Once converted to HLS, the .m3u8 file has a wrong duration (e.g : 20,1s instead of 20.00s), causing bugs when playing it with AVPlayer on iOS.
Playing the video with Safari cause the same issue.
Example :
1) Open Safari
2) Play this video that i've converted
3) Look at the download progression, stopped at 98% cause of wrong duration.
4) When you slide between 98% and 100%, the video player can crash.
EDIT 1 :
I've edited the command line
ffmpeg -i video.mp4 \
-codec copy \
-acodec copy \
-map 0 -f ssegment -g 60 -sc_threshold 0 \
-segment_list playlist.m3u8 \
-segment_list_flags +live \
-segment_time 2 media%05d.ts \
>./log_ffmpeg 2>./log_ffmpeg
LOG :
ffmpeg version 3.1.4-static http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.1 (Debian 5.4.1-2) 20160904
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus --enable-libass --enable-gnutls --enable-libvidstab --enable-libsoxr --enable-frei0r --enable-libfribidi --disable-indev=sndio --disable-outdev=sndio --enable-librtmp --enable-libzimg --cc=gcc-5 --disable-ffplay
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 48.101 / 57. 48.101
libavformat 57. 41.100 / 57. 41.100
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 47.100 / 6. 47.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './Comptes/1/Photos/306/original_video.mp4':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp41mp42isom
creation_time : 2016-10-12 14:29:51
Duration: 00:00:20.00, start: 0.000000, bitrate: 1673 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 540x960, 1563 kb/s, 30 fps, 30 tbr, 600 tbn, 1200 tbc (default)
Metadata:
creation_time : 2016-10-12 14:29:51
handler_name : Core Media Video
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 101 kb/s (default)
Metadata:
creation_time : 2016-10-12 14:29:51
handler_name : Core Media Audio
[stream_segment,ssegment # 0x652ed80] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.
Last message repeated 1 times
Output #0, stream_segment,ssegment, to './Comptes/1/Photos/306/media%05d.ts':
Metadata:
major_brand : mp42
minor_version : 1
compatible_brands: mp41mp42isom
encoder : Lavf57.41.100
Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(tv, bt709), 540x960, q=2-31, 1563 kb/s, 30 fps, 30 tbr, 90k tbn, 600 tbc (default)
Metadata:
creation_time : 2016-10-12 14:29:51
handler_name : Core Media Video
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, 101 kb/s (default)
Metadata:
creation_time : 2016-10-12 14:29:51
handler_name : Core Media Audio
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 601 fps=0.0 q=-1.0 Lsize=N/A time=00:00:20.10 bitrate=N/A speed= 917x
video:3823kB audio:249kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
m3u8 file :
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:3
#EXTINF:2.033333,
media00000.ts
#EXTINF:2.000000,
media00001.ts
#EXTINF:2.000000,
media00002.ts
#EXTINF:2.000000,
media00003.ts
#EXTINF:2.000000,
media00004.ts
#EXTINF:2.000000,
media00005.ts
#EXTINF:2.000000,
media00006.ts
#EXTINF:2.000000,
media00007.ts
#EXTINF:2.000000,
media00008.ts
#EXTINF:2.000000,
media00009.ts
#EXTINF:0.033333,
media00010.ts
#EXT-X-ENDLIST
As you can see input duration =/= output duration
input duration : 20s
output duration 20.1s

Fixed ffmpeg with active_record_store rails

i have a rails application and change to cookie_store to active_record_store, but when i used a converter video in ffmpeg i getting this error
Maybe someone can help me to solve it?
error while running command ffmpeg -i "/tmp/9ce6ffe844cfb53c6adb76fef1f3330020160930-13071-hutiuw.mp4" -acodec aac -strict experimental -vcodec libx264 -s 720x405 -y "/tmp/9ce6ffe844cfb53c6adb76fef1f3330020160930-13071-hutiuw20160930-13071-1xp6lwi.mp4": Command 'PATH=/usr/local/bin/:$PATH; ffmpeg -i "/tmp/9ce6ffe844cfb53c6adb76fef1f3330020160930-13071-hutiuw.mp4" -acodec aac -strict experimental -vcodec libx264 -s 720x405 -y "/tmp/9ce6ffe844cfb53c6adb76fef1f3330020160930-13071-hutiuw20160930-13071-1xp6lwi.mp4"' returned 1. Expected 0 Here is the command output: STDOUT: STDERR: ffmpeg version 2.8.6-1ubuntu2 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 5.3.1 (Ubuntu 5.3.1-11ubuntu1) 20160311 configuration: --prefix=/usr --extra-version=1ubuntu2 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/i386-linux-gnu --incdir=/usr/include/i386-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv --disable-i686 libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/tmp/9ce6ffe844cfb53c6adb76fef1f3330020160930-13071-hutiuw.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 creation_time : 2016-07-12 16:30:41 Duration: 00:04:38.96, start: 0.000000, bitrate: 1520 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1280x720 [SAR 1:1 DAR 16:9], 1325 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 191 kb/s (default) Metadata: creation_time : 2016-07-12 16:30:42 handler_name : IsoMedia File Produced by Google, 5-11-2011 [libx264 # 0xa1105e0] height not divisible by 2 (720x405) Output #0, mp4, to '/tmp/9ce6ffe844cfb53c6adb76fef1f3330020160930-13071-hutiuw20160930-13071-1xp6lwi.mp4': Metadata: major_brand : mp42 minor_version : 0 compatible_brands: isommp42 Stream #0:0(und): Video: h264, none, q=2-31, 128 kb/s, SAR 1:1 DAR 0:0, 29.97 fps (default) Metadata: handler_name : VideoHandler encoder : Lavc56.60.100 libx264 Stream #0:1(eng): Audio: aac, 0 channels, 128 kb/s (default) Metadata: creation_time : 2016-07-12 16:30:42 handler_name : IsoMedia File Produced by Google, 5-11-2011 encoder : Lavc56.60.100 aac Stream mapping: Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264)) Stream #0:1 -> #0:1 (aac (native) -> aac (native)) Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
I don't think your choice of cookie store had anything to do with that. This happened because you chose a video file with this particular input size (1280x720).
Error is:
[libx264 # 0xa1105e0] height not divisible by 2 (720x405)
There are plenty questions on this site about this error but in the end it boils down to a simple answer: "make sure encoded picture has even width and height". In your case output picture size (720x405) is passed down from your site code so you need to fix it there.

Uploading video error with Carrierwave in Rails

I ve tried to upload videos using Carrierwave-video & FFmpeg. I've installed FFmpeg and there is no problem with installation. I have made configurations (I'm not sure from them) from but when I tried to upload video (.mov file), I have an error.
Please help me to fix this problem with Carrierwave & FFmpeg or please guide to me uploading videos to my app with different ways. (Note: I am using Carrierwave for uploading images to my app, and it works perfect)
Thanks for your attention.
Error
Video Failed to transcode with FFmpeg. Check ffmpeg install and verify video is not corrupt or cut short. Original error: Failed encoding.Errors: encoded file is invalid. Full output: ffmpeg version 2.8.3 Copyright (c) 2000-2015 the FFmpeg developers built with Apple LLVM version 7.0.0 (clang-700.1.76) configuration: --prefix=/usr/local/Cellar/ffmpeg/2.8.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-opencl --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libfaac --enable-nonfree --enable-vda libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 60.100 / 56. 60.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 40.101 / 5. 40.101 libavresample 2. 1. 0 / 2. 1. 0 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/tanerkoroglu/Desktop/Wishpere2/public/uploads/tmp/1449435556-7186-2107/IMG_1756.MOV': Metadata: major_brand : qt minor_version : 0 compatible_brands: qt creation_time : 2015-10-17 12:19:27 Duration: 00:01:04.24, start: 0.000000, bitrate: 17176 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080, 17082 kb/s, 29.98 fps, 29.97 tbr, 600 tbn, 1200 tbc (default) Metadata: creation_time : 2015-10-17 12:19:27 handler_name : Core Media Data Handler encoder : H.264 Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 85 kb/s (default) Metadata: creation_time : 2015-10-17 12:19:27 handler_name : Core Media Data Handler Stream #0:2(und): Data: none (mebx / 0x7862656D), 0 kb/s (default) Metadata: creation_time : 2015-10-17 12:19:27 handler_name : Core Media Data Handler Stream #0:3(und): Data: none (mebx / 0x7862656D), 0 kb/s (default) Metadata: creation_time : 2015-10-17 12:19:27 handler_name : Core Media Data Handler Please use -q:a or -q:v, -qscale is ambiguous [Parsed_movie_0 # 0x7feb6bf00100] Failed to avformat_open_input '/Users/tanerkoroglu/Desktop/Wishpere2/app/assets/images/logo.png' [AVFilterGraph # 0x7feb6bc09240] Error initializing filter 'movie' with args '/Users/tanerkoroglu/Desktop/Wishpere2/app/assets/images/logo.png' Error opening filters!
video_uploader.rb
class VideoUploader < CarrierWave::Uploader::Base
include CarrierWave::Video
process :encode
def encode
encode_video(:mp4, watermark: {path: File.join(Rails.root, "app/assets/images/logo.png")})
end
version :mp4 do
def full_filename(for_file)
super.chomp(File.extname(super)) + '.mp4'
end
end
end
Gemfile
gem 'carrierwave', '0.10.0'
gem 'carrierwave-video'
gem 'streamio-ffmpeg'

FFMPEG::Error on Uploading Video to production

I am currently developing an app which involves uploading video to the server. The video is on .MOV format since it comes from an iOS Device. I have set-up FFMPEG on the server already. But everytime I try to upload a video, an FFMPEG error comes out:
FFMPEG::Error (Failed encoding.Errors: encoded file is invalid. Full output: ffmpeg version 2.0.1 Copyright (c) 2000-2013 the FFmpeg developers
built on Oct 26 2015 08:48:47 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --enable-gpl --enable-version3 --enable-shared --enable-nonfree --enable-postproc
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.100 / 55. 12.100
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 79.101 / 3. 79.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/deploy/production/pinoymobiledirectory-ws/public/uploads/tmp/20151029-0424-12438-7062/tmpfile':
Metadata:
major_brand : qt
minor_version : 0
compatible_brands: qt
creation_time : 2015-10-29 04:24:11
Duration: 00:00:05.38, start: 0.000000, bitrate: 784 kb/s
Stream #0:0(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 63 kb/s
Metadata:
creation_time : 2015-10-29 04:24:11
handler_name : Core Media Data Handler
Stream #0:1(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p, 480x360, 715 kb/s, 30.11 fps, 29.97 tbr, 600 tbn, 1200 tbc
Metadata:
rotate : 90
creation_time : 2015-10-29 04:24:11
handler_name : Core Media Data Handler
[aac # 0x143c980] The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.
):
lib/carrierwave/ffmpeg.rb:19:in encode_video'
app/controllers/v1/businesses_assets_controller.rb:33:inupload_video'
Anyone who also got the same error as mine? How did you solved it?
The key part of the message is 'The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it'.
You need to add this flag to your ffmpeg command. For example the following command, which will compress an mp4 video, contains this flag:
ffmpeg -i BigBuckBunny_320x180.mp4 -strict experimental -acodec aac CompressedBBB_320x180_aac.mp4
Fixed it by installing the latest FFMPEG.
Followed this guide: https://gist.github.com/xdamman/e4f713c8cd1a389a5917

ffmpeg options for playing in iPad WebView with <video> tag

I'm trying to convert a video to be played in a tag in a WebView in iOS. I've tried the options at this link but it still doesn't seem to play. I've found videos that do successfully play, though, so I'm sure it's possible, I just can't seem to get any working. Here's the ffmpeg -i output for something that works.
Here's what I tried from the wiki:
ffmpeg -i {filename} -acodec aac -ac 2 -strict experimental -ab 160k -vcodec libx264 -preset slow -profile:v baseline -level 30 -maxrate 10000000 -bufsize 10000000 -b 1200k -f mp4 -threads 0 {filename}.ipad.mp4
But the file doesn't play in the WebView.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'video.m4v':
Metadata:
major_brand : M4V
minor_version : 1
compatible_brands: M4V M4A mp42isom
creation_time : 2005-12-20 20:20:15
Duration: 00:01:25.50, start: 0.000000, bitrate: 209 kb/s
Stream #0:0(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, s16, 115 kb/s
Metadata:
creation_time : 2005-12-20 20:20:15
handler_name : Apple Sound Media Handler
Stream #0:1(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 320x240, 90 kb/s, 10 fps, 10 tbr, 1k tbn, 2k tbc
Metadata:
creation_time : 2005-12-20 20:20:15
handler_name : Apple Video Media Handler
And here's the output for my input file:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'cheerfulness.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2013-07-31 00:47:22
Duration: 00:00:06.00, start: 0.000000, bitrate: 120849 kb/s
Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1200x1920, 120823 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc
Metadata:
creation_time : 2013-07-31 00:48:33
handler_name : Apple Alias Data Handler
edit: Here's the full output of the command:
wlue:$ ffmpeg -i cheerfulness.mov -acodec aac -ac 2 -strict experimental -ab 160k -vcodec libx264 -preset slow -profile:v baseline -level 30 -maxrate 10000000 -bufsize 10000000 -b 1200k -f mp4 -threads 0 output.ipad.mp4
ffmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers
built on Sep 18 2013 18:44:15 with Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/1.2.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=cc --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavdevice 54. 3.103 / 54. 3.103
libavfilter 3. 42.103 / 3. 42.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 'cheerfulness.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2013-07-31 00:47:22
Duration: 00:00:06.01, start: 0.000000, bitrate: 120849 kb/s
Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1200x1920, 120823 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 60k tbc
Metadata:
creation_time : 2013-07-31 00:48:33
handler_name : Apple Alias Data Handler
Please use -b:a or -b:v, -b is ambiguous
[libx264 # 0x7fa67401fa00] frame MB size (75x120) > level limit (1620)
[libx264 # 0x7fa67401fa00] DPB size (5 frames, 17280000 bytes) > level limit (0 frames, 3110400 bytes)
[libx264 # 0x7fa67401fa00] MB rate (269730) > level limit (40500)
[libx264 # 0x7fa67401fa00] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
[libx264 # 0x7fa67401fa00] profile Constrained Baseline, level 3.0
[libx264 # 0x7fa67401fa00] 264 - core 125 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=0 ref=5 deblock=1:0:0 analyse=0x1:0x111 me=umh subme=8 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=50 rc=abr mbtree=1 bitrate=1200 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=10000 vbv_bufsize=10000 nal_hrd=none ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output.ipad.mp4':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
encoder : Lavf54.63.104
Stream #0:0(eng): Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1200x1920, q=-1--1, 1200 kb/s, 30k tbn, 29.97 tbc
Metadata:
creation_time : 2013-07-31 00:48:33
handler_name : Apple Alias Data Handler
Stream mapping:
Stream #0:0 -> #0:0 (h264 -> libx264)
Press [q] to stop, [?] for help
frame= 180 fps= 16 q=-1.0 Lsize= 828kB time=00:00:06.00 bitrate=1129.2kbits/s
video:826kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.177851%
[libx264 # 0x7fa67401fa00] frame I:2 Avg QP:32.23 size: 20942
[libx264 # 0x7fa67401fa00] frame P:178 Avg QP:41.03 size: 4515
[libx264 # 0x7fa67401fa00] mb I I16..4: 90.1% 0.0% 9.9%
[libx264 # 0x7fa67401fa00] mb P I16..4: 6.8% 0.0% 0.0% P16..4: 16.8% 0.6% 0.2% 0.0% 0.0% skip:75.5%
[libx264 # 0x7fa67401fa00] final ratefactor: 37.56
[libx264 # 0x7fa67401fa00] coded y,uvDC,uvAC intra: 1.2% 16.4% 2.1% inter: 0.1% 3.4% 0.1%
[libx264 # 0x7fa67401fa00] i16 v,h,dc,p: 49% 23% 4% 24%
[libx264 # 0x7fa67401fa00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 8% 36% 8% 12% 9% 8% 4% 2%
[libx264 # 0x7fa67401fa00] i8c dc,h,v,p: 88% 6% 5% 1%
[libx264 # 0x7fa67401fa00] ref P L0: 47.7% 22.0% 16.7% 5.7% 7.9%
[libx264 # 0x7fa67401fa00] kb/s:1126.21

Resources